playbook_ui 14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 → 14.8.0.pre.alpha.PLAY1615movenegativetoleftofcurrencysign4539

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +2 -2
  4. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +4 -0
  5. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +7 -84
  6. data/app/pb_kits/playbook/pb_currency/_currency.tsx +7 -3
  7. data/app/pb_kits/playbook/pb_currency/currency.html.erb +2 -2
  8. data/app/pb_kits/playbook/pb_currency/currency.rb +17 -1
  9. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -1
  10. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +1 -0
  11. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +4 -0
  12. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -2
  13. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
  14. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +12 -63
  15. data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.html.erb +1 -2
  16. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +0 -47
  17. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +0 -59
  18. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +0 -3
  19. data/app/pb_kits/playbook/pb_typeahead/index.ts +3 -29
  20. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -5
  21. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +0 -4
  22. data/app/pb_kits/playbook/utilities/_max_width.scss +0 -4
  23. data/app/pb_kits/playbook/utilities/_min_width.scss +1 -1
  24. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +1 -0
  25. data/app/pb_kits/playbook/utilities/globalProps.ts +0 -24
  26. data/dist/chunks/_typeahead-D0PihN_3.js +22 -0
  27. data/dist/chunks/_weekday_stacked-CVx1CzK-.js +45 -0
  28. data/dist/chunks/{lib-SyD3buPZ.js → lib-BC6ESsxG.js} +1 -1
  29. data/dist/chunks/{pb_form_validation-Dt8UJgrJ.js → pb_form_validation-B_Z9rEbg.js} +1 -1
  30. data/dist/chunks/vendor.js +1 -1
  31. data/dist/menu.yml +0 -321
  32. data/dist/playbook-doc.js +1 -1
  33. data/dist/playbook-rails-react-bindings.js +1 -1
  34. data/dist/playbook-rails.js +1 -1
  35. data/dist/playbook.css +1 -1
  36. data/lib/playbook/classnames.rb +0 -3
  37. data/lib/playbook/forms/builder/typeahead_field.rb +0 -13
  38. data/lib/playbook/kit_base.rb +1 -16
  39. data/lib/playbook/version.rb +1 -1
  40. metadata +6 -12
  41. data/app/pb_kits/playbook/tokens/_height.scss +0 -19
  42. data/app/pb_kits/playbook/tokens/exports/_height.module.scss +0 -37
  43. data/app/pb_kits/playbook/utilities/_height.scss +0 -33
  44. data/dist/chunks/_typeahead-q6dSnFmE.js +0 -22
  45. data/dist/chunks/_weekday_stacked-BF7UZO3j.js +0 -45
  46. data/lib/playbook/height.rb +0 -29
  47. data/lib/playbook/max_height.rb +0 -29
  48. data/lib/playbook/min_height.rb +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ed8f704052a7acdd9d76714b8702cc95ebcc2cd273bba9de5d0dec1053f1d7c
4
- data.tar.gz: 46073a3b2fccec41e50abfd388306382c330ebe6a7cd4e8ae98217fd56fb4476
3
+ metadata.gz: fd8c9650b23708306eeea2d36f0a87f8b065d8aa28fbd72bfef581827414c6da
4
+ data.tar.gz: e941e09a241073a2641e0a42b5e3b42e67db2cc6ea4fdf903d54bf8986b3e13c
5
5
  SHA512:
6
- metadata.gz: 5a945e9e445453e8ce8dd27d2466e9524be36652ee2b1246d644a5b26fbd2863fefbb1cea67212e84b81bd3aad6fe76dde306b00c6cd55bcc1f2ab31807f7700
7
- data.tar.gz: fe0ea2f55ccc17a0bfdf50233919636b2b3794932ac026e51ac16f8a1ee13a19d2a44887208406f5e341d24db0383cf63c7a9c0a495091edd150507a9b2c79e2
6
+ metadata.gz: 2ffec4416dafad8b69973e7f96276279ecdfc2aa2a9ada8c002a188fe99061db0b22a2a8a5b662a661bab1562b961b3c3db8f8924959b859383c1e9d17e4483b
7
+ data.tar.gz: d2b75f2d74f6ddb913b171976b07a372cbfa539524e06f36ece2f82dd377e66087290830c64735ddf9c158ded7fdb97aaab9fb6c6f1932df364104ef0a661b3e
@@ -126,4 +126,3 @@
126
126
  @import 'utilities/overflow';
