playbook_ui_docs 13.27.0.pre.alpha.PLAY1342DRYcontenttagRailssimplekits2896 → 13.27.0.pre.alpha.PLAY11782918

Sign up to get free protection for your applications and to get access to all the features.
Files changed (19) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md +1 -1
  3. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md +5 -6
  4. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.md +6 -0
  5. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md +3 -3
  6. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md +5 -0
  7. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.md +1 -1
  8. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.md +1 -0
  9. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md +1 -1
  10. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.md +1 -1
  11. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.md +1 -0
  12. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.md +1 -1
  13. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +6 -6
  14. data/dist/menu.yml +2 -2
  15. metadata +10 -6
  16. /data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_subcomponent_structure.html.erb → _dropdown_subcomponent_structure_rails.html.erb} +0 -0
  17. /data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_display.html.erb → _dropdown_with_custom_display_rails.html.erb} +0 -0
  18. /data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_options.html.erb → _dropdown_with_custom_options_rails.html.erb} +0 -0
  19. /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: a0267f5484779fb07b6aba31bdfdd378d05df2060018512dfb695f0a7ee223c6
4
- data.tar.gz: 50c001971aa8d1e96f8f4d3d364ba760742c9598a4d0534448b32e7effa880d0
3
+ metadata.gz: 1764e38e2c32e8f92949e9e1503b210bf468c6209c9a077f6c743cda2c655701
4
+ data.tar.gz: d50117779469846d7d942b019731f3b78b5b8e7831bd466c8c8091ea28b8794b
5
5
  SHA512:
6
- metadata.gz: 40872da1deea3551a90e8ad1be0adeeb732f1d4cc96789ad795900f2dc45b3e7946f15c1cf9101b73db327f6bf9656945972b99fb929084038c67dba674ac956
7
- data.tar.gz: f46eae90558ab75dc1e2a7b4aed4ab76cf7512b7a5533e1a2ee8b0e3707dc30eed32f9ada05523c4ea038a0ce0404b9f81fb7f90bd88152af5fcb02628260fae
6
+ metadata.gz: 1825009c58ceb72d13942224f1ff22a6703bd09a55b8648b6ed1623ad31de07cc3df2ac882660c56ec5b261df21357f1777dca6649e3a4b1c0b2dc2cf4cc31e9
7
+ data.tar.gz: f8616bdd8d1d58497e469c7fd3dc3a324b522e8f78814673fe13ec9b564d766d2123f112cdad6f014db8b87e7ddf2754ab821ca32b49e1d57cc7fb218fa5bce3
@@ -1 +1 @@
1
- The Dropdown kit accepts an `options` array and renders each object from that array as a selectable option within a dropdown container. `options` is a required prop and must be an array of objects. Each object can contain as many key/value pairs as needed but MUST contain 'label' and 'value' as the only required items within each object.
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 comes with the following subcomponents that can be used to achieve various levels of customization:
1
+ The dropdown is built using all of the following subcomponents:
2
2
 
3
- `Dropdown. Trigger` / `dropdown/dropdown_trigger`
4
- `Dropdown.Container`/ `dropdown/dropdown_container`
5
- `Dropdown.Option` / `dropdown/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
- The `customDisplay` prop can be used to customize the display of the selected item by allowing devs to pass in a component that will be rendered to the left of the default text-based display. In this example the Avatar kit is being used.
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 is a function that gives the dev one argument: the selected option. In this example we are using the `onSelect` to set a state with the selected option and using it to customize the `customDisplay`.
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
- The Dropdown also allows for custom options that can be passed in as children to the `Dropdown.Option` subcomponent. If no children are passed to `Dropdown.Option`, the kit will render each option as text within a Body kit by default.
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, the padding on each option in the dropdown is set to `xs`. The `padding` Global Props however can be used to override this default. In this example, we are setting padding to `sm`.
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
- The Dropdown can also be given a custom Trigger by passing children to the `Dropdown.Trigger` subcomponent as shown in this example. Here we are using the IconCircle kit.
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 optional `label` prop takes a string value that if present will render that string as the label for the Dropdown.
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
- - dropdown_subcomponent_structure: Subcomponent Structure
4
+ - dropdown_subcomponent_structure_rails: Subcomponent Structure
5
5
  - dropdown_with_label: With Label
6
- - dropdown_with_custom_options: Custom Options
7
- - dropdown_with_custom_display: Custom Display
8
- - dropdown_with_custom_trigger: Custom Trigger
9
- - dropdown_with_custom_padding: Custom Padding for Dropdown Options
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 for Dropdown Options
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: *react_only
258
+ platforms: *web
259
259
  description: ""
260
- status: "beta"
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.
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: 13.27.0.pre.alpha.PLAY1342DRYcontenttagRailssimplekits2896
4
+ version: 13.27.0.pre.alpha.PLAY11782918
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: 2024-05-13 00:00:00.000000000 Z
12
+ date: 2024-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -607,25 +607,29 @@ files:
607
607
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb
608
608
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
609
609
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
610
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.html.erb
611
610
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
612
611
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md
612
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.html.erb
613
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.md
613
614
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx
614
615
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.md
615
616
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx
616
617
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.md
617
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.html.erb
618
618
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx
619
619
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
620
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.html.erb
620
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
621
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md
621
622
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx
622
623
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.md
624
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.html.erb
625
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.md
623
626
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.html.erb
624
627
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.jsx
625
628
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md
626
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.html.erb
627
629
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx
628
630
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.md
631
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.html.erb
632
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.md
629
633
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_external_control.jsx
630
634
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_hook.jsx
631
635
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb