playbook_ui_docs 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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -2
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
  4. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.html.erb +0 -1
  5. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +48 -2
  6. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_options.html.erb +0 -1
  7. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +0 -1
  8. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -2
  9. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -2
  10. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
  11. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_only_countries.jsx +1 -1
  12. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +3 -4
  13. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
  14. data/app/pb_kits/playbook/pb_select/docs/example.yml +0 -2
  15. data/app/pb_kits/playbook/pb_select/docs/index.js +0 -1
  16. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +51 -3
  17. data/dist/playbook-doc.js +2 -2
  18. metadata +2 -16
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows.jsx +0 -57
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_react.md +0 -5
  21. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom_rails.md +0 -1
  22. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_form.html.erb +0 -22
  23. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_form.md +0 -5
  24. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_rails.md +0 -1
  25. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_close_on_select.jsx +0 -42
  26. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_close_on_select.md +0 -1
  27. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.html.erb +0 -4
  28. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.jsx +0 -15
  29. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.md +0 -1
  30. data/app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.html.erb +0 -12
  31. data/app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.jsx +0 -31
  32. data/app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.md +0 -1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui_docs
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: playbook_ui
@@ -88,8 +88,6 @@ files:
88
88
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md
89
89
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx
90
90
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md
91
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows.jsx
92
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_react.md
93
91
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb
94
92
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.jsx
95
93
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.md
@@ -377,7 +375,6 @@ files:
377
375
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_checked.jsx
378
376
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.html.erb
379
377
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
380
- - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom_rails.md
381
378
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_default.html.erb
382
379
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_default.jsx
383
380
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_default_swift.md
@@ -386,11 +383,8 @@ files:
386
383
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error.html.erb
387
384
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error.jsx
388
385
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error_swift.md
389
- - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_form.html.erb
390
- - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_form.md
391
386
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb
392
387
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.jsx
393
- - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_rails.md
394
388
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_swift.md
395
389
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_options.html.erb
396
390
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_props_swift.md
@@ -821,8 +815,6 @@ files:
821
815
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.jsx
822
816
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx
823
817
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md
824
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_close_on_select.jsx
825
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_close_on_select.md
826
818
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
827
819
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
828
820
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb
@@ -1620,9 +1612,6 @@ files:
1620
1612
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.html.erb
1621
1613
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.jsx
1622
1614
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.md
1623
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.html.erb
1624
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.jsx
1625
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.md
1626
1615
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.html.erb
1627
1616
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
1628
1617
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.md
@@ -1808,9 +1797,6 @@ files:
1808
1797
  - app/pb_kits/playbook/pb_select/docs/_select_blank.jsx
1809
1798
  - app/pb_kits/playbook/pb_select/docs/_select_custom_select.html.erb
1810
1799
  - app/pb_kits/playbook/pb_select/docs/_select_custom_select.jsx
1811
- - app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.html.erb
1812
- - app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.jsx
1813
- - app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.md
1814
1800
  - app/pb_kits/playbook/pb_select/docs/_select_default.html.erb
1815
1801
  - app/pb_kits/playbook/pb_select/docs/_select_default.jsx
1816
1802
  - app/pb_kits/playbook/pb_select/docs/_select_default_swift.md
@@ -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,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.