127
127
  @import 'utilities/truncate';
128
128
  @import 'utilities/vertical_align';
129
- @import 'utilities/height';
@@ -6,12 +6,12 @@
6
6
  ) do %>
7
7
  <%= content.presence || object.input %>
8
8
  <% if object.indeterminate %>
9
- <span data-pb-checkbox-icon-span="true" class="pb_checkbox_indeterminate">
9
+ <span class="pb_checkbox_indeterminate">
10
10
  <%= pb_rails("icon", props: { icon: "minus", classname: "indeterminate_icon", fixed_width: true}) %>
11
11
  <%= pb_rails("icon", props: { icon: "check", classname: "check_icon hidden", fixed_width: true}) %>
12
12
  </span>
13
13
  <% else %>
14
- <span data-pb-checkbox-icon-span="true" class="pb_checkbox_checkmark">
14
+ <span class="pb_checkbox_checkmark">
15
15
  <%= pb_rails("icon", props: { icon: "check", classname: "check_icon", fixed_width: true}) %>
16
16
  <%= pb_rails("icon", props: { icon: "minus", classname: "indeterminate_icon hidden", fixed_width: true}) %>
17
17
  </span>
@@ -18,6 +18,10 @@ module Playbook
18
18
  prop :form_spacing, type: Playbook::Props::Boolean,
19
19
  default: false
20
20
 
21
+ def checked_html
22
+ checked ? "checked='true'" : nil
23
+ end
24
+
21
25
  def classname
22
26
  generate_classname("pb_checkbox_kit", checked_class) + indeterminate_class + error_class
23
27
  end
