playbook_ui_docs 16.1.0.pre.alpha.PLAY2800textinputtextareaaccessiblebordercontrast14296 → 16.1.0.pre.alpha.PLAY272013809

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 (101) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.md +1 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
  5. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +0 -2
  6. data/app/pb_kits/playbook/pb_checkbox/docs/index.js +0 -1
  7. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -2
  8. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -2
  9. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +1 -1
  10. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb +3 -6
  11. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.jsx +0 -1
  12. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.md +1 -3
  13. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +2 -8
  14. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -5
  15. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +2 -2
  16. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +9 -16
  17. data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.html.erb +2 -156
  18. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_button.html.erb +1 -1
  19. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_button.jsx +0 -1
  20. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_date_picker.html.erb +1 -1
  21. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_date_picker.jsx +0 -1
  22. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_default.html.erb +3 -3
  23. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_default.jsx +1 -4
  24. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_full_width.html.erb +4 -4
  25. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_full_width.jsx +1 -4
  26. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_typeahead.jsx +0 -1
  27. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +5 -5
  28. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +4 -4
  29. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb +3 -3
  30. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx +7 -4
  31. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +0 -2
  32. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +17 -18
  33. data/app/pb_kits/playbook/pb_nav/docs/example.yml +6 -2
  34. data/app/pb_kits/playbook/pb_nav/docs/index.js +1 -2
  35. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_meter_settings.jsx +0 -1
  36. data/app/pb_kits/playbook/pb_passphrase/docs/example.yml +0 -2
  37. data/app/pb_kits/playbook/pb_passphrase/docs/index.js +0 -1
  38. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +0 -2
  39. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
  40. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_required_indicator.jsx +0 -1
  41. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_required_indicator.jsx +0 -1
  42. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +0 -2
  43. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +0 -2
  44. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled.jsx +13 -11
  45. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default.html.erb +3 -3
  46. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default.jsx +0 -3
  47. data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_on_handler.jsx +2 -5
  48. data/app/pb_kits/playbook/pb_time_picker/docs/example.yml +0 -2
  49. data/app/pb_kits/playbook/pb_time_picker/docs/index.js +0 -1
  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/docs/example.yml +0 -2
  53. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +21 -22
  54. metadata +2 -49
  55. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_custom.jsx +0 -71
  56. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_custom.md +0 -4
  57. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_required_indicator.html.erb +0 -6
  58. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_required_indicator.jsx +0 -17
  59. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_required_indicator.md +0 -3
  60. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.md +0 -1
  61. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_required_indicator.html.erb +0 -5
  62. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_required_indicator.jsx +0 -13
  63. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_required_indicator.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_required_indicator.html.erb +0 -14
  67. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_required_indicator.jsx +0 -42
  68. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_required_indicator.md +0 -3
  69. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.html.erb +0 -52
  70. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.jsx +0 -72
  71. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.md +0 -5
  72. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height.jsx +0 -33
  73. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_rails.html.erb +0 -20
  74. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_rails.md +0 -8
  75. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_react.md +0 -8
  76. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.html.erb +0 -9
  77. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.jsx +0 -33
  78. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.md +0 -3
  79. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.md +0 -3
  80. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_required_indicator.html.erb +0 -72
  81. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_required_indicator.jsx +0 -87
  82. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_required_indicator.md +0 -3
  83. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_disabled_item.html.erb +0 -24
  84. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_disabled_item.jsx +0 -87
  85. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_required_indicator.html.erb +0 -7
  86. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_required_indicator.jsx +0 -24
  87. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_required_indicator.md +0 -3
  88. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_required_indicator.html.erb +0 -5
  89. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_required_indicator.jsx +0 -14
  90. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_required_indicator.md +0 -3
  91. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_label.jsx +0 -44
  92. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_label.md +0 -1
  93. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_label.jsx +0 -28
  94. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_label.md +0 -1
  95. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default.md +0 -1
  96. data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_required_indicator.html.erb +0 -6
  97. data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_required_indicator.jsx +0 -16
  98. data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_required_indicator.md +0 -3
  99. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_required_indicator.html.erb +0 -16
  100. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_required_indicator.jsx +0 -23
  101. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_required_indicator.md +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe735c5a8eb36ec9fde01399f75b1e30fd63b56558ad2d7a4cebb9e5d3d77c77
