playbook_ui_docs 13.27.0.pre.alpha.PLAY1342DRYcontenttagRailssimplekits2896 → 13.27.0.pre.alpha.PLAY11782916
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md +5 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.md +6 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md +3 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md +5 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +6 -6
- data/dist/menu.yml +2 -2
- data/dist/playbook-doc.js +1 -1
- metadata +10 -6
- /data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_subcomponent_structure.html.erb → _dropdown_subcomponent_structure_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_display.html.erb → _dropdown_with_custom_display_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_options.html.erb → _dropdown_with_custom_options_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_trigger.html.erb → _dropdown_with_custom_trigger_rails.html.erb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45f2a2a93d837d6e33f621fb7ecefc79ed343cc9b50ea2b98e30a4236ff4ce3d
|
4
|
+
data.tar.gz: 4a310adcb59da5abbe1e000765cdcd4ab371c7d81bc9fe56e4728bb9dc6fd7f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4373c106ebd8baf36bcfd40a122ca86e6e630fdeb26bddabb397c68a99c6b8583f1d81087f2302fff03117375d536cf67c563e7c96dbce91b870bce4170d5a9c
|
7
|
+
data.tar.gz: fc5f30cab8685522e73bdb8574d0c75fde4ae358b9d7328d45456925d34a5745c6f2d77b89711dc8528d83ea20736d9be683877b8d5a67b7674e5037d12a5899
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
This kit's `options` prop requires an array of objects, each of which will be used as the selectable options within the dropdown. Each option object can support any number of key-value pairs, but each must contain `label` and `value`.
|
@@ -1,7 +1,6 @@
|
|
1
|
-
The dropdown
|
1
|
+
The dropdown is built using all of the following subcomponents:
|
2
2
|
|
3
|
-
`Dropdown.
|
4
|
-
`Dropdown.Container
|
5
|
-
`Dropdown.Option`
|
6
|
-
|
7
|
-
See the code snippet below for a visual on how to use the kit with subcomponents. Each subcomponent allows for GlobalProps in addition to any subcomponent specfic props.
|
3
|
+
`Dropdown.Trigger` is the UI component that users interact with to toggle the dropdown.
|
4
|
+
`Dropdown.Container` is the floating container that wraps the list of dropdown options.
|
5
|
+
`Dropdown.Option` renders options that are passed to the container.
|
6
|
+
Each of these subcomponents can be altered using global props and/or their respective props. See doc examples below for more information on each.
|
@@ -0,0 +1,6 @@
|
|
1
|
+
The dropdown is built using all of the following required subcomponents:
|
2
|
+
|
3
|
+
`dropdown/dropdown_trigger` is the UI component that users interact with to toggle the dropdown.
|
4
|
+
`dropdown/dropdown_container` is the floating container that wraps the list of dropdown options.
|
5
|
+
`dropdown/dropdown_option` renders options that are passed to the container.
|
6
|
+
Each of these subcomponents can be altered using global props and/or their respective props. See doc examples below for more information on each.
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
1
|
+
Optionally utilize `customDisplay` on the `Dropdown.Trigger` subcomponent to customize its content after an option is selected. The component passed to customDisplay will be rendered to the left of the default text-based display. In this example the Avatar kit is being used.
|
2
2
|
|
3
|
-
The `placeholder` prop can also be used to customize the placeholder text for the default Trigger
|
3
|
+
The `placeholder` prop can also be used to customize the placeholder text for the default `Dropdown.Trigger`.
|
4
4
|
|
5
|
-
The `onSelect` prop
|
5
|
+
The `onSelect` prop returns the selected option as an object to be utilized by the dev. In this example we are using the `onSelect` to set a state with the selected option and using it to customize the `customDisplay`.
|
@@ -0,0 +1,5 @@
|
|
1
|
+
Optionally utilize `custom_display` on the `dropdown/dropdown_trigger` subcomponent to customize its content after an option is selected. The component passed to custom_display will be rendered to the left of the default text-based display. In this example the Avatar kit is being used.
|
2
|
+
|
3
|
+
The `placeholder` prop can also be used to customize the placeholder text for the default `dropdown/dropdown_trigger`.
|
4
|
+
|
5
|
+
The dropdown follows the typical rails pattern of utilizing hidden inputs for form submission. The hidden input value is the selected options' id.
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
`Dropdown.Option` subcomponent accepts any child components to customize the options' contents and display. By default, options are Body kit text that is set by the `label` value from the `option` object.
|
@@ -0,0 +1 @@
|
|
1
|
+
`dropdown/dropdown_option` subcomponent accepts any child components to customize the options' contents and display. By default, options are Body kit text that is set by the `label` value from the `option` object.
|
@@ -1 +1 @@
|
|
1
|
-
By default,
|
1
|
+
By default, dropdown option padding is set to `xs`, but this padding can be overridden using our global prop spacing token. In this example we are increasing the option padding to `sm`.
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Optionally replace the default trigger's select element by passing child components directly to the `Dropdown.Trigger`.
|
@@ -0,0 +1 @@
|
|
1
|
+
Optionally replace the default trigger's select element by passing child components directly to the `dropdown/dropdown_trigger`.
|
@@ -1 +1 @@
|
|
1
|
-
The
|
1
|
+
The top-level Dropdown component optionally accepts any string through a `label` prop to produce a label above your trigger element.
|
@@ -1,12 +1,12 @@
|
|
1
1
|
examples:
|
2
2
|
rails:
|
3
3
|
- dropdown_default: Default
|
4
|
-
-
|
4
|
+
- dropdown_subcomponent_structure_rails: Subcomponent Structure
|
5
5
|
- dropdown_with_label: With Label
|
6
|
-
-
|
7
|
-
-
|
8
|
-
-
|
9
|
-
- dropdown_with_custom_padding: Custom Padding
|
6
|
+
- dropdown_with_custom_options_rails: Custom Options
|
7
|
+
- dropdown_with_custom_display_rails: Custom Display
|
8
|
+
- dropdown_with_custom_trigger_rails: Custom Trigger
|
9
|
+
- dropdown_with_custom_padding: Custom Option Padding
|
10
10
|
|
11
11
|
react:
|
12
12
|
- dropdown_default: Default
|
@@ -15,7 +15,7 @@ examples:
|
|
15
15
|
- dropdown_with_custom_options: Custom Options
|
16
16
|
- dropdown_with_custom_display: Custom Display
|
17
17
|
- dropdown_with_custom_trigger: Custom Trigger
|
18
|
-
- dropdown_with_custom_padding: Custom Padding
|
18
|
+
- dropdown_with_custom_padding: Custom Option Padding
|
19
19
|
# - dropdown_with_autocomplete: Autocomplete
|
20
20
|
# - dropdown_with_autocomplete_and_custom_display: Autocomplete with Custom Display
|
21
21
|
# - dropdown_with_external_control: useDropdown Hook
|
data/dist/menu.yml
CHANGED
@@ -255,9 +255,9 @@ kits:
|
|
255
255
|
description: Playbook's date picker is built using flatpickr, a vanilla js library. Common date picker use cases and features have been adapted into simple prop based configuration detailed in the docs below.
|
256
256
|
status: "stable"
|
257
257
|
- name: dropdown
|
258
|
-
platforms: *
|
258
|
+
platforms: *web
|
259
259
|
description: ""
|
260
|
-
status: "
|
260
|
+
status: "stable"
|
261
261
|
- name: "multi_level_select"
|
262
262
|
platforms: *web
|
263
263
|
description: The MultiLevelSelect kit renders a multi leveled select dropdown based on data from the user.
|