@@ -1,84 +1,7 @@
1
- <% checkboxes = [
2
- { name: 'Coffee', id: 'coffee', checked: false },
3
- { name: 'Ice Cream', id: 'ice-cream', checked: false },
4
- { name: 'Chocolate', id: 'chocolate', checked: true }
5
- ] %>
6
-
7
- <%= pb_rails("table", props: { container: false, size: "md" }) do %>
8
- <thead>
9
- <tr>
10
- <th>
11
- <%= pb_rails("checkbox", props: {
12
- checked: true,
13
- text: "Uncheck All",
14
- value: "checkbox-value",
15
- name: "main-checkbox",
16
- indeterminate: true,
17
- id: "indeterminate-checkbox"
18
- }) %>
19
- </th>
20
- </tr>
21
- </thead>
22
-
23
- <tbody>
24
- <% checkboxes.each do |checkbox| %>
25
- <tr>
26
- <td>
27
- <%= pb_rails("checkbox", props: {
28
- checked: checkbox[:checked],
29
- text: checkbox[:name],
30
- value: checkbox[:id],
31
- name: "#{checkbox[:id]}-indeterminate-checkbox",
32
- id: "#{checkbox[:id]}-indeterminate-checkbox",
33
- }) %>
34
- </td>
35
- </tr>
36
- <% end %>
37
- </tbody>
38
- <% end %>
39
-
40
- <script>
41
- document.addEventListener('DOMContentLoaded', function() {
42
- const mainCheckboxWrapper = document.getElementById('indeterminate-checkbox');
43
- const mainCheckbox = document.getElementsByName("main-checkbox")[0];
44
- const childCheckboxes = document.querySelectorAll('input[type="checkbox"][id$="indeterminate-checkbox"]');
45
-
46
- const updateMainCheckbox = () => {
47
- // Count the number of checked child checkboxes
48
- const checkedCount = Array.from(childCheckboxes).filter(cb => cb.checked).length;
49
- // Determine if the main checkbox should be in an indeterminate state
50
- const indeterminate = checkedCount > 0 && checkedCount < childCheckboxes.length;
51
-
52
- // Set the main checkbox states
53
- mainCheckbox.indeterminate = indeterminate;
54
- mainCheckbox.checked = checkedCount > 0;
55
-
56
- // Determine the main checkbox label based on the number of checked checkboxes
57
- const text = checkedCount === 0 ? 'Check All' : 'Uncheck All';
58
-
59
- // Determine the icon class to add and remove based on the number of checked checkboxes
60
- const iconClassToAdd = checkedCount === 0 ? 'pb_checkbox_checkmark' : 'pb_checkbox_indeterminate';
61
- const iconClassToRemove = checkedCount === 0 ? 'pb_checkbox_indeterminate' : 'pb_checkbox_checkmark';
62
-
63
- // Update main checkbox label
64
- mainCheckboxWrapper.getElementsByClassName('pb_body_kit')[0].textContent = text;
65
-
66
- // Add and remove the icon class to the main checkbox wrapper
67
- mainCheckboxWrapper.querySelector('[data-pb-checkbox-icon-span]').classList.add(iconClassToAdd);
68
- mainCheckboxWrapper.querySelector('[data-pb-checkbox-icon-span]').classList.remove(iconClassToRemove);
69
-
70
- // Toggle the visibility of the checkbox icon based on the indeterminate state
71
- mainCheckboxWrapper.getElementsByClassName("indeterminate_icon")[0].classList.toggle('hidden', !indeterminate);
72
- mainCheckboxWrapper.getElementsByClassName("check_icon")[0].classList.toggle('hidden', indeterminate);
73
- };
74
-
75
- mainCheckbox.addEventListener('change', function() {
76
- childCheckboxes.forEach(cb => cb.checked = this.checked);
77
- updateMainCheckbox();
78
- });
79
-
80
- childCheckboxes.forEach(cb => {
81
- cb.addEventListener('change', updateMainCheckbox);
82
- });
83
- });
84
- </script>
1
+ <%= pb_rails("checkbox" , props: {
2
+ text: "Select ",
3
+ value: "checkbox-value",
4
+ name: "main",
5
+ indeterminate: true,
6
+ id: "test-indeterminate-js"
7
+ }) %>
@@ -101,7 +101,11 @@ const Currency = (props: CurrencyProps): React.ReactElement => {
101
101
  return decimalPart ? `${formattedWhole}.${decimalPart}` : formattedWhole;
102
102
  }
103
103
 
104
- const getAmount = abbreviate ? getAbbreviatedValue('amount') : formatAmount(getMatchingDecimalAmount)
104
+ const swapNegative = size === "sm" && symbol !== ""
105
+ const handleNegative = amount.startsWith("-") && swapNegative ? "-" : ""
106
+ const getAbsoluteAmount = (amountString) => amountString.replace(/^-/,'')
107
+ const getAbbrOrFormatAmount = abbreviate ? getAbbreviatedValue('amount') : formatAmount(getMatchingDecimalAmount)
108
+ const getAmount = swapNegative ? getAbsoluteAmount(getAbbrOrFormatAmount) : getAbbrOrFormatAmount
105
109
  const getAbbreviation = abbreviate ? getAbbreviatedValue('unit') : null
106
110
  const getDecimalValue = abbreviate ? '' : getMatchingDecimalValue
107
111
 