4
- data.tar.gz: d012ce9fe763c376f05f4fad4ad32f58044d7861ac998b02daf69dc68420f1d2
3
+ metadata.gz: fd7d3e665b120ab4cca835e09d1f6f80671b7ead1ae88343669f067462ccb81f
4
+ data.tar.gz: bdf0512a285aff8fa341a19cd6d51170d31c77c2995acfdaeabbdac534e2bdd7
5
5
  SHA512:
6
- metadata.gz: b8354ca5aa5dc48f89ac25d85bcc71e449f64d64590043f519eebaf9bb99477caa1e8f989a04491544760e31e661ba4607323fe5d193fcc01942338f7d486dd5
7
- data.tar.gz: 7f0e8b75b845b8c6957a098163097ec6156091d6ef94df38280223c38f8e5a20c8bc355f9c9d4a1c2d311167a9f290a69109b45ab0d7005077375094f9cf7292
6
+ metadata.gz: d33ed49e4c1e3883f00db066f7922408f5d80557d93375c39f1d0f596cb0859abbd025d880ec173b0ff25ca1be347c299d72a550586fb869cb59282b9aa86451
7
+ data.tar.gz: fe17457ab801ae807b2c6bda81af6aaa0592e2e4cd595237baa71b3e61ba12563a87c3af7109a0a8e6c5ce9c1a115bb7399bb5c2a4ea46c334d3a1222cb8ac42
@@ -2,4 +2,4 @@ the `enableSorting` prop is a boolean prop set to false by default. If true, the
2
2
 
3
3
  ### sortIcon
4
4
 
5
- An optional prop, `sortIcon` allows you to customize your icon sets by passing it an array of any comma-separated pair of icon values. The first icon value will replace the kit's default icon when sort direction is desc, and the second value will replace the default icon when sort direction is asc. `sortIcon` also allows you to pass it a single icon as a string, in which case the icon will not toggle with the sort state. Default for this prop is `["arrow-up-wide-short", "arrow-down-short-wide"]`. All strings must be valid FA icons.
5
+ An optional prop, `sortIcon` allows you to customize your icon sets by passing it an array of any comma-separated pair of icon values. The first icon value will replace the kit's default icon when sort direction is desc, and the second value will replace the default icon when sort direction is asc. `sortIcon` also allows you to pass it a single icon as a string, in which case the icon will not toggle with the sort state. Default for this prop is `["arrow-up-short-wide", "arrow-down-short-wide"]`. All strings must be valid FA icons.
@@ -78,7 +78,6 @@ examples:
78
78
  - advanced_table_column_styling: Column Styling
79
79
  - advanced_table_column_styling_column_headers: Column Styling with Multiple Headers
80
80
  - advanced_table_column_styling_background: Column Styling Background Color
81
- - advanced_table_column_styling_background_custom: Column Styling Background Color (Custom)
82
81
  - advanced_table_column_styling_background_multi: Column Styling Background Color with Multiple Headers
83
82
  - advanced_table_padding_control: Padding Control using Column Styling
84
83
  - advanced_table_column_border_color: Column Group Border Color
@@ -47,5 +47,4 @@ export { default as AdvancedTableSortPerColumnForMultiColumn } from './_advanced
47
47
  export { default as AdvancedTablePaddingControl } from './_advanced_table_padding_control.jsx'
48
48
  export { default as AdvancedTablePaddingControlPerRow } from './_advanced_table_padding_control_per_row.jsx'
49
49
  export { default as AdvancedTableColumnStylingBackground } from './_advanced_table_column_styling_background.jsx'
50
- export { default as AdvancedTableColumnStylingBackgroundMulti } from './_advanced_table_column_styling_background_multi.jsx'
51
- export { default as AdvancedTableColumnStylingBackgroundCustom } from './_advanced_table_column_styling_background_custom.jsx'
50
+ export { default as AdvancedTableColumnStylingBackgroundMulti } from './_advanced_table_column_styling_background_multi.jsx'
@@ -8,7 +8,6 @@ examples:
8
8
  - checkbox_indeterminate: Indeterminate Checkbox
9
9
  - checkbox_disabled: Disabled Checkbox
10
10
  - checkbox_form: Form and Hidden Input
11
- # - checkbox_required_indicator: Required Indicator
12
11
 
13
12
  react:
14
13
  - checkbox_default: Default
@@ -18,7 +17,6 @@ examples:
18
17
  - checkbox_error: Default w/ Error
19
18
  - checkbox_indeterminate: Indeterminate Checkbox
