playbook_ui_docs 16.3.0.pre.rc.0 → 16.3.0.pre.rc.1
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_date_picker/docs/_date_picker_positions.md +1 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.md +3 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options.jsx +63 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5d5d61333f80fb96fab58159d8abc57d7676c60ed2d42f195862d03a8d2b5ca6
|
|
4
|
+
data.tar.gz: b87eea888ab208af57e025c222f26be6ae74d8106be10b7546ea6eec3202fbce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c76be7069e5fb07cf80ffb954e8158c6a48bbf9acebe65ba316567ca25e06ec18aedeff1f692082fbb493e36a2d2f1dd3a72f75139b2a2baddd4f18bd3294fa
|
|
7
|
+
data.tar.gz: a4e735b11185ef0a1d6fc46a7d8be784a8fec77a8b6aff3fe5e851ca6b40407bc47658f5d2e07295043a35a00c907484652efefd93e6af7d075193e14a71f060
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Datepicker supports `position` options from [Flatpickr Options Documentation](https://flatpickr.js.org/options/). There are multiple positioning options to choose from.
|
|
2
2
|
|
|
3
3
|
**Note:** In order for the above prop to work properly, you must also send `staticPosition={false}` to your Datepicker kit instance.
|
|
4
|
+
If you are using the Datepicker within a Dialog, you cannot use the `staticPosition`/`static_position` prop.
|
|
4
5
|
|
|
5
6
|
#### Affix Datepicker Upon Scrolling
|
|
6
7
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
The dialog kit also supports customizing your dialog with a [compound component](https://kentcdodds.com/blog/compound-components-with-react-hooks) structure.
|
|
2
2
|
This allows for greater flexibility and more complex dialogs.
|
|
3
3
|
|
|
4
|
-
For the Rails version, when using the kit as a compound component it is necessary to pass the same value as the id for the dialog, the dialog header and the dialog footer in order for the opening and closing of the dialog to function as expected.
|
|
4
|
+
For the Rails version, when using the kit as a compound component it is necessary to pass the same value as the id for the dialog, the dialog header and the dialog footer in order for the opening and closing of the dialog to function as expected.
|
|
5
|
+
|
|
6
|
+
If you are using the datepicker within the Rails dialog, do not use the `static_position` prop on the datepicker.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Dropdown from '../../pb_dropdown/_dropdown'
|
|
3
|
+
import Caption from '../../pb_caption/_caption'
|
|
4
|
+
|
|
5
|
+
const DropdownClosingOptions = (props) => {
|
|
6
|
+
const options = [
|
|
7
|
+
{
|
|
8
|
+
label: "United States",
|
|
9
|
+
value: "unitedStates",
|
|
10
|
+
id: "us"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: "Canada",
|
|
14
|
+
value: "canada",
|
|
15
|
+
id: "ca"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: "Pakistan",
|
|
19
|
+
value: "pakistan",
|
|
20
|
+
id: "pk"
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<>
|
|
26
|
+
<Caption
|
|
27
|
+
marginBottom="xs"
|
|
28
|
+
text="Any"
|
|
29
|
+
/>
|
|
30
|
+
<Dropdown
|
|
31
|
+
closeOnClick='any'
|
|
32
|
+
options={options}
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
|
|
36
|
+
<br />
|
|
37
|
+
|
|
38
|
+
<Caption
|
|
39
|
+
marginBottom="xs"
|
|
40
|
+
text="Outside"
|
|
41
|
+
/>
|
|
42
|
+
<Dropdown
|
|
43
|
+
closeOnClick='outside'
|
|
44
|
+
options={options}
|
|
45
|
+
{...props}
|
|
46
|
+
/>
|
|
47
|
+
|
|
48
|
+
<br />
|
|
49
|
+
|
|
50
|
+
<Caption
|
|
51
|
+
marginBottom="xs"
|
|
52
|
+
text="Inside"
|
|
53
|
+
/>
|
|
54
|
+
<Dropdown
|
|
55
|
+
closeOnClick='inside'
|
|
56
|
+
options={options}
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
</>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export default DropdownClosingOptions
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The `closeOnClick` prop allows you to control when the Dropdown closes in response to click interactions. The value `any` reflects the default behavior, where the dropdown will close after any click. Set it to `outside` to ensure interactive elements as dropdown options are able to be interacted with or modified. Set it to `inside` for a dropdown that only closes when the input or dropdown menu is clicked.
|
|
@@ -62,6 +62,7 @@ examples:
|
|
|
62
62
|
- dropdown_with_constrain_height: Constrain Height
|
|
63
63
|
- dropdown_separators_hidden: Separators Hidden
|
|
64
64
|
- dropdown_with_external_control: useDropdown Hook
|
|
65
|
+
- dropdown_closing_options: Closing Options
|
|
65
66
|
- dropdown_quickpick: Quick Pick Variant
|
|
66
67
|
- dropdown_quickpick_range_end: Quick Pick Variant (Range Ends Today)
|
|
67
68
|
- dropdown_quickpick_default_dates: Quick Pick Variant (Default Dates)
|
|
@@ -31,4 +31,5 @@ export { default as DropdownQuickpickWithDatePickers } from './_dropdown_quickpi
|
|
|
31
31
|
export { default as DropdownQuickpickCustom } from './_dropdown_quickpick_custom.jsx'
|
|
32
32
|
export { default as DropdownWithClearable } from './_dropdown_with_clearable.jsx'
|
|
33
33
|
export { default as DropdownWithConstrainHeight } from './_dropdown_with_constrain_height.jsx'
|
|
34
|
+
export { default as DropdownClosingOptions } from './_dropdown_closing_options.jsx'
|
|
34
35
|
export { default as DropdownRequiredIndicator } from "./_dropdown_required_indicator.jsx";
|
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: 16.3.0.pre.rc.
|
|
4
|
+
version: 16.3.0.pre.rc.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Power UX
|
|
@@ -857,6 +857,8 @@ files:
|
|
|
857
857
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection_react.md
|
|
858
858
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx
|
|
859
859
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md
|
|
860
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options.jsx
|
|
861
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options.md
|
|
860
862
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
|
|
861
863
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
|
|
862
864
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb
|