@@ -118,7 +122,7 @@ const Currency = (props: CurrencyProps): React.ReactElement => {
118
122
  <div className={`pb_currency_wrapper${variantClass || emphasizedClass}`}>
119
123
  {unstyled ? (
120
124
  <>
121
- <div>{symbol}</div>
125
+ <div>{handleNegative}{symbol}</div>
122
126
  <div>{getAmount}</div>
123
127
  <div>
124
128
  {getAbbreviation}
@@ -132,7 +136,7 @@ const Currency = (props: CurrencyProps): React.ReactElement => {
132
136
  color="light"
133
137
  dark={dark}
134
138
  >
135
- {symbol}
139
+ {handleNegative}{symbol}
136
140
  </Body>
137
141
 
138
142
  <Title
@@ -3,12 +3,12 @@
3
3
 
4
4
  <div class=<%= "pb_currency_wrapper#{object.variant_class || object.emphasized_class}" %>>
5
5
  <% if object.unstyled %>
6
- <div><%= object.symbol %></div>
6
+ <div><%= object.negative_sign %><%= object.symbol %></div>
7
7
  <div><%= object.title_props[:text] %></div>
8
8
  <div><%= object.body_props[:text] %></div>
9
9
  <% else %>
10
10
  <%= pb_rails("body", props: object.currency_wrapper_props) do %>
11
- <%= object.symbol %>
11
+ <%= object.negative_sign %><%= object.symbol %>
12
12
  <% end %>
13
13
  <%= pb_rails("title", props: object.title_props) %>
14
14
  <%= pb_rails("body", props: object.body_props) %>
@@ -68,12 +68,20 @@ module Playbook
68
68
  def title_props
69
69
  {
70
70
  size: size_value,
71
- text: abbreviate ? abbreviated_value : formatted_amount,
71
+ text: swap_negative ? absolute_amount(abbr_or_format_amount) : abbr_or_format_amount,
72
72
  classname: "pb_currency_value",
73
73
  dark: dark,
74
74
  }
75
75
  end
76
76
 
77
+ def abbr_or_format_amount
78
+ abbreviate ? abbreviated_value : formatted_amount
79
+ end
80
+
81
+ def negative_sign
82
+ amount.starts_with?("-") && swap_negative ? "-" : ""
83
+ end
84
+
77
85
  def body_props
78
86
  {
79
87
  text: units_element,
@@ -159,6 +167,14 @@ module Playbook
159
167
  whole_value
160
168
  end
161
169
  end
170
+
171
+ def absolute_amount(amount_string)
172
+ amount_string.sub(/^-/, "")
173
+ end
174
+
175
+ def swap_negative
176
+ size == "sm" && symbol != ""
177
+ end
162
178
  end
163
179
  end
164
180
  end
@@ -53,7 +53,6 @@
53
53
  }
54
54
 
55
55
  .pb_dropdown_container {
56
- position: absolute;
57
56
  background-color: $white;
58
57
  overflow: hidden;
59
58
  box-shadow: $shadow_deep;
@@ -3,6 +3,7 @@
3
3
  class: object.classname,
4
4
  data: object.data,
5
5
  id: object.id,
6
+ style: object.container_style,
6
7
  **combined_html_options) do %>
7
8
  <%= pb_rails("list", props: {ordered: false, borderless: false}) do %>
8
9
  <% if content.present? %>
@@ -7,6 +7,10 @@ module Playbook
7
7
  generate_classname("pb_dropdown_container", "close", separator: " ")
8
8
  end
9
9
 
10
+ def container_style
11
+ "position: absolute"
12
+ end
13
+
10
14
  def data
11
15
  Hash(prop(:data)).merge(dropdown_container: true)
12
16
  end
@@ -23,7 +23,7 @@
23
23
  %>
24
24
 
25
25
  <%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
26
- <%= form.typeahead :example_typeahead, props: { data: { typeahead_example1: true, user: {} }, label: true, placeholder: "Search for a user" } %>
26
+ <%= form.typeahead :example_user, props: { data: { typeahead_example1: true, user: {} }, placeholder: "Search for a user" } %>
27
27
  <%= form.text_field :example_text_field, props: { label: true } %>
28
28
  <%= form.phone_number_field :example_phone_number_field, props: { label: "Example phone field" } %>
29
29
  <%= form.email_field :example_email_field, props: { label: true } %>
@@ -92,7 +92,7 @@
92
92
  const selectedUserData = JSON.parse(selectedUserJSON)
93
93
 
94
94
  // set the input field's value
95
- event.target.querySelector('input[name=example_typeahead]').value = selectedUserData.login
95
+ event.target.querySelector('input[name=example_user]').value = selectedUserData.login
96
96
 
97
97
  // log the selected option's dataset
98
98
  console.log('The selected user data:')
@@ -1,5 +1,5 @@
1
1
  <%= pb_form_with(scope: :example, url: "", method: :get, loading: true) do |form| %>
2
- <%= form.text_field :example_text_field_loading, props: { label: true } %>
2
+ <%= form.text_field :example_text_field, props: { label: true } %>
3
3
 
4
4
  <%= form.actions do |action| %>
5
5
  <%= action.submit %>
@@ -22,74 +22,23 @@
22
22
  %>
23
23
 
24
24
  <%= pb_form_with(scope: :example, method: :get, url: "", validate: true) do |form| %>
25
- <%= form.typeahead :example_typeahead_validation, props: { data: { typeahead_example2: true, user: {} }, label: true, placeholder: "Search for a user", required: true, validation: { message: "Please select a user." } } %>
26
- <%= form.text_field :example_text_field_validation, props: { label: true, required: true } %>
27
- <%= form.phone_number_field :example_phone_number_field_validation, props: { label: "Example phone field" } %>
28
- <%= form.email_field :example_email_field_validation, props: { label: true, required: true } %>
29
- <%= form.number_field :example_number_field_validation, props: { label: true, required: true } %>
30
- <%= form.search_field :example_project_number_validation, props: { label: true, required: true, validation: { pattern: "[0-9]{2}-[0-9]{5}", message: "Please enter a valid project number (example: 33-12345)." } } %>
31
- <%= form.password_field :example_password_field_validation, props: { label: true, required: true } %>
32
- <%= form.url_field :example_url_field_validation, props: { label: true, required: true } %>
33
- <%= form.text_area :example_text_area_validation, props: { label: true, required: true } %>
34
- <%= form.dropdown_field :example_dropdown_validation, props: { label: true, options: example_dropdown_options, required: true } %>
35
- <%= form.select :example_select_validation, [ ["Yes", 1], ["No", 2] ], props: { label: true, blank_selection: "Select One...", required: true } %>
36
- <%= form.collection_select :example_collection_select_validation, example_collection, :value, :name, props: { label: true, blank_selection: "Select One...", required: true } %>
25
+ <%= form.text_field :example_text_field, props: { label: true, required: true } %>
26
+ <%= form.phone_number_field :example_phone_number_field, props: { label: "Example phone field" } %>
27
+ <%= form.email_field :example_email_field, props: { label: true, required: true } %>
28
+ <%= form.number_field :example_number_field, props: { label: true, required: true } %>
29
+ <%= form.search_field :example_project_number, props: { label: true, required: true, validation: { pattern: "[0-9]{2}-[0-9]{5}", message: "Please enter a valid project number (example: 33-12345)." } } %>
30
+ <%= form.password_field :example_password_field, props: { label: true, required: true } %>
31
+ <%= form.url_field :example_url_field, props: { label: true, required: true } %>
32
+ <%= form.text_area :example_text_area, props: { label: true, required: true } %>
33
+ <%= form.dropdown_field :example_dropdown, props: { label: true, options: example_dropdown_options, required: true } %>
34
+ <%= form.select :example_select, [ ["Yes", 1], ["No", 2] ], props: { label: true, blank_selection: "Select One...", required: true } %>
35
+ <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true, blank_selection: "Select One...", required: true } %>
37
36
  <%= form.check_box :example_checkbox, props: { text: "Example Checkbox", label: true, required: true } %>
38
37
  <%= form.date_picker :example_date_picker_2, props: { label: true, required: true } %>
39
- <%= form.star_rating_field :example_star_rating_validation, props: { variant: "interactive", label: true, required: true } %>
38
+ <%= form.star_rating_field :example_star_rating, props: { variant: "interactive", label: true, required: true } %>
40
39
 
41
40
  <%= form.actions do |action| %>
42
41
  <%= action.submit %>
43
42
  <%= action.button props: { type: "reset", text: "Cancel", variant: "secondary" } %>
44
43
  <% end %>
45
44
  <% end %>
46
-
47
- <!-- form.typeahead user results example template -->
48
- <template data-typeahead-example-result-option>
49
- <%= pb_rails("user", props: {
50
- name: tag(:slot, name: "name"),
51
- orientation: "horizontal",
52
- align: "left",
53
- avatar_url: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGP6zwAAAgcBApocMXEAAAAASUVORK5CYII=",
54
- avatar: true
55
- }) %>
56
- </template>
57
-
58
- <!-- form.typeahead JS example implementation -->
59
- <%= javascript_tag defer: "defer" do %>
60
- document.addEventListener("pb-typeahead-kit-search", function(event) {
61
- if (!event.target.dataset || !event.target.dataset.typeaheadExample2) return
62
-
63
- fetch(`https://api.github.com/search/users?q=${encodeURIComponent(event.detail.searchingFor)}`)
64
- .then(response => response.json())
65
- .then((result) => {
66
- const resultOptionTemplate = document.querySelector("[data-typeahead-example-result-option]")
67
-
68
- event.detail.setResults((result.items || []).map((user) => {
69
- const wrapper = resultOptionTemplate.content.cloneNode(true)
70
- wrapper.children[0].dataset.user = JSON.stringify(user)
71
- wrapper.querySelector('slot[name="name"]').replaceWith(user.login)
72
- wrapper.querySelector('img').dataset.src = user.avatar_url
73
- return wrapper
74
- }))
75
- })
76
- })
77
-
78
-
79
- document.addEventListener("pb-typeahead-kit-result-option-selected", function(event) {
80
- if (!event.target.dataset.typeaheadExample2) return
81
-
82
- const selectedUserJSON = event.detail.selected.firstElementChild.dataset.user
83
- const selectedUserData = JSON.parse(selectedUserJSON)
84
-
85
- // set the input field's value
86
- event.target.querySelector('input[name=example_typeahead_validation]').value = selectedUserData.login
87
-
88
- // log the selected option's dataset
89
- console.log('The selected user data:')
90
- console.dir(selectedUserData)
91
-
92
- // do even more with the data later - TBD
93
- event.target.dataset.user = selectedUserJSON
94
- })
95
- <% end %>
@@ -6,7 +6,6 @@
6
6
  value: "selected_with_icon",
7
7
  checked: true,
8
8
  icon: true,
9
-
10
9
  }) do %>
11
10
  Selected, with icon
12
11
  <% end %>
@@ -37,4 +36,4 @@
37
36
  Disabled
38
37
  <% end %>
39
38
 
40
- </div>
39
+ </div>
@@ -41,50 +41,3 @@
41
41
  }) %>
