playbook_ui 14.20.0.pre.alpha.PLAY2214checkboxhiddeninput8052 → 14.20.0.pre.alpha.PLAY21817891

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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +49 -116
  3. data/app/pb_kits/playbook/pb_advanced_table/Context/AdvancedTableContext.tsx +2 -58
  4. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableActions.ts +1 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +4 -16
  6. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +3 -7
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -13
  8. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +3 -10
  9. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +0 -61
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -2
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
  12. data/app/pb_kits/playbook/pb_advanced_table/index.js +0 -2
  13. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +11 -4
  14. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +7 -28
  15. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.html.erb +0 -1
  16. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +48 -2
  17. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_options.html.erb +0 -1
  18. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +0 -1
  19. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +58 -17
  20. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +3 -12
  21. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -2
  22. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -2
  23. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +2 -108
  24. data/app/pb_kits/playbook/pb_dropdown/index.js +0 -24
  25. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +10 -14
  26. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +15 -26
  27. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
  28. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +0 -4
  29. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_only_countries.jsx +1 -1
  30. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +3 -4
  31. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
  32. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -3
  33. data/app/pb_kits/playbook/pb_popover/index.ts +4 -9
  34. data/app/pb_kits/playbook/pb_select/docs/example.yml +0 -2
  35. data/app/pb_kits/playbook/pb_select/docs/index.js +0 -1
  36. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +51 -3
  37. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +1 -1
  38. data/dist/chunks/{_typeahead-CoOpeYom.js → _typeahead-BmOWdDtp.js} +2 -2
  39. data/dist/chunks/_weekday_stacked-CvcuQyr9.js +45 -0
  40. data/dist/chunks/{lib-D7Va7yqa.js → lib-D5R1BjUn.js} +1 -1
  41. data/dist/chunks/{pb_form_validation-DSkdRDMf.js → pb_form_validation-BZ2AVAi_.js} +1 -1
  42. data/dist/chunks/vendor.js +1 -1
  43. data/dist/menu.yml +1 -1
  44. data/dist/playbook-doc.js +2 -2
  45. data/dist/playbook-rails-react-bindings.js +1 -1
  46. data/dist/playbook-rails.js +1 -1
  47. data/dist/playbook.css +1 -1
  48. data/lib/playbook/version.rb +1 -1
  49. metadata +6 -21
  50. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows.jsx +0 -57
  51. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_react.md +0 -5
  52. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom_rails.md +0 -1
  53. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_form.html.erb +0 -22
  54. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_form.md +0 -5
  55. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_rails.md +0 -1
  56. data/app/pb_kits/playbook/pb_checkbox/index.js +0 -56
  57. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_close_on_select.jsx +0 -42
  58. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_close_on_select.md +0 -1
  59. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.html.erb +0 -4
  60. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.jsx +0 -15
  61. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.md +0 -1
  62. data/app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.html.erb +0 -12
  63. data/app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.jsx +0 -31
  64. data/app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.md +0 -1
  65. data/dist/chunks/_weekday_stacked-BppvLxTS.js +0 -45
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.20.0"
5
- VERSION = "14.20.0.pre.alpha.PLAY2214checkboxhiddeninput8052"
5
+ VERSION = "14.20.0.pre.alpha.PLAY21817891"
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.20.0.pre.alpha.PLAY2214checkboxhiddeninput8052
4
+ version: 14.20.0.pre.alpha.PLAY21817891
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: 2025-06-02 00:00:00.000000000 Z
12
+ date: 2025-05-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -340,8 +340,6 @@ files:
340
340
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md
341
341
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx
342
342
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md
343
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows.jsx
344
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_react.md
345
343
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb
346
344
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.jsx
347
345
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.md
@@ -715,7 +713,6 @@ files:
715
713
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_checked.jsx
716
714
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.html.erb
717
715
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
718
- - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom_rails.md
719
716
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_default.html.erb
720
717
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_default.jsx
721
718
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_default_swift.md
@@ -724,11 +721,8 @@ files:
724
721
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error.html.erb
725
722
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error.jsx
726
723
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error_swift.md
727
- - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_form.html.erb
728
- - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_form.md
729
724
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb
730
725
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.jsx
731
- - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_rails.md
732
726
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_swift.md
733
727
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_options.html.erb
734
728
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_props_swift.md
@@ -737,7 +731,6 @@ files:
737
731
  - app/pb_kits/playbook/pb_checkbox/docs/_description.md
738
732
  - app/pb_kits/playbook/pb_checkbox/docs/example.yml
