playbook_ui 16.1.0.pre.alpha.play2771passphraseaccessibility14033 → 16.1.0.pre.alpha.play264213817

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 (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_card/docs/_card_light.html.erb +35 -3
  3. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +5 -14
  4. data/app/pb_kits/playbook/pb_dialog/_dialog.scss +6 -8
  5. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -6
  6. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +2 -37
  7. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -6
  8. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -4
  9. data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +2 -2
  10. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +0 -6
  11. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +0 -94
  12. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +1 -5
  13. data/app/pb_kits/playbook/pb_dropdown/index.js +4 -59
  14. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownContainer.tsx +0 -3
  15. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +1 -2
  16. data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +1 -1
  17. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +2 -2
  18. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +9 -16
  19. data/app/pb_kits/playbook/pb_filter/filter.rb +2 -2
  20. data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.html.erb +0 -2
  21. data/app/pb_kits/playbook/pb_form/pb_form_validation.js +2 -9
  22. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +5 -5
  23. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +4 -4
  24. data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +0 -4
  25. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +7 -40
  26. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_meter_settings.jsx +0 -1
  27. data/app/pb_kits/playbook/pb_passphrase/docs/example.yml +0 -2
  28. data/app/pb_kits/playbook/pb_passphrase/docs/index.js +0 -1
  29. data/app/pb_kits/playbook/pb_passphrase/passphrase.rb +0 -2
  30. data/app/pb_kits/playbook/pb_passphrase/passphrase.test.jsx +1 -30
  31. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +0 -3
  32. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +0 -2
  33. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
  34. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -3
  35. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +3 -34
  36. data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +0 -10
  37. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default.html.erb +3 -3
  38. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default.jsx +0 -3
  39. data/app/pb_kits/playbook/pb_textarea/textarea.html.erb +9 -25
  40. data/app/pb_kits/playbook/pb_textarea/textarea.rb +1 -7
  41. data/app/pb_kits/playbook/pb_time_picker/_time_picker.tsx +11 -97
  42. data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_on_handler.jsx +2 -5
  43. data/app/pb_kits/playbook/pb_time_picker/docs/example.yml +0 -2
  44. data/app/pb_kits/playbook/pb_time_picker/docs/index.js +0 -1
  45. data/app/pb_kits/playbook/pb_time_picker/time_picker.rb +0 -3
  46. data/app/pb_kits/playbook/pb_time_picker/time_picker.test.jsx +1 -47
  47. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +1 -24
  48. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -2
  49. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -4
  50. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb +1 -1
  51. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.jsx +1 -1
  52. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +0 -4
  53. data/dist/chunks/_typeahead-B9a6ZsEP.js +1 -0
  54. data/dist/chunks/vendor.js +3 -3
  55. data/dist/menu.yml +1 -1
  56. data/dist/playbook-rails-react-bindings.js +1 -1
  57. data/dist/playbook-rails.js +1 -1
  58. data/dist/playbook.css +1 -1
  59. data/lib/playbook/forms/builder/phone_number_field.rb +0 -9
  60. data/lib/playbook/truncate.rb +1 -1
  61. data/lib/playbook/version.rb +1 -1
  62. metadata +3 -26
  63. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.md +0 -1
  64. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection_rails.md +0 -3
  65. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection_react.md +0 -3
  66. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.html.erb +0 -52
  67. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.jsx +0 -72
  68. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.md +0 -5
  69. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height.jsx +0 -33
  70. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_rails.html.erb +0 -20
  71. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_rails.md +0 -8
  72. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_react.md +0 -8
  73. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.html.erb +0 -9
  74. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.jsx +0 -33
  75. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.md +0 -3
  76. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_required_indicator.html.erb +0 -7
  77. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_required_indicator.jsx +0 -24
  78. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_required_indicator.md +0 -3
  79. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_required_indicator.html.erb +0 -5
  80. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_required_indicator.jsx +0 -14
  81. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_required_indicator.md +0 -3
  82. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default.md +0 -1
  83. data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_required_indicator.html.erb +0 -6
  84. data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_required_indicator.jsx +0 -16
  85. data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_required_indicator.md +0 -3
  86. data/dist/chunks/_typeahead-D-8xZ__X.js +0 -1
@@ -5,15 +5,6 @@ module Playbook
5
5
  class Builder
6
6
  def phone_number_field(name, props: {})
7
7
  props[:name] = name
8
-
9
- if props[:label] == true && props[:required_indicator]
10
- props[:label] = if @object && @object.class.respond_to?(:human_attribute_name)
11
- @object.class.human_attribute_name(name)
12
- else
13
- name.to_s.humanize
14
- end
15
- end
16
-
17
8
  @template.pb_rails("phone_number_input", props: props)
18
9
  end
19
10
  end
@@ -11,7 +11,7 @@ module Playbook
11
11
  return nil unless selected_props.present?
12
12
 
13
13
  selected_props.map do |k|
14
- truncate_value = send(k).to_s
14
+ truncate_value = send(k)
15
15
  "truncate_#{truncate_value}" if truncate_values.include? truncate_value
16
16
  end.compact.join(" ")
17
17
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "16.1.0"
5
- VERSION = "16.1.0.pre.alpha.play2771passphraseaccessibility14033"
5
+ VERSION = "16.1.0.pre.alpha.play264213817"
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: 16.1.0.pre.alpha.play2771passphraseaccessibility14033
4
+ version: 16.1.0.pre.alpha.play264213817
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: 2026-01-30 00:00:00.000000000 Z
12
+ date: 2026-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -955,7 +955,6 @@ files:
955
955
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_anti_patterns.html.erb
956
956
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.html.erb
957
957
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.jsx
958
- - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.md
959
958
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.html.erb
960
959
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.jsx
961
960
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md
@@ -1311,8 +1310,6 @@ files:
1311
1310
  - app/pb_kits/playbook/pb_dropdown/context/index.tsx
1312
1311
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.html.erb
1313
1312
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.jsx
1314
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection_rails.md
1315
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection_react.md
1316
1313
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx
1317
1314
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md
1318
1315
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
@@ -1374,13 +1371,6 @@ files:
1374
1371
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.html.erb
1375
1372
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.jsx
1376
1373
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.md
1377
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.html.erb
1378
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.jsx
1379
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.md
1380
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height.jsx
1381
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_rails.html.erb
1382
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_rails.md
1383
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_react.md
1384
1374
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options.jsx
1385
1375
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options_react.md
1386
1376
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx
@@ -1411,9 +1401,6 @@ files:
1411
1401
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb
1412
1402
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.jsx
1413
1403
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.md
1414
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.html.erb
1415
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.jsx
1416
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.md
1417
1404
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search.jsx
1418
1405
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search.md
1419
1406
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search_rails.html.erb
@@ -2365,9 +2352,6 @@ files:
2365
2352
  - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_meter_settings.html.erb
2366
2353
  - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_meter_settings.jsx
2367
2354
  - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_meter_settings.md
2368
- - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_required_indicator.html.erb
2369
- - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_required_indicator.jsx
2370
- - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_required_indicator.md
2371
2355
  - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.html.erb
2372
2356
  - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx
2373
2357
  - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.md
@@ -2570,9 +2554,6 @@ files:
2570
2554
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.html.erb
2571
2555
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.jsx
2572
2556
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.md
2573
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_required_indicator.html.erb
2574
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_required_indicator.jsx
2575
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_required_indicator.md
2576
2557
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.html.erb
2577
2558
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.jsx
2578
2559
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.md
@@ -3308,7 +3289,6 @@ files:
3308
3289
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_custom.jsx
3309
3290
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_default.html.erb
3310
3291
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_default.jsx
3311
- - app/pb_kits/playbook/pb_textarea/docs/_textarea_default.md
3312
3292
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_default_swift.md
3313
3293
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.html.erb
3314
3294
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.jsx
@@ -3379,9 +3359,6 @@ files:
3379
3359
  - app/pb_kits/playbook/pb_time_picker/docs/_time_picker_min_max_time.md
3380
3360
  - app/pb_kits/playbook/pb_time_picker/docs/_time_picker_on_handler.jsx
3381
3361
  - app/pb_kits/playbook/pb_time_picker/docs/_time_picker_on_handler.md
3382
- - app/pb_kits/playbook/pb_time_picker/docs/_time_picker_required_indicator.html.erb
3383
- - app/pb_kits/playbook/pb_time_picker/docs/_time_picker_required_indicator.jsx
3384
- - app/pb_kits/playbook/pb_time_picker/docs/_time_picker_required_indicator.md
3385
3362
  - app/pb_kits/playbook/pb_time_picker/docs/_time_picker_timezone.html.erb
3386
3363
  - app/pb_kits/playbook/pb_time_picker/docs/_time_picker_timezone.jsx
3387
3364
  - app/pb_kits/playbook/pb_time_picker/docs/_time_picker_timezone.md
@@ -3882,7 +3859,7 @@ files:
3882
3859
  - app/pb_kits/playbook/utilities/text.ts
3883
3860
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3884
3861
  - dist/chunks/_pb_line_graph-BgKF_zz1.js
3885
- - dist/chunks/_typeahead-D-8xZ__X.js
3862
+ - dist/chunks/_typeahead-B9a6ZsEP.js
3886
3863
  - dist/chunks/componentRegistry-DzmmLR2x.js
3887
3864
  - dist/chunks/globalProps-BhVYCqRf.js
3888
3865
  - dist/chunks/lazysizes-B7xYodB-.js
@@ -1 +0,0 @@
1
- `pickerId`/`picker_id` is a **required prop** to instantiate the Date Picker. The presence of `pickerId`/`picker_id` in your Date Picker also associates the label with the input, providing the ability to focus the Date Picker by clicking the label.
@@ -1,3 +0,0 @@
1
- The `blank_selection` prop adds a blank option at the top of the dropdown options list. This allows users to explicitly clear their selection by choosing the blank option.
2
-
3
- The blank selection option appears as the first item in the dropdown and has an empty value (`id: ""`, `value: ""`). When selected, it effectively clears the dropdown selection.
@@ -1,3 +0,0 @@
1
- The `blankSelection` prop adds a blank option at the top of the dropdown options list. This allows users to explicitly clear their selection by choosing the blank option.
2
-
3
- The blank selection option appears as the first item in the dropdown and has an empty value (`id: ""`, `value: ""`). When selected, it effectively clears the dropdown selection.
@@ -1,52 +0,0 @@
1
- <%
2
- options = [
3
- { label: 'United States', value: 'unitedStates', id: 'us' },
4
- { label: 'Canada', value: 'canada', id: 'ca' },
5
- { label: 'Pakistan', value: 'pakistan', id: 'pk' },
6
- ]
7
- %>
8
-
9
- <%= pb_rails("dropdown", props: {
10
- id: "date-range-quickpick-reset-closeable",
11
- label: "Quick Pick",
12
- variant: "quickpick",
13
- clearable: false
14
- }) %>
15
-
16
- <%= pb_rails("button", props: {
17
- margin_y: "md",
18
- text: "Reset",
19
- html_options: {
20
- onclick: "handleReset()"
21
- }
22
- }) %>
23
-
24
- <%= pb_rails("dropdown", props: {
25
- id: "closeable-default",
26
- options: options,
27
- clearable: false,
28
- default_value: options.last,
29
- margin_bottom: "md",
30
- label: "Default"
31
- }) %>
32
-
33
- <%= pb_rails("dropdown", props: {
34
- id: "closeable-subtle",
35
- options: options,
36
- clearable: false,
37
- default_value: options.second,
38
- variant: "subtle",
39
- separators: false,
40
- label: "Subtle"
41
- }) %>
42
-
43
- <script>
44
- function handleReset() {
45
- const dropdown = document.querySelector("#date-range-quickpick-reset-closeable[data-pb-dropdown]");
46
- const instance = dropdown?._pbDropdownInstance;
47
-
48
- if (instance) {
49
- instance.clearSelection();
50
- }
51
- }
52
- </script>
@@ -1,72 +0,0 @@
1
- import React, { useRef } from 'react'
2
-
3
- import Button from '../../pb_button/_button'
4
- import Dropdown from '../../pb_dropdown/_dropdown'
5
-
6
- const DropdownWithClearable = (props) => {
7
- const dropdownRef = useRef(null)
8
-
9
- const options = [
10
- {
11
- label: "United States",
12
- value: "unitedStates",
13
- id: "us"
14
- },
15
- {
16
- label: "Canada",
17
- value: "canada",
18
- id: "ca"
19
- },
20
- {
21
- label: "Pakistan",
22
- value: "pakistan",
23
- id: "pk"
24
- }
25
- ]
26
-
27
- const handleReset = () => {
28
- if (dropdownRef.current) {
29
- dropdownRef.current.clearSelected()
30
- }
31
- }
32
-
33
- return (
34
- <>
35
- <Dropdown
36
- clearable={false}
37
- label="Quick Pick"
38
- onSelect={() => {}}
39
- ref={dropdownRef}
40
- variant="quickpick"
41
- {...props}
42
- />
43
- <Button
44
- marginY="md"
45
- onClick={handleReset}
46
- text="Reset"
47
- />
48
-
49
- <Dropdown
50
- clearable={false}
51
- defaultValue={options[options.length - 1]}
52
- label="Default"
53
- marginBottom="md"
54
- options={options}
55
- variant="default"
56
- {...props}
57
- />
58
-
59
- <Dropdown
60
- clearable={false}
61
- defaultValue={options[1]}
62
- label="Subtle"
63
- options={options}
64
- separators={false}
65
- variant="subtle"
66
- {...props}
67
- />
68
- </>
69
- )
70
- }
71
-
72
- export default DropdownWithClearable
@@ -1,5 +0,0 @@
1
- The `clearable` prop controls whether the clear (X) button appears in the dropdown. When set to `false`, the clear button is hidden.
2
-
3
- This is useful in two scenarios:
4
- 1. When you have a separate "Reset" or "Defaults" button that handles clearing the selection (as shown in the Quick Pick example)
5
- 2. When you don't want to provide any way to clear the selection (as shown in the Default and Subtle examples)
@@ -1,33 +0,0 @@
1
- import React from 'react'
2
- import Dropdown from '../../pb_dropdown/_dropdown'
3
-
4
- const DropdownWithConstrainHeight = (props) => {
5
- // Create a long list of options to demonstrate height constraint
6
- const options = Array.from({ length: 30 }, (_, i) => ({
7
- label: `Option ${i + 1}`,
8
- value: `option_${i + 1}`,
9
- id: `opt_${i + 1}`
10
- }))
11
-
12
- return (
13
- <>
14
- <Dropdown
15
- data={{ testid: "dropdown-no-constrain" }}
16
- label="Without Constrain Height (Default)"
17
- marginBottom="md"
18
- options={options}
19
- {...props}
20
- />
21
-
22
- <Dropdown
23
- constrainHeight
24
- data={{ testid: "dropdown-constrain" }}
25
- label="With Constrain Height"
26
- options={options}
27
- {...props}
28
- />
29
- </>
30
- )
31
- }
32
-
33
- export default DropdownWithConstrainHeight
@@ -1,20 +0,0 @@
1
- <%
2
- # Create a long list of options to demonstrate height constraint
3
- options = (1..30).map do |i|
4
- { label: "Option #{i}", value: "option_#{i}", id: "opt_#{i}" }
5
- end
6
- %>
7
-
8
- <%= pb_rails("dropdown", props: {
9
- id: "dropdown-no-constrain",
10
- options: options,
11
- label: "Without Constrain Height (Default)",
12
- margin_bottom: "md"
13
- }) %>
14
-
15
- <%= pb_rails("dropdown", props: {
16
- id: "dropdown-constrain",
17
- options: options,
18
- constrain_height: true,
19
- label: "With Constrain Height"
20
- }) %>
@@ -1,8 +0,0 @@
1
- The `constrain_height` prop limits the dropdown container height to 18em and enables vertical scrolling when the content exceeds this height. This prevents long dropdown lists from rendering off-screen.
2
-
3
- When `constrain_height` is `true`, the dropdown will:
4
- - Have a maximum height of 18em
5
- - Show a scrollbar when content exceeds the max height
6
- - Prevent the dropdown from extending beyond the viewport
7
-
8
- This is particularly useful for dropdowns with many options, such as long lists or quickpick variants with many date range options.
@@ -1,8 +0,0 @@
1
- The `constrainHeight` prop limits the dropdown container height to 18em and enables vertical scrolling when the content exceeds this height. This prevents long dropdown lists from rendering off-screen.
2
-
3
- When `constrainHeight` is `true`, the dropdown will:
4
- - Have a maximum height of 18em
5
- - Show a scrollbar when content exceeds the max height
6
- - Prevent the dropdown from extending beyond the viewport
7
-
8
- This is particularly useful for dropdowns with many options, such as long lists or quickpick variants with many date range options.
@@ -1,9 +0,0 @@
1
- <%
2
- options = [
3
- { label: 'United States', value: 'unitedStates', id: 'us' },
4
- { label: 'Canada', value: 'canada', id: 'ca' },
5
- { label: 'Pakistan', value: 'pakistan', id: 'pk' },
6
- ]
7
- %>
8
-
9
- <%= pb_rails("dropdown", props: { options: options, placeholder: "Choose a country" }) %>
@@ -1,33 +0,0 @@
1
- import React from 'react'
2
- import Dropdown from '../../pb_dropdown/_dropdown'
3
-
4
- const DropdownWithPlaceholder = (props) => {
5
-
6
- const options = [
7
- {
8
- label: "United States",
9
- value: "unitedStates",
10
- id: "us"
11
- },
12
- {
13
- label: "Canada",
14
- value: "canada",
15
- id: "ca"
16
- },
17
- {
18
- label: "Pakistan",
19
- value: "pakistan",
20
- id: "pk"
21
- }
22
- ];
23
-
24
- return (
25
- <Dropdown
26
- options={options}
27
- placeholder="Choose a country"
28
- {...props}
29
- />
30
- )
31
- }
32
-
33
- export default DropdownWithPlaceholder
@@ -1,3 +0,0 @@
1
- The `placeholder` prop allows you to customize the placeholder text that appears when no option is selected in the dropdown.
2
-
3
- The placeholder prop works with all dropdown variants (`default`, `subtle`, and `quickpick`). When no option is selected, the placeholder text is displayed. When an option is selected, the placeholder is replaced by the selected option's label. The default placeholder text is "Select..." if no placeholder is provided.
@@ -1,7 +0,0 @@
1
- <%= pb_rails("passphrase", props: {
2
- id: "passphrase_required_indicator",
3
- label: "Passphrase",
4
- placeholder: "Enter passphrase",
5
- required_indicator: true,
6
- value: "passphrase",
7
- }) %>
@@ -1,24 +0,0 @@
1
- import React, { useState } from 'react'
2
-
3
- import Passphrase from '../_passphrase'
4
-
5
- const PassphraseRequiredIndicator = (props) => {
6
- const [passphrase, setPassphrase] = useState('')
7
- const handleOnChangePassphrase = (e) => {
8
- setPassphrase(e.target ? e.target.value : e)
9
- }
10
-
11
- return (
12
- <Passphrase
13
- id="passphrase_required_indicator"
14
- label="Passphrase"
15
- name="passphrase"
16
- onChange={handleOnChangePassphrase}
17
- requiredIndicator
18
- value={passphrase}
19
- {...props}
20
- />
21
- )
22
- }
23
-
24
- export default PassphraseRequiredIndicator
@@ -1,3 +0,0 @@
1
- The `requiredIndicator`/`required_indicator` prop displays a red asterisk (*) next to the label, visually indicating that the field is required. This is purely visual and does not enforce validation.
2
-
3
- You can use `requiredIndicator`/`required_indicator` with any validation approach: HTML5 validation via the `required` prop, client-side validation, or backend validation. For this reason, it works independently and doesn't need to be paired with the `required` prop.
@@ -1,5 +0,0 @@
1
- <%= pb_rails("phone_number_input", props: {
2
- id: "phone_number_input_required_indicator",
3
- label: "Required Phone Number",
4
- required_indicator: true,
5
- }) %>
@@ -1,14 +0,0 @@
1
- import React from 'react'
2
- import PhoneNumberInput from '../../pb_phone_number_input/_phone_number_input'
3
-
4
- const PhoneNumberInputRequiredIndicator = (props) => (
5
- <>
6
- <PhoneNumberInput
7
- id='phone_number_input_required_indicator'
8
- label='Phone Number'
9
- requiredIndicator
10
- {...props} />
11
- </>
12
- )
13
-
14
- export default PhoneNumberInputRequiredIndicator
@@ -1,3 +0,0 @@
1
- The `requiredIndicator`/`required_indicator` prop displays a red asterisk (*) next to the label, visually indicating that the field is required. This is purely visual and does not enforce validation.
2
-
3
- You can use `requiredIndicator`/`required_indicator` with any validation approach: HTML5 validation via the `required` prop, client-side validation, or backend validation. For this reason, it works independently and doesn't need to be paired with the `required` prop.
@@ -1 +0,0 @@
1
- Add an `id` to your Textarea so that clicking the label will move focus directly to the input.
@@ -1,6 +0,0 @@
1
- <%= pb_rails("time_picker", props: {
2
- id: "time-picker-required-indicator",
3
- label: "Select Time",
4
- required_indicator: true,
5
- }) %>
6
-
@@ -1,16 +0,0 @@
1
- import React from 'react'
2
- import TimePicker from '../_time_picker'
3
-
4
- const TimePickerRequiredIndicator = (props) => (
5
- <div>
6
- <TimePicker
7
- id="time-picker-required-indicator"
8
- label="Select Time"
9
- requiredIndicator
10
- {...props}
11
- />
12
- </div>
13
- )
14
-
15
- export default TimePickerRequiredIndicator
16
-
@@ -1,3 +0,0 @@
1
- The `requiredIndicator`/`required_indicator` prop displays a red asterisk (*) next to the label, visually indicating that the field is required. This is purely visual and does not enforce validation.
2
-
3
- You can use `requiredIndicator`/`required_indicator` with any validation approach: HTML5 validation via the `required` prop, client-side validation, or backend validation. For this reason, it works independently and doesn't need to be paired with the `required` prop.