playbook_ui 14.21.1 → 14.22.0.pre.rc.0
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 +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +1 -3
- data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +18 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.html.erb +1 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom_rails.md +1 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_form.html.erb +22 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_form.md +5 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_options.html.erb +1 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
- data/app/pb_kits/playbook/pb_section_separator/docs/_description.md +3 -1
- data/dist/chunks/{_typeahead-BlPRej0F.js → _typeahead-CoOpeYom.js} +2 -2
- data/dist/chunks/{_weekday_stacked-LCNJiSQ3.js → _weekday_stacked-B_jpa2Rz.js} +1 -1
- data/dist/chunks/lib-D7Va7yqa.js +29 -0
- data/dist/chunks/{pb_form_validation-DyvJ8iPe.js → pb_form_validation-DSkdRDMf.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +2 -2
- metadata +9 -6
- data/dist/chunks/lib-D4vXIZF5.js +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3237dbe64cf5d35651426b51605fc0a29d2774ace25902df2d835d3ba397cf45
|
4
|
+
data.tar.gz: 17dffcc35b1c8dc359a5f2e8496122e888f0981a8694642cf4b6f9b80db47095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a17f0e817d78b24d5ba66cc346f107818a57cc657134501c1062adaee813936d1a22f86dbd6ba7fc57aeb72a6bd41a3d44b11a42e4df5e3aa996c4a557e594b
|
7
|
+
data.tar.gz: fd82408a056f7a0fdcfeff8c9d909f07eee2a76ad9a0ecb4de81ac333eee51a5d29262f7a331737390b29c497c85dcb303b96119eeeda81e6c406910d77b66a7
|
@@ -39,7 +39,7 @@
|
|
39
39
|
}
|
40
40
|
|
41
41
|
-ms-overflow-style: none !important;
|
42
|
-
scrollbar-width: thin
|
42
|
+
scrollbar-width: thin;
|
43
43
|
scrollbar-color: #00000033 transparent !important;
|
44
44
|
}
|
45
45
|
|
@@ -410,7 +410,6 @@
|
|
410
410
|
|
411
411
|
// Make sure all horizontal borders use the default border color
|
412
412
|
tr, th, td {
|
413
|
-
border-top-color: $border_light !important;
|
414
413
|
border-bottom-color: $border_light !important;
|
415
414
|
}
|
416
415
|
|
@@ -633,7 +632,6 @@
|
|
633
632
|
|
634
633
|
// Make sure all horizontal borders use the default border color in dark mode
|
635
634
|
tr, th, td {
|
636
|
-
border-top-color: $border_dark !important;
|
637
635
|
border-bottom-color: $border_dark !important;
|
638
636
|
}
|
639
637
|
|
@@ -18,13 +18,30 @@ module Playbook
|
|
18
18
|
default: false
|
19
19
|
prop :form_spacing, type: Playbook::Props::Boolean,
|
20
20
|
default: false
|
21
|
+
prop :hidden_input, type: Playbook::Props::Boolean,
|
22
|
+
default: false
|
23
|
+
prop :hidden_value
|
21
24
|
|
22
25
|
def classname
|
23
26
|
generate_classname("pb_checkbox_kit", checked_class) + error_class
|
24
27
|
end
|
25
28
|
|
26
29
|
def input
|
27
|
-
|
30
|
+
inputs = []
|
31
|
+
effective_name = name || input_options[:name]
|
32
|
+
effective_value = value || input_options[:value] || "1"
|
33
|
+
is_checked = checked || input_options[:checked]
|
34
|
+
|
35
|
+
inputs << hidden_field_tag(effective_name, hidden_value || "0") if hidden_input && effective_name.present?
|
36
|
+
|
37
|
+
inputs << check_box_tag(
|
38
|
+
effective_name,
|
39
|
+
effective_value,
|
40
|
+
is_checked,
|
41
|
+
input_options.merge(disabled: disabled)
|
42
|
+
)
|
43
|
+
|
44
|
+
safe_join(inputs)
|
28
45
|
end
|
29
46
|
|
30
47
|
def checkbox_label_status
|
@@ -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.
|
@@ -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 :
|
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.
|
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.
|