42
42
  <% end %>
43
43
  <% end %>
44
-
45
- <br /><br /><br />
46
-
47
- <%= pb_rails("timeline", props: {orientation: "vertical", show_date: true}) do %>
48
- <%= pb_rails("timeline/item") do |item| %>
49
-
50
- <% item.label do %>
51
- <%= pb_rails("timeline/label") do %>
52
- <%= pb_rails("title", props: { text: "Any Kit", size: 4 }) %>
53
- <% end %>
54
- <% end %>
55
-
56
- <% item.step do %>
57
- <%= pb_rails("timeline/step", props: { icon: 'user', icon_color: 'royal' }) %>
58
- <% end %>
59
-
60
- <% item.detail do %>
61
- <%= pb_rails("title_detail", props: {
62
- title: "Jackson Heights",
63
- detail: "37-27 74th Street"
64
- }) %>
65
- <% end %>
66
- <% end %>
67
-
68
- <%= pb_rails("timeline/item", props: {icon: "map-marker-alt", icon_color: "purple", date: Date.today+1, line_style: "dotted" }) do |item| %>
69
- <%= pb_rails("title_detail", props: {
70
- title: "Society Hill",
71
- detail: "72 E St Astoria"
72
- }) %>
73
- <% end %>
74
-
75
- <%= pb_rails("timeline/item") do |item| %>
76
-
77
- <% item.step do %>
78
- <%= pb_rails("timeline/step") do %>
79
- <%= pb_rails("pill", props: { text: "3" , variant: "success" }) %>
80
- <% end %>
81
- <% end %>
82
-
83
- <% item.detail do %>
84
- <%= pb_rails("title_detail", props: {
85
- title: "Greenpoint",
86
- detail: "81 Gate St Brooklyn"
87
- }) %>
88
- <% end %>
89
- <% end %>
90
- <% end %>
@@ -62,65 +62,6 @@ const TimelineWithChildren = (props) => (
62
62
  </Timeline.Detail>
63
63
  </Timeline.Item>
64
64
  </Timeline>
65
-
66
- <br />
67
- <br />
68
- <br />
69
-
70
- <Timeline orientation="vertical"
71
- showDate
72
- {...props}
73
- >
74
- <Timeline.Item lineStyle="solid"
75
- {...props}
76
- >
77
- <Timeline.Label>
78
- <Title size={4}
79
- text='Any Kit'
80
- />
81
- </Timeline.Label>
82
- <Timeline.Step icon="user"
83
- iconColor="royal"
84
- />
85
- <Timeline.Detail>
86
- <TitleDetail detail="37-27 74th Street"
87
- title="Jackson Heights"
88
- {...props}
89
- />
90
- </Timeline.Detail>
91
- </Timeline.Item>
92
-
93
- <Timeline.Item lineStyle="dotted"
94
- {...props}
95
- >
96
- <Timeline.Label date={new Date(new Date().setDate(new Date().getDate() + 1))} />
97
- <Timeline.Step icon="map-marker-alt"
98
- iconColor="purple"
99
- />
100
- <Timeline.Detail>
101
- <TitleDetail detail="72 E St Astoria"
102
- title="Society Hill"
103
- {...props}
104
- />
105
- </Timeline.Detail>
106
- </Timeline.Item>
107
-
108
- <Timeline.Item lineStyle="solid"
109
- {...props}
110
- >
111
- <Timeline.Step>
112
- <Pill text="3"
113
- variant="success"
114
- />
115
- </Timeline.Step>
116
- <Timeline.Detail>
117
- <TitleDetail detail="81 Gate St Brooklyn"
118
- title="Greenpoint"
119
- {...props}
120
- />
121
- </Timeline.Detail>
122
- </Timeline.Item>
123
- </Timeline>
124
65
  </div>
125
66
  )