20
19
  - checkbox_disabled: Disabled Checkbox
21
- # - checkbox_required_indicator: Required Indicator
22
20
 
23
21
  swift:
24
22
  - checkbox_default_swift: Default
@@ -5,4 +5,3 @@ export { default as CheckboxError } from './_checkbox_error.jsx'
5
5
  export { default as CheckboxChecked } from './_checkbox_checked.jsx'
6
6
  export { default as CheckboxIndeterminate } from './_checkbox_indeterminate.jsx'
7
7
  export { default as CheckboxDisabled } from './_checkbox_disabled.jsx'
8
- export { default as CheckboxRequiredIndicator } from './_checkbox_required_indicator.jsx'
@@ -31,7 +31,6 @@ examples:
31
31
  - date_picker_time: Time Selection
32
32
  - date_picker_positions: Custom Positions
33
33
  - date_picker_positions_element: Custom Position (based on element)
34
- - date_picker_required_indicator: Required Indicator
35
34
  - date_picker_turbo_frames: Within Turbo Frames
36
35
 
37
36
  react:
@@ -65,4 +64,3 @@ examples:
65
64
  - date_picker_time: Time Selection
66
65
  - date_picker_positions: Custom Positions
67
66
  - date_picker_positions_element: Custom Position (based on element)
68
- - date_picker_required_indicator: Required Indicator
@@ -27,5 +27,4 @@ export { default as DatePickerQuickPickCustom } from './_date_picker_quick_pick_
27
27
  export { default as DatePickerQuickPickCustomOverride } from './_date_picker_quick_pick_custom_override'
28
28
  export { default as DatePickerQuickPickDefaultDate } from './_date_picker_quick_pick_default_date'
29
29
  export { default as DatePickerRangePattern } from './_date_picker_range_pattern'
30
- export { default as DatePickerAndDropdownRange } from './_date_picker_and_dropdown_range.jsx'
31
- export { default as DatePickerRequiredIndicator } from "./_date_picker_required_indicator.jsx";
30
+ export { default as DatePickerAndDropdownRange } from './_date_picker_and_dropdown_range.jsx'
@@ -76,7 +76,7 @@
76
76
  const option = e.detail;
77
77
  const dropdown = e.target;
78
78
 
79
- const display = dropdown.querySelector("[data-dropdown-trigger-custom-display]");
79
+ const display = dropdown.querySelector("#dropdown_trigger_custom_display");
80
80
  if (!display) return;
81
81
 
82
82
  const nameEl = display.querySelector("#dropdown-avatar-name");
@@ -1,13 +1,10 @@
1
- <%
1
+ <%
2
2
  options = [
3
3
  { label: 'United States', value: 'unitedStates', id: 'us' },
4
4
  { label: 'Canada', value: 'canada', id: 'ca' },
5
5
  { label: 'Pakistan', value: 'pakistan', id: 'pk' },
6
6
  ]
7
+
7
8
  %>
8
9
 
