playbook_ui_docs 16.2.0.pre.alpha.play2560linkkitcolorstyle14407 → 16.2.0.pre.alpha.play2753dropdownaddedclosingprops14377
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_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 +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c57af69daca09d632f1e5ad684fa60e0e12b297c8f79b2fd6c7e3f6c6fba830
|
|
4
|
+
data.tar.gz: 8513facdc1f475564f4257e11d0380888068e4a05c900bca6c342bdc078eb072
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e56139cde0b70d66007354146c7786d68757675711d165beb86cdf81d279c63ceaa55406e3ab580da940c50f6ad89b0ae2a498660bc846f1439cfb1d360f165
|
|
7
|
+
data.tar.gz: fa9198940b70efe81f9e1edfba8e97786943f248ac1958331461a946063067d36e3443a2e41b35d16c7fe3a60bfff8ef308f2618b2b086880b4d53e80715f75b
|
|
@@ -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.2.0.pre.alpha.
|
|
4
|
+
version: 16.2.0.pre.alpha.play2753dropdownaddedclosingprops14377
|
|
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: 2026-02-
|
|
12
|
+
date: 2026-02-12 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: playbook_ui
|
|
@@ -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
|