126
67
 
@@ -2,7 +2,6 @@
2
2
  @import "../tokens/border_radius";
3
3
  @import "../tokens/spacing";
4
4
  @import "../tokens/shadows";
5
- @import "../tokens/positioning";
6
5
 
7
6
  [class^=pb_typeahead_kit] {
8
7
  .typeahead-kit-select__option {
@@ -100,7 +99,6 @@
100
99
  .typeahead-kit-select__menu {
101
100
  background-color: $bg_dark;
102
101
  color: $white;
103
- z-index: $z_1;
104
102
  }
105
103
  .typeahead-kit-select__option:hover {
106
104
  background-color: $active_dark;
@@ -184,7 +182,6 @@
184
182
  }
185
183
 
186
184
  .typeahead-kit-select__menu {
187
- z-index: $z_1;
188
185
  .typeahead-kit-select__menu-list {
189
186
  padding: 0;
190
187
  }
@@ -4,12 +4,11 @@ import { debounce } from 'lodash'
4
4
  export default class PbTypeahead extends PbEnhancedElement {
5
5
  _searchInput: HTMLInputElement
6
6
  _resultsElement: HTMLElement
7
- _debouncedSearch: () => void
7
+ _debouncedSearch: Function
8
8
  _resultsLoadingIndicator: HTMLElement
9
9
  _resultOptionTemplate: HTMLElement
10
10
  _resultsOptionCache: Map<string, Array<DocumentFragment>>
11
11
  _searchContext: string
12
- _validSelection: boolean
13
12
 
14
13
  static get selector() {
15
14
  return '[data-pb-typeahead-kit]'
@@ -87,9 +86,6 @@ export default class PbTypeahead extends PbEnhancedElement {
87
86
  const resultOption = (event.target as Element).closest('[data-result-option-item]')
88
87
  if (!resultOption) return
89
88
 
90
- this._validSelection = true
91
- this.removeValidationError()
92
-
93
89
  this.resultsCacheClear()
94
90
  this.searchInputClear()
95
91
  this.clearResults()
@@ -97,28 +93,6 @@ export default class PbTypeahead extends PbEnhancedElement {
97
93
  this.element.dispatchEvent(new CustomEvent('pb-typeahead-kit-result-option-selected', { bubbles: true, detail: { selected: resultOption, typeahead: this } }))
98
94
  }
99
95
 
100
- removeValidationError() {
101
- const inputWrapper = this.searchInput.closest('.text_input_wrapper')
102
- if (inputWrapper) {
103
- const errorMessage = inputWrapper.querySelector('.pb_body_kit_negative') as HTMLElement
104
- if (errorMessage) {
105
- errorMessage.style.display = 'none'
106
- }
107
- this.searchInput.classList.remove('error')
108
- }
109
- }
110
-
111
- showValidationError() {
112
- const inputWrapper = this.searchInput.closest('.text_input_wrapper')
113
- if (inputWrapper) {
114
- const errorMessage = inputWrapper.querySelector('.pb_body_kit_negative') as HTMLElement
115
- if (errorMessage) {
116
- errorMessage.style.display = 'block'
117
- }
118
- this.searchInput.classList.add('error')
119
- }
120
- }
121
-
122
96
  clearResults() {
123
97
  this.resultsElement.innerHTML = ''
124
98
  }
@@ -227,8 +201,8 @@ export default class PbTypeahead extends PbEnhancedElement {
227
201
  }
228
202
 
229
203
  toggleResultsLoadingIndicator(visible: boolean) {
230
- let visibilityProperty = '0'
204
+ var visibilityProperty = '0'
231
205
  if (visible) visibilityProperty = '1'
232
206
  this.resultsLoadingIndicator.style.opacity = visibilityProperty
233
207
  }
234
- }
208
+ }
@@ -17,14 +17,11 @@
17
17
  <%= pb_rails("text_input", props: {
18
18
  type: "search",
19
19
  input_options: object.input_options,
20
+ label: object.label,
20
21
  name: object.name,
21
22
  value: object.value,
22
23
  placeholder: object.placeholder,
23
24
  margin_bottom: "none",
24
- required: object.required,
25
- validation: object.validation,
26
- label: object.label,
27
- id: object.input_options[:id],
28
25
  }) %>
29
26
  <%= pb_rails("list", props: { ordered: false, borderless: false, xpadding: true, role: "status", aria: { live: "polite" }, data: { pb_typeahead_kit_results: true } }) do %>
30
27
  <% end %>
@@ -36,4 +33,4 @@
36
33
  <% end %>
37
34
  </template>
38
35
  <% end %>
39
- <% end %>
36
+ <% end %>
@@ -40,10 +40,6 @@ module Playbook
40
40
  prop :pill_color, type: Playbook::Props::Enum,
41
41
  values: %w[primary neutral success warning error info data_1 data_2 data_3 data_4 data_5 data_6 data_7 data_8 windows siding roofing doors gutters solar insulation accessories],
42
42
  default: "primary"
43
- prop :required, type: Playbook::Props::Boolean,
44
- default: false
45
- prop :validation, type: Playbook::Props::HashProp,
46
- default: {}
47
43
 
48
44
  def classname
49
45
  default_margin_bottom = margin_bottom.present? ? "" : " mb_sm"
@@ -27,7 +27,3 @@
27
27
  .max_width_xxl {
28
28
  max-width: 1320px;
29
29
  }
30
-
31
- .width-resize {
32
- resize: horizontal;
33
- }
@@ -40,6 +40,6 @@
40
40
  min-width: $container_100;
41
41
  }
42
42
 
43
- .width-resize {
43
+ .minwidth-resize {
44
44
  resize: horizontal;
45
45
  }
@@ -7,6 +7,7 @@ export default [
7
7
  "right",
8
8
  "top",
9
9
  "hover",
10
+ "groupHover",
10
11
  "zIndex",
11
12
  "verticalAlign",
12
13
  "truncate",