9
- <%= pb_rails("dropdown", props: {
10
- id: "select_a_country",
11
- label: "Select a Country",
12
- options: options
13
- }) %>
10
+ <%= pb_rails("dropdown", props: {options: options, label: "Select a Country"}) %>
@@ -25,7 +25,6 @@ const DropdownDefault = (props) => {
25
25
  return (
26
26
  <div>
27
27
  <Dropdown
28
- id="select_a_country"
29
28
  label="Select a Country"
30
29
  options={options}
31
30
  {...props}
@@ -1,3 +1 @@
1
- The top-level Dropdown component optionally accepts any string through a `label` prop to produce a label above your trigger element.
2
-
3
- Add an `id` to wire the label to the trigger so that clicking the label will move focus directly to the input, and open the drop-down.
1
+ The top-level Dropdown component optionally accepts any string through a `label` prop to produce a label above your trigger element.
@@ -21,17 +21,13 @@ examples:
21
21
  - dropdown_default_value: Default Value
22
22
  - dropdown_multi_select_with_default: Multi Select Default Value
23
23
  - dropdown_blank_selection: Blank Selection
24
- - dropdown_with_placeholder: Placeholder
25
24
  - dropdown_separators_hidden: Separators Hidden
26
- - dropdown_with_clearable: Clearable
27
- - dropdown_with_constrain_height_rails: Constrain Height
28
25
  - dropdown_quickpick_rails: Quick Pick Variant
29
26
  - dropdown_quickpick_range_end_rails: Quick Pick Variant (Range Ends Today)
30
27
  - dropdown_quickpick_default_dates: Quick Pick Variant (Default Dates)
31
28
  - dropdown_quickpick_custom_rails: Quick Pick Variant (Custom Quick Pick Dates)
32
29
  - dropdown_quickpick_with_date_pickers_rails: Quick Pick with Date Pickers
33
30
  - dropdown_quickpick_with_date_pickers_default_rails: Quick Pick with Date Pickers (Default Value)
34
- - dropdown_required_indicator: Required Indicator
35
31
 
36
32
  react:
37
33
  - dropdown_default: Default
@@ -56,10 +52,7 @@ examples:
56
52
  - dropdown_default_value: Default Value
57
53
  - dropdown_multi_select_with_default: Multi Select Default Value
58
54
  - dropdown_blank_selection: Blank Selection
59
- - dropdown_with_placeholder: Placeholder
60
55
  - dropdown_clear_selection: Clear Selection
61
- - dropdown_with_clearable: Clearable
62
- - dropdown_with_constrain_height: Constrain Height
63
56
  - dropdown_separators_hidden: Separators Hidden
64
57
  - dropdown_with_external_control: useDropdown Hook
65
58
  - dropdown_quickpick: Quick Pick Variant
@@ -67,4 +60,5 @@ examples:
67
60
  - dropdown_quickpick_default_dates: Quick Pick Variant (Default Dates)
68
61
  - dropdown_quickpick_custom: Quick Pick Variant (Custom Quick Pick Dates)
69
62
  - dropdown_quickpick_with_date_pickers: Quick Pick Variant with Date Pickers
70
- - dropdown_required_indicator: Required Indicator
63
+
64
+
@@ -11,7 +11,6 @@ export { default as DropdownSubcomponentStructure } from './_dropdown_subcompone
11
11
  export { default as DropdownError } from './_dropdown_error.jsx'
12
12
  export { default as DropdownDefaultValue } from './_dropdown_default_value.jsx'
13
13
  export { default as DropdownBlankSelection } from './_dropdown_blank_selection.jsx'
14
- export { default as DropdownWithPlaceholder } from './_dropdown_with_placeholder.jsx'
15
14
  export { default as DropdownClearSelection } from './_dropdown_clear_selection.jsx'
16
15
  export { default as DropdownSubtleVariant } from './_dropdown_subtle_variant.jsx'
17
16
  export { default as DropdownSeparatorsHidden } from './_dropdown_separators_hidden.jsx'
@@ -28,7 +27,4 @@ export { default as DropdownQuickpick } from './_dropdown_quickpick.jsx'
28
27
  export { default as DropdownQuickpickRangeEnd } from './_dropdown_quickpick_range_end.jsx'
29
28
  export { default as DropdownQuickpickDefaultDates } from './_dropdown_quickpick_default_dates.jsx'
30
29
  export { default as DropdownQuickpickWithDatePickers } from './_dropdown_quickpick_with_date_pickers.jsx'
31
- export { default as DropdownQuickpickCustom } from './_dropdown_quickpick_custom.jsx'
32
- export { default as DropdownWithClearable } from './_dropdown_with_clearable.jsx'
33
- export { default as DropdownWithConstrainHeight } from './_dropdown_with_constrain_height.jsx'
34
- export { default as DropdownRequiredIndicator } from "./_dropdown_required_indicator.jsx";
30
+ export { default as DropdownQuickpickCustom } from './_dropdown_quickpick_custom.jsx'
@@ -1,7 +1,7 @@
1
1
  <%=
2
2
  pb_rails("filter", props: {
3
3
  min_width: "360px",
4
- id: "filter-demo-1",
4
+ id: "1",
5
5
  margin_bottom: "xl",
6
6
  filters: [
7
7
  { name: "name", value: "John Wick" },
@@ -44,7 +44,7 @@
44
44
  <%=
45
45
  pb_rails("filter", props: {
46
46
  min_width: "360px",
47
- id: "filter-demo-2",
47
+ id: "def2",
48
48
  sort_menu: [
49
49
  { item: "Popularity", link: "?q[sorts]=managers_popularity+asc", active: true, direction: "desc" },
50
50
  { item: "Mananger's Title", link: "?q[sorts]=managers_title+asc", active: false },
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react'
1
+ import React from 'react'
2
2
 
3
3
  import Button from '../../pb_button/_button'
4
4
  import Filter from '../../pb_filter/_filter'
@@ -6,18 +6,11 @@ import Flex from '../../pb_flex/_flex'
6
6
  import Select from '../../pb_select/_select'
7
7
  import TextInput from '../../pb_text_input/_text_input'
8
8
 
9
- const FilterDefault = (props) => {
10
- const [sortValue, setSortValue] = useState([{ name: 'popularity', dir: 'desc' }])
11
- const [sortValue2, setSortValue2] = useState([{ name: 'popularity', dir: 'desc' }])
12
-
13
- const handleSortChange = (sortOptions) => {
14
- setSortValue(sortOptions)
15
- alert(JSON.stringify(sortOptions[0]))
16
- }
9
+ const SortingChangeCallback = (sortOptions) => {
10
+ alert(JSON.stringify(sortOptions[0]))
11
+ }
17
12
 
18
- const handleSortChange2 = (sortOptions) => {
19
- setSortValue2(sortOptions)
20
- }
13
+ const FilterDefault = (props) => {
21
14
  const options = [
22
15
  { value: 'USA' },
23
16
  { value: 'Canada' },
@@ -36,7 +29,7 @@ const FilterDefault = (props) => {
36
29
  }}
37
30
  marginBottom="xl"
38
31
  minWidth="375px"
39
- onSortChange={handleSortChange}
32
+ onSortChange={SortingChangeCallback}
40
33
  results={1}
41
34
  sortOptions={{
42
35
  popularity: 'Popularity',
@@ -45,7 +38,7 @@ const FilterDefault = (props) => {
45
38
  // eslint-disable-next-line
46
39
  manager_name: 'Manager\'s Name',
47
40
  }}
48
- sortValue={sortValue}
41
+ sortValue={[{ name: 'popularity', dir: 'desc' }]}
49
42
  {...props}
50
43
  >
51
44
  {({ closePopover }) => (
@@ -89,7 +82,7 @@ const FilterDefault = (props) => {
89
82
  <Filter
90
83
  double
91
84
  minWidth="375px"
92
- onSortChange={handleSortChange2}
85
+ onSortChange={SortingChangeCallback}
93
86
  results={0}
94
87
  sortOptions={{
95
88
  popularity: 'Popularity',
@@ -98,7 +91,7 @@ const FilterDefault = (props) => {
98
91
  // eslint-disable-next-line
99
92
  manager_name: 'Manager\'s Name',
100
93
  }}
101
- sortValue={sortValue2}
94
+ sortValue={[{ name: 'popularity', dir: 'desc' }]}
102
95
  {...props}
103
96
  >
104
97
  {({ closePopover }) => (
@@ -1,167 +1,13 @@
1
- <% tree_data = [
2
- {
3
- label: "HQ",
4
- value: "hQ",
5
- id: "hq",
6
- },
7
- {
8
- label: "Philadelphia",
9
- value: "philadelphia",
10
- id: "phl",
11
- children: [
12
- {
13
- label: "Marketing & Sales PHL",
14
- value: "marketingAndSalesPhl",
15
- id: "marketingPHL",
16
- },
17
- {
18
- label: "Installation Office PHL",
19
- value: "installationOfficePhl",
20
- id: "installationPHL",
21
- },
22
- {
23
- label: "Warehouse PHL",
24
- value: "warehousePhl",
25
- id: "warehousePHL",
26
- },
27
- ]
28
- },
29
- {
30
- label: "New Jersey",
31
- value: "newJersey",
32
- id: "nj",
33
- children: [
34
- {
35
- label: "New Jersey",
36
- value: "newJersey",
37
- id: "nj1",
38
- children: [
39
- {
40
- label: "Marketing & Sales NJ",
41
- value: "marketingAndSalesNj",
42
- id: "marketingNJ",
43
- },
44
- {
45
- label: "Installation Office NJ",
46
- value: "installationOfficeNj",
47
- id: "installationNJ",
48
- },
49
- {
50
- label: "Warehouse NJ",
51
- value: "warehouseNj",
52
- id: "warehouseNJ",
53
- },
54
- ],
55
- },
56
- {
57
- label: "Princeton",
58
- value: "princeton",
59
- id: "princeton",
60
- children: [
61
- {
62
- label: "Marketing & Sales Princeton",
63
- value: "marketingAndSalesPrinceton",
64
- id: "marketingPR",
65
- },
66
- {
67
- label: "Installation Office Princeton",
68
- value: "installationOfficePrinceton",
69
- id: "installationPR",
70
- },
71
- {
72
- label: "Warehouse Princeton",
73
- value: "warehousePrinceton",
74
- id: "warehousePR",
75
- },
76
- ]
77
- },
78
- ]
79
- },
80
- {
81
- label: "Maryland",
82
- value: "maryland",
83
- id: "MD",
84
- children: [
85
- {
86
- label: "Marketing & Sales MD",
87
- value: "marketingAndSalesMd",
88
- id: "marketingMD",
89
- },
90
- {
91
- label: "Installation Office MD",
92
- value: "installationOfficeMd",
93
- id: "installationMD",
94
- },
95
- {
96
- label: "Warehouse MD",
97
- value: "warehouseMd",
98
- id: "warehouseMD",
99
- },
100
- ]
101
- },
102
- {
103
- label: "Connecticut",
104
- value: "connecticut",
105
- id: "CT",
106
- children: [
107
- {
108
- label: "Marketing & Sales CT",
109
- value: "marketingAndSalesCt",
110
- id: "marketingCT",
111
- },
112
- {
113
- label: "Installation Office CT",
114
- value: "installationOfficeCt",
115
- id: "installationCT",
116
- },
117
- {
118
- label: "Warehouse CT",
119
- value: "warehouseCt",
120
- id: "warehouseCT",
121
- },
122
- ]
123
- },
124
- ]; %>
125
- <%
126
- example_dropdown_options = [
127
- { label: 'United States', value: 'United States', id: 'us' },
128
- { label: 'Canada', value: 'Canada', id: 'ca' },
129
- { label: 'Pakistan', value: 'Pakistan', id: 'pk' }
130
- ]
131
- %>
132
-
133
1
  <%= pb_form_with(scope: :example, url: "", method: :get, validate: true) do |form| %>
134
- <%= form.typeahead :example_typeahead_field, props: { label: true, required: true, required_indicator: true } %>
135
2
  <%= form.text_field :example_text_field, props: { label: true, required: true, required_indicator: true } %>
136
3
  <%= form.text_field :example_text_field_2, props: { label: "Text Field Custom Label", required: true, required_indicator: true } %>
137
- <%= form.phone_number_field :example_phone_number_field, props: { label: true, required: true, required_indicator: true } %>
4
+ <%= form.text_area :example_text_area, props: { label: true, required: true, required_indicator: true } %>
5
+ <%= form.text_area :example_text_area_2, props: { label: "Textarea Custom Label", required: true, required_indicator: true } %>
138
6
  <%= form.email_field :example_email_field, props: { label: true, required: true, required_indicator: true } %>
139
7
  <%= form.number_field :example_number_field, props: { label: true, required: true, required_indicator: true } %>
140
8
  <%= form.search_field :example_search_field, props: { label: true, required: true, required_indicator: true } %>
141
9
  <%= form.password_field :example_password_field, props: { label: true, required: true, required_indicator: true } %>
142
10
  <%= form.url_field :example_url_field, props: { label: true, required: true, required_indicator: true } %>
143
- <%= form.text_area :example_text_area, props: { label: true, required: true, required_indicator: true } %>
144
- <%= form.text_area :example_text_area_2, props: { label: "Textarea Custom Label", required: true, required_indicator: true } %>
145
- <%# form.check_box :example_checkbox, props: { label: true, text: "Checkbox Label", required: true, required_indicator: true } %>
146
- <%= form.time_picker :example_time_picker_required_indicator, props: { label: true, required: true, required_indicator: true } %>
147
- <%= form.date_picker :example_date_picker_required_indicator, props: { label: true, required: true, required_indicator: true } %>
148
- <%= form.date_picker :example_date_picker_required_indicator_custom, props: { label: "Custom Date Picker Label", required: true, required_indicator: true } %>
149
- <%= form.multi_level_select :example_multi_level_select_required_indicator, props: {
150
- label: true,
151
- margin_y: 'sm',
152
- required: true,
153
- required_indicator: true,
154
- tree_data: tree_data
155
- } %>
156
- <%= form.multi_level_select :example_multi_level_select_required_indicator_custom, props: {
157
- label: "Custom Multi Level Select Label",
158
- margin_y: 'sm',
159
- required: true,
160
- required_indicator: true,
161
- tree_data: tree_data
162
- } %>
163
- <%= form.dropdown_field :example_dropdown, props: { label: true, options: example_dropdown_options, required: true, required_indicator: true } %>
164
- <%= form.dropdown_field :example_dropdown_2, props: { label: "Dropdown Custom Label", options: example_dropdown_options, required: true, required_indicator: true } %>
165
11
 
166
12
  <%= form.actions do |action| %>
167
13
  <%= action.submit %>
@@ -1,6 +1,6 @@
1
1
  <div>
2
2
  <%= pb_rails("form_group") do %>
3
- <%= pb_rails("text_input", props: { label: "with label", placeholder: "Search", id: "search-with-label" }) %>
3
+ <%= pb_rails("text_input", props: { label: "with label", placeholder: "Search" }) %>
4
4
  <%= pb_rails("button", props: { text: "Submit", variant: "secondary" }) %>
5
5
  <% end %>
6
6
  <br/>
@@ -9,7 +9,6 @@ const FormGroupButton = (props) => (
9
9
  <div>
10
10
  <FormGroup>
11
11
  <TextInput
12
- id="search-with-label"
13
12
  label="With Label"
14
13
  placeholder="Search"
15
14
  {...props}
@@ -1,6 +1,6 @@
1
1
  <div>
2
2
  <%= pb_rails("form_group") do %>
3
- <%= pb_rails("text_input", props: { label: "Event", placeholder: "Event Name", id: "event-name" }) %>
3
+ <%= pb_rails("text_input", props: { label: "Event", placeholder: "Event Name" }) %>
4
4
  <%= pb_rails("date_picker", props: { label: "Event Date", picker_id: "date-picker-default" }) %>
5
5
  <% end %>
6
6
  </div>
@@ -9,7 +9,6 @@ const FormGroupDatePicker = (props) => (
9
9
  <div>
10
10
  <FormGroup>
11
11
  <TextInput
12
- id="event-name"
13
12
  label="Event"
14
13
  placeholder="Event Name"
15
14
  {...props}
@@ -1,7 +1,7 @@
1
1
  <div>
2
2
  <%= pb_rails("form_group") do %>
3
- <%= pb_rails("text_input", props: { label: "First Name", placeholder: "Enter First Name", id: "first-name" }) %>
4
- <%= pb_rails("text_input", props: { label: "Middle Initial", placeholder: "Enter Middle Initial", id: "middle-initial" }) %>
5
- <%= pb_rails("text_input", props: { label: "Last Name", placeholder: "Enter Last Name", id: "last-name" }) %>
3
+ <%= pb_rails("text_input", props: { label: "First Name", placeholder: "Enter First Name" }) %>
4
+ <%= pb_rails("text_input", props: { label: "Middle Intial", placeholder: "Enter Middle Initial" }) %>
5
+ <%= pb_rails("text_input", props: { label: "Last Name", placeholder: "Enter Last Name" }) %>
6
6
  <% end %>
7
7
  </div>
@@ -7,19 +7,16 @@ const FormGroupDefault = (props) => (
7
7
  <div>
8
8
  <FormGroup>
9
9
  <TextInput
10
- id="first-name"
11
10
  label="First Name"
12
11
  placeholder="Enter First Name"
13
12
  {...props}
14
13
  />
15
14
  <TextInput
16
- id="middle-initial"
17
- label="Middle Initial"
15
+ label="Middle Intial"
18
16
  placeholder="Enter Middle Initial"
19
17
  {...props}
20
18
  />
21
19
  <TextInput
22
- id="last-name"
23
20
  label="Last Name"
24
21
  placeholder="Enter Last Name"
25
22
  {...props}
@@ -1,8 +1,8 @@
1
1
  <div>
2
2
  <%= pb_rails("form_group", props: { full_width: true }) do %>
3
- <%= pb_rails("text_input", props: { label: "First Name", placeholder: "Enter First Name", id: "first-name-full-width" }) %>
4
- <%= pb_rails("text_input", props: { label: "Middle Initial", placeholder: "Enter Middle Initial", id: "middle-initial-full-width" }) %>
5
- <%= pb_rails("text_input", props: { label: "Last Name", placeholder: "Enter Last Name", id: "last-name-full-width" }) %>
3
+ <%= pb_rails("text_input", props: { label: "First Name", placeholder: "Enter First Name" }) %>
4
+ <%= pb_rails("text_input", props: { label: "Middle Intial", placeholder: "Enter Middle Initial" }) %>
5
+ <%= pb_rails("text_input", props: { label: "Last Name", placeholder: "Enter Last Name" }) %>
6
6
  <% end %>
7
7
  <br/>
8
8
  <br/>
@@ -10,4 +10,4 @@
10
10
  <%= pb_rails("text_input", props: { placeholder: "Search" }) %>
11
11
  <%= pb_rails("button", props: { text: "Submit", variant: "secondary" }) %>
12
12
  <% end %>
13
- </div>
13
+ </div>
@@ -9,19 +9,16 @@ const FormGroupFullWidth = (props) => (
9
9
  <div>
10
10
  <FormGroup fullWidth>
11
11
  <TextInput
12
- id="first-name-full-width"
13
12
  label="First Name"
14
13
  placeholder="Enter First Name"
15
14
  {...props}
16
15
  />
17
16
  <TextInput
18
- id="middle-initial-full-width"
19
- label="Middle Initial"
17
+ label="Middle Intial"
20
18
  placeholder="Enter Middle Initial"
21
19
  {...props}
22
20
  />
23
21
  <TextInput
24
- id="last-name-full-width"
25
22
  label="Last Name"
26
23
  placeholder="Enter Last Name"
27
24
  {...props}
@@ -17,7 +17,6 @@ const FormGroupTypeahead = (props) => {
17
17
  <div>
18
18
  <FormGroup>
19
19
  <Typeahead
20
- id="products"
21
20
  label="Products"
22
21
  options={options}
23
22
  {...props}
@@ -15,7 +15,7 @@
15
15
  options: names,
16
16
  label: "Truncation Within Typeahead",
17
17
  pills: true,
18
- truncate: "1",
18
+ truncate: 1,
19
19
  }) %>
20
20
 
21
21
  <%= pb_rails("caption", props: { text: "Form Pill Truncation" }) %>
@@ -24,19 +24,19 @@
24
24
  name: "Princess Amelia Mignonette Grimaldi Thermopolis Renaldo",
25
25
  avatar_url: "https://randomuser.me/api/portraits/women/44.jpg",
26
26
  tabindex: 0,
27
- truncate: "1",
27
+ truncate: 1,
28
28
  id: "truncation-1"
29
29
  }) %>
30
30
  <%= pb_rails("form_pill", props: {
31
31
  icon: "badge-check",
32
32
  text: "icon and a very long tag to show truncation",
33
33
  tabindex: 0,
34
- truncate: "1",
34
+ truncate: 1,
35
35
  id: "truncation-2"
36
36
  }) %>
37
37
  <%= pb_rails("form_pill", props: {
38
38
  text: "form pill long tag no tooltip show truncation",
39
39
  tabindex: 0,
40
- truncate: "1",
40
+ truncate: 1,
41
41
  }) %>
42
- <% end %>
42
+ <% end %>
@@ -21,7 +21,7 @@ const FormPillTruncatedText = (props) => {
21
21
  isMulti
22
22
  label="Truncation Within Typeahead"
23
23
  options={names}
24
- truncate={"1"}
24
+ truncate={1}
25
25
  {...props}
26
26
  />
27
27
  <Caption text="Form Pill Truncation"/>
@@ -31,20 +31,20 @@ const FormPillTruncatedText = (props) => {
31
31
  name="Princess Amelia Mignonette Grimaldi Thermopolis Renaldo"
32
32
  onClick={() => alert('Click!')}
33
33
  tabIndex={0}
34
- truncate={"1"}
34
+ truncate={1}
35
35
  />
36
36
  <FormPill
37
37
  icon="badge-check"
38
38
  onClick={() => {alert('Click!')}}
39
39
  tabIndex={0}
40
40
  text="icon and a very long tag to show truncation"
41
- truncate={"1"}
41
+ truncate={1}
42
42
  />
43
43
  <FormPill
44
44
  onClick={() => {alert('Click!')}}
45
45
  tabIndex={0}
46
46
  text="form pill with a very long tag to show truncation"
47
- truncate={"1"}
47
+ truncate={1}
48
48
  />
49
49
  </Card>
50
50
  </>
@@ -65,7 +65,7 @@
65
65
  }] %>
66
66
 
67
67
  <%= pb_rails("multi_level_select", props: {
68
- id: "select_a_department",
69
- label: "Select a Department",
70
- tree_data: treeData
68
+ id: "multi-level-select-label-rails",
69
+ label: "Select a department",
70
+ tree_data: treeData
71
71
  }) %>