739
733
  - app/pb_kits/playbook/pb_checkbox/docs/index.js
740
- - app/pb_kits/playbook/pb_checkbox/index.js
741
734
  - app/pb_kits/playbook/pb_circle_chart/ChartsTypes.ts
742
735
  - app/pb_kits/playbook/pb_circle_chart/_circle_chart.scss
743
736
  - app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx
@@ -1331,8 +1324,6 @@ files:
1331
1324
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.jsx
1332
1325
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx
1333
1326
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md
1334
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_close_on_select.jsx
1335
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_close_on_select.md
1336
1327
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
1337
1328
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
1338
1329
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb
@@ -2420,9 +2411,6 @@ files:
2420
2411
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.html.erb
2421
2412
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.jsx
2422
2413
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.md
2423
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.html.erb
2424
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.jsx
2425
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.md
2426
2414
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.html.erb
2427
2415
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
2428
2416
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.md
@@ -2674,9 +2662,6 @@ files:
2674
2662
  - app/pb_kits/playbook/pb_select/docs/_select_blank.jsx
2675
2663
  - app/pb_kits/playbook/pb_select/docs/_select_custom_select.html.erb
2676
2664
  - app/pb_kits/playbook/pb_select/docs/_select_custom_select.jsx
2677
- - app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.html.erb
2678
- - app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.jsx
2679
- - app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.md
2680
2665
  - app/pb_kits/playbook/pb_select/docs/_select_default.html.erb
2681
2666
  - app/pb_kits/playbook/pb_select/docs/_select_default.jsx
2682
2667
  - app/pb_kits/playbook/pb_select/docs/_select_default_swift.md
@@ -3607,11 +3592,11 @@ files:
3607
3592
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3608
3593
  - app/pb_kits/playbook/utilities/text.ts
3609
3594
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3610
- - dist/chunks/_typeahead-CoOpeYom.js
3611
- - dist/chunks/_weekday_stacked-BppvLxTS.js
3595
+ - dist/chunks/_typeahead-BmOWdDtp.js
3596
+ - dist/chunks/_weekday_stacked-CvcuQyr9.js
3612
3597
  - dist/chunks/lazysizes-B7xYodB-.js
3613
- - dist/chunks/lib-D7Va7yqa.js
3614
- - dist/chunks/pb_form_validation-DSkdRDMf.js
3598
+ - dist/chunks/lib-D5R1BjUn.js
3599
+ - dist/chunks/pb_form_validation-BZ2AVAi_.js
3615
3600
  - dist/chunks/vendor.js
3616
3601
  - dist/menu.yml
3617
3602
  - dist/playbook-doc.js
