playbook_ui_docs 14.21.1 → 14.21.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b23c654b3afbbaabd2b378685ce9fd0d8597f51a5f93d338e759d347a811f5a
4
- data.tar.gz: cb4ee9bfdc717177802741592f6a9c8c3925d0fda7b90eda0a9de71e0c11f2f0
3
+ metadata.gz: 9405f31a27844f27804b22e9f155bedd90ad625774877f925a3c02b461930d6e
4
+ data.tar.gz: 1de767071ea6b45fedd73e4e73d9bd701fc2ee6c29332cd20a6bdc1514ea5a7c
5
5
  SHA512:
6
- metadata.gz: c54936d98e127ae630ed40d4cd85390b54ddef12fcff327da914c98e90f5c19ae1137c478bf5f4b57e6b0f4feead83b9b8a394c63b2baca83c8194c3851d689d
7
- data.tar.gz: f3fb7cff9115d70644d8d72f6d4fd75716231d58009a7bd6faaae3d3c4c92fa846e2e7b1a8fc005449b5c3ef5b352cf6c25c7d7ec611140ad12e25f42b595747
6
+ metadata.gz: 91d5c6d8364aa43ac0bc697ae7ee82d99f03d564b21c4318a17bf96b7b56ecb6a18cec06dcbdb94a420a7208995d8e94f43cade2ddcb84e6ac7c90a8bf52a0d2
7
+ data.tar.gz: 91f13104947d7ef99ddfe3794de30919b2f95c8e8b73a10fbfa7f126e656e6daa90ef7aab24219ad031b42ea0f292e524d849784719a2d973a1517307aefb117
@@ -1,3 +1,4 @@
1
1
  <%= pb_rails("checkbox", props: {text: "Custom Checkbox"}) do%>
2
+ <input type="hidden" name="custom-name" value="0" />
2
3
  <input type="checkbox" name="custom-name" value="custom-value"/>
3
4
  <% end %>
@@ -0,0 +1 @@
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).
@@ -0,0 +1,22 @@
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 %>
@@ -0,0 +1,5 @@
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,5 +1,6 @@
1
1
  <%= pb_rails("checkbox" , props: {
2
2
  text: "Checkbox with Options",
3
+ hidden_input: true,
3
4
  input_options: {
4
5
  id: "checkbox-id",
5
6
  name: "checkbox-name",
@@ -7,6 +7,7 @@ examples:
7
7
  - checkbox_options: Checkbox w/ Options
8
8
  - checkbox_indeterminate: Indeterminate Checkbox
9
9
  - checkbox_disabled: Disabled Checkbox
10
+ - checkbox_form: Form and Hidden Input
10
11
 
11
12
  react:
12
13
  - checkbox_default: Default
@@ -44,6 +44,4 @@ examples:
44
44
  - dropdown_clear_selection: Clear Selection
45
45
  - dropdown_separators_hidden: Separators Hidden
46
46
  - dropdown_with_external_control: useDropdown Hook
47
- - dropdown_close_on_select: Close On Selection
48
-
49
47
 
@@ -19,5 +19,4 @@ export { default as DropdownMultiSelect } from './_dropdown_multi_select.jsx'
19
19
  export { default as DropdownMultiSelectDisplay } from './_dropdown_multi_select_display.jsx'
20
20
  export { default as DropdownMultiSelectWithAutocomplete } from './_dropdown_multi_select_with_autocomplete.jsx'
21
21
  export { default as DropdownMultiSelectWithDefault } from './_dropdown_multi_select_with_default.jsx'
22
- export { default as DropdownMultiSelectWithCustomOptions } from './_dropdown_multi_select_with_custom_options.jsx'
23
- export { default as DropdownCloseOnSelect } from './_dropdown_close_on_select.jsx'
22
+ export { default as DropdownMultiSelectWithCustomOptions } from './_dropdown_multi_select_with_custom_options.jsx'
@@ -101,7 +101,7 @@
101
101
  <%= form.dropdown_field :example_dropdown_validation_multi, props: { label: true, options: example_dropdown_options, multi_select: true, required: true } %>
102
102
  <%= form.select :example_select_validation, [ ["Yes", 1], ["No", 2] ], props: { label: true, blank_selection: "Select One...", required: true, validation_message: "Please, select an option." } %>
103
103
  <%= form.collection_select :example_collection_select_validation, example_collection, :value, :name, props: { label: true, blank_selection: "Select One...", required: true } %>
104
- <%= form.check_box :example_checkbox, props: { text: "Example Checkbox", label: true, required: true } %>
104
+ <%= form.check_box :example_checkbox_validation, props: { text: "Example Checkbox Validation", label: true, required: true }, checked_value: "1", unchecked_value: "0" %>
105
105
  <%= form.date_picker :example_date_picker_2, props: { label: true, required: true, validation_message: "Please, select a date.", allow_input: true } %>
106
106
  <%= form.star_rating_field :example_star_rating_validation, props: { variant: "interactive", label: true, required: true } %>
107
107
  <%= form.time_zone_select_field :example_time_zone_select, ActiveSupport::TimeZone.us_zones, { default: "Eastern Time (US & Canada)" }, props: { label: true, blank_selection: "Select a Time Zone...", required: true } %>
@@ -1 +1,3 @@
1
- Section separator is a divider line that compartmentalizes content, typically used on cards or white backgrounds. This should only be used on light backgrounds (with our variable `$bg_light`).
1
+ Section separator is a divider line that compartmentalizes content, typically used on cards or white backgrounds.
2
+
3
+ To ensure that the section separator is properly rendered, please be sure to use our global `width` prop to set width to 100%. [See here](https://playbook.powerapp.cloud/visual_guidelines/width) for more information on the global width prop.