@@ -1,57 +0,0 @@
1
- import React, { useState } from "react"
2
- import AdvancedTable from '../_advanced_table'
3
- import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
4
-
5
- const AdvancedTableRowPinning = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- },
12
- {
13
- accessor: "newEnrollments",
14
- label: "New Enrollments",
15
- },
16
- {
17
- accessor: "scheduledMeetings",
18
- label: "Scheduled Meetings",
19
- },
20
- {
21
- accessor: "attendanceRate",
22
- label: "Attendance Rate",
23
- },
24
- {
25
- accessor: "completedClasses",
26
- label: "Completed Classes",
27
- },
28
- {
29
- accessor: "classCompletionRate",
30
- label: "Class Completion Rate",
31
- },
32
- {
33
- accessor: "graduatedStudents",
34
- label: "Graduated Students",
35
- },
36
- ]
37
-
38
- const [pinnedRows, setPinnedRows] = useState({top: ["8", "9", "10", "11", "12", "13", "14"]})
39
-
40
- return (
41
- <div>
42
- <AdvancedTable
43
- columnDefinitions={columnDefinitions}
44
- maxHeight="xs"
45
- pinnedRows={{value: pinnedRows, onChange: setPinnedRows}}
46
- tableData={MOCK_DATA}
47
- tableProps={{sticky: true}}
48
- {...props}
49
- >
50
- <AdvancedTable.Header enableSorting />
51
- <AdvancedTable.Body />
52
- </AdvancedTable>
53
- </div>
54
- )
55
- }
56
-
57
- export default AdvancedTableRowPinning
@@ -1,5 +0,0 @@
1
- Use the `pinnedRows` prop to pin specific rows to the top of an Advanced Table. Pinned rows will remain at the top when scrolling through table data and reorganizing via sorting.
2
-
3
- **NOTE:** This prop is in Beta. Current Requirements for V1:
4
- - Sticky header required: Pinned rows must be used with `sticky: true` via `tableProps` (works with both responsive and non-responsive tables)
5
- - Row ids required: Pass an array of row ids to the `top` property. For expandable rows, both parent and all its child row ids must be included individually
@@ -1 +0,0 @@
1
- When using a custom checkbox wrapped in the Checkbox kit, hidden inputs are not automatically included and cannot be prop enabled. Manually add a hidden input before the checkbox if necessary to submit a value when the checkbox is unchecked (as is standard in Rails forms).
@@ -1,22 +0,0 @@
1
-
2
- <%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
3
- <%=pb_rails("flex", props: { gap: "sm", orientation: "column"}) do %>
4
- <%= pb_rails("checkbox" , props: {
5
- text: "1. pb_rails(\"checkbox\") Checkbox from kit",
6
- value: "checkbox-value",
7
- name: "checkbox-name",
8
- hidden_input: true
9
- }) %>
10
- <%= form.check_box :example_checkbox,
11
- data: { field1: "value1", field2: "value2" },
12
- props: { text: "2. form.check_box Checkbox from Form Builder" },
13
- unchecked_value: "no",
14
- id: "checkbox-id",
15
- name: "checkbox-name",
16
- class: "checkbox-class"
17
- %>
18
- <%= form.actions do |action| %>
19
- <%= action.button props: { type: "submit", text: "Submit", variant: "primary" } %>
20
- <% end %>
21
- <% end %>
22
- <% end %>
@@ -1,5 +0,0 @@
1
- The way to access hidden inputs for form submission depends on which version of the kit being used within the form context.
2
-
3
- If using the Rails Checkbox version of the kit, set `hidden_input: true`. Inspect Checkbox #1 in the example above to see the hidden input in the DOM.
4
-
5
- If using the Form Builder version of the kit (reference the [Form kit page](https://playbook.powerapp.cloud/kits/form) for more on these), the hidden input will appear if the input has a set `unchecked_value`. Inspect Checkbox #2 in the example above (and the two checkbox examples on the Form kit page) to see the hidden input in the DOM. See the [Rails check_box FormHelper docs](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-check_box) for more.
@@ -1 +0,0 @@
1
- If you want to use indeterminate, "check/uncheck all" checkboxes, add `indeterminate_main: true` and an `id` to the main checkbox. Then, add an `indeterminate_parent` prop with the main checkbox's `id` to the children checkboxes.
@@ -1,56 +0,0 @@
1
- import PbEnhancedElement from "../pb_enhanced_element"
2
-
3
- const INDETERMINATE_MAIN_CHECKBOX_SELECTOR = "[data-pb-checkbox-indeterminate-main='true']"
4
-
5
- export default class PbCheckbox extends PbEnhancedElement {
6
- static get selector() {
7
- return INDETERMINATE_MAIN_CHECKBOX_SELECTOR
8
- }
9
-
10
- connect() {
11
- const mainCheckboxWrapper = this.element;
12
- const mainCheckbox = mainCheckboxWrapper.querySelector('input')
13
- const childCheckboxes = document.querySelectorAll(`[data-pb-checkbox-indeterminate-parent="${this.element.id}"] input[type="checkbox"]`);
14
-
15
- const updateMainCheckbox = () => {
16
- // Count the number of checked child checkboxes
17
- const checkedCount = Array.from(childCheckboxes).filter(cb => cb.checked).length;
18
- // Determine if the main checkbox should be in an indeterminate state
19
- const indeterminate = checkedCount > 0 && checkedCount < childCheckboxes.length;
20
-
21
- // Set the main checkbox states
22
- mainCheckbox.indeterminate = indeterminate;
23
- mainCheckbox.checked = checkedCount > 0;
24
-
25
- // Determine the main checkbox label based on the number of checked checkboxes
26
- const text = checkedCount === 0 ? 'Check All' : 'Uncheck All';
27
-
28
- // Determine the icon class to add and remove based on the number of checked checkboxes
29
- const iconClassToAdd = checkedCount === 0 ? 'pb_checkbox_checkmark' : 'pb_checkbox_indeterminate';
30
- const iconClassToRemove = checkedCount === 0 ? 'pb_checkbox_indeterminate' : 'pb_checkbox_checkmark';
31
-
32
- // Update main checkbox label
33
- mainCheckboxWrapper.getElementsByClassName('pb_body_kit')[0].textContent = text;
34
-
35
- // Add and remove the icon class to the main checkbox wrapper
36
- mainCheckboxWrapper.querySelector('[data-pb-checkbox-icon-span]').classList.add(iconClassToAdd);
37
- mainCheckboxWrapper.querySelector('[data-pb-checkbox-icon-span]').classList.remove(iconClassToRemove);
38
-
39
- // Toggle the visibility of the checkbox icon based on the indeterminate state
40
- mainCheckboxWrapper.getElementsByClassName("indeterminate_icon")[0].classList.toggle('hidden', !indeterminate);
41
- mainCheckboxWrapper.getElementsByClassName("check_icon")[0].classList.toggle('hidden', indeterminate);
42
- };
43
-
44
- // Set indeterminate icon on main checkbox if initial children checkboxes are checked
45
- updateMainCheckbox();
46
-
47
- this.element.querySelector('input').addEventListener('change', function() {
48
- childCheckboxes.forEach(cb => cb.checked = this.checked);
49
- updateMainCheckbox();
50
- });
51
-
52
- childCheckboxes.forEach(cb => {
53
- cb.addEventListener('change', updateMainCheckbox);
54
- });
55
- }
56
- }
@@ -1,42 +0,0 @@
1
- import React from 'react'
2
- import Dropdown from '../../pb_dropdown/_dropdown'
3
-
4
- const DropdownCloseOnSelect = (props) => {
5
-
6
- const options = [
7
- {
8
- label: "United States",
9
- value: "United States",
10
- },
11
- {
12
- label: "Canada",
13
- value: "Canada",
14
- },
15
- {
16
- label: "Pakistan",
17
- value: "Pakistan",
18
- }
19
- ];
20
-
21
-
22
- return (
23
- <div>
24
- <Dropdown
25
- closeOnSelection={false}
26
- label="Default"
27
- options={options}
28
- {...props}
29
- />
30
- <br />
31
- <Dropdown
32
- closeOnSelection={false}
33
- label="Multi Select"
34
- multiSelect
35
- options={options}
36
- {...props}
37
- />
38
- </div>
39
- )
40
- }
41
-
42
- export default DropdownCloseOnSelect
@@ -1 +0,0 @@
1
- By default, the dropdown menu will close when a selection is made. You can prevent this behavior by using the `closeOnSelection` prop, which will leave the menu open after a selection is made when set to 'false'.
@@ -1,4 +0,0 @@
1
- <%= pb_rails("phone_number_input", props: {
2
- initial_country: 'gb',
3
- exclude_countries: ['us', 'br']
4
- }) %>
@@ -1,15 +0,0 @@
1
- import React from 'react'
2
- import PhoneNumberInput from '../../pb_phone_number_input/_phone_number_input'
3
-
4
- const PhoneNumberInputExcludeCountries = (props) => (
5
- <>
6
- <PhoneNumberInput
7
- excludeCountries={['us', 'br']}
8
- id='exclude'
9
- initialCountry='gb'
10
- {...props}
11
- />
12
- </>
13
- )
14
-
15
- export default PhoneNumberInputExcludeCountries
@@ -1 +0,0 @@
1
- Excluding countries removes the selected countries from the dropdown.
@@ -1,12 +0,0 @@
1
- <%= pb_rails("select", props: { label: "Favorite Animal" }) do %>
2
- <select name="animal" id="animal">
3
- <optgroup label="Mammal">
4
- <option value="1">Cat</option>
5
- <option value="2">Dog</option>
6
- </optgroup>
7
- <optgroup label="Amphibian">
8
- <option value="3">Frog</option>
9
- <option value="4">Salamander</option>
10
- </optgroup>
11
- </select>
12
- <% end %>
@@ -1,31 +0,0 @@
1
- import React from 'react'
2
-
3
- import Select from '../_select'
4
-
5
- const SelectCustomSelectSubheaders = (props) => {
6
- return (
7
- <div>
8
- <Select
9
- label="Favorite Animal"
10
- {...props}
11
- >
12
- <select
13
- id="animal"
14
- name="animal"
15
- {...props}
16
- >
17
- <optgroup label="Mammal">
18
- <option value="1">{'Cat'}</option>
19
- <option value="2">{'Dog'}</option>
20
- </optgroup>
21
- <optgroup label="Amphibian">
22
- <option value="3">{'Frog'}</option>
23
- <option value="4">{'Salamander'}</option>
24
- </optgroup>
25
- </select>
26
- </Select>
27
- </div>
28
- )
29
- }
30
-
31
- export default SelectCustomSelectSubheaders
@@ -1 +0,0 @@
1
- To create a select with non-selectable subheaders, use a Custom Select component to render a native `<select>` containing `<optgroup>` elements. The [optgroup HTML element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/optgroup) groups related options under a non-selectable label in the dropdown.