playbook_ui_docs 14.20.0.pre.alpha.PLAY21817891 → 14.20.0.pre.alpha.PLAY22297977
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_phone_number_input/docs/_phone_number_input_exclude_countries.html.erb +4 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.jsx +15 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.md +1 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_only_countries.jsx +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +4 -3
- data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.html.erb +12 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.jsx +31 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_custom_select_subheaders.md +1 -0
- data/app/pb_kits/playbook/pb_select/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_select/docs/index.js +1 -0
- data/dist/playbook-doc.js +2 -2
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5407a05b5997168c86ac5eeb9d7ec4daf57da816845ab0015ba4204fff12c97
|
4
|
+
data.tar.gz: a0b2f983742677a32376f5f257d419556c0dfa5a68a03744e834ce1a721793da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c32cc337a131347855072e8af4ec91cb008fb2469a09e3e65b33c1747575d5dbf1b7adb7e021e185fe1f7218efd6e0bfe1bb01217c4068139b9555d416853429
|
7
|
+
data.tar.gz: 4a57a452fa50dc91a051ce89a50be24828c30d0ea1a747aea7cf5d55031989508e9697b811716242b0532d3b3207e0de4bbde114166c1d686d87a8f7a7f0b21a
|
data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_exclude_countries.jsx
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PhoneNumberInput from '../../pb_phone_number_input/_phone_number_input'
|
3
|
+
|
4
|
+
const PhoneNumberInputExcludeCountries = (props) => (
|
5
|
+
<>
|
6
|
+
<PhoneNumberInput
|
7
|
+
excludeCountries={['us', 'br']}
|
8
|
+
id='exclude'
|
9
|
+
initialCountry='gb'
|
10
|
+
{...props}
|
11
|
+
/>
|
12
|
+
</>
|
13
|
+
)
|
14
|
+
|
15
|
+
export default PhoneNumberInputExcludeCountries
|
@@ -0,0 +1 @@
|
|
1
|
+
Excluding countries removes the selected countries from the dropdown.
|
@@ -4,7 +4,8 @@ examples:
|
|
4
4
|
- phone_number_input_default: Default
|
5
5
|
- phone_number_input_preferred_countries: Preferred Countries
|
6
6
|
- phone_number_input_initial_country: Initial Country
|
7
|
-
- phone_number_input_only_countries:
|
7
|
+
- phone_number_input_only_countries: Only Countries
|
8
|
+
- phone_number_input_exclude_countries: Exclude Countries
|
8
9
|
- phone_number_input_validation: Form Validation
|
9
10
|
- phone_number_input_clear_field: Clearing the Input Field
|
10
11
|
- phone_number_input_access_input_element: Accessing the Input Element
|
@@ -15,9 +16,9 @@ examples:
|
|
15
16
|
- phone_number_input_default: Default
|
16
17
|
- phone_number_input_preferred_countries: Preferred Countries
|
17
18
|
- phone_number_input_initial_country: Initial Country
|
18
|
-
- phone_number_input_only_countries:
|
19
|
+
- phone_number_input_only_countries: Only Countries
|
20
|
+
- phone_number_input_exclude_countries: Exclude Countries
|
19
21
|
- phone_number_input_validation: Form Validation
|
20
22
|
- phone_number_input_format: Format as You Type
|
21
23
|
- phone_number_input_hidden_inputs: Hidden Inputs
|
22
24
|
- phone_number_input_country_search: Country Search
|
23
|
-
|
@@ -2,6 +2,7 @@ export { default as PhoneNumberInputDefault } from './_phone_number_input_defaul
|
|
2
2
|
export { default as PhoneNumberInputPreferredCountries } from './_phone_number_input_preferred_countries'
|
3
3
|
export { default as PhoneNumberInputInitialCountry } from './_phone_number_input_initial_country'
|
4
4
|
export { default as PhoneNumberInputOnlyCountries } from './_phone_number_input_only_countries'
|
5
|
+
export { default as PhoneNumberInputExcludeCountries } from './_phone_number_input_exclude_countries'
|
5
6
|
export { default as PhoneNumberInputValidation } from './_phone_number_input_validation'
|
6
7
|
export { default as PhoneNumberInputClearField } from './_phone_number_input_clear_field'
|
7
8
|
export { default as PhoneNumberInputAccessInputElement } from './_phone_number_input_access_input_element'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= pb_rails("select", props: { label: "Favorite Animal" }) do %>
|
2
|
+
<select name="animal" id="animal">
|
3
|
+
<optgroup label="Mammal">
|
4
|
+
<option value="1">Cat</option>
|
5
|
+
<option value="2">Dog</option>
|
6
|
+
</optgroup>
|
7
|
+
<optgroup label="Amphibian">
|
8
|
+
<option value="3">Frog</option>
|
9
|
+
<option value="4">Salamander</option>
|
10
|
+
</optgroup>
|
11
|
+
</select>
|
12
|
+
<% end %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Select from '../_select'
|
4
|
+
|
5
|
+
const SelectCustomSelectSubheaders = (props) => {
|
6
|
+
return (
|
7
|
+
<div>
|
8
|
+
<Select
|
9
|
+
label="Favorite Animal"
|
10
|
+
{...props}
|
11
|
+
>
|
12
|
+
<select
|
13
|
+
id="animal"
|
14
|
+
name="animal"
|
15
|
+
{...props}
|
16
|
+
>
|
17
|
+
<optgroup label="Mammal">
|
18
|
+
<option value="1">{'Cat'}</option>
|
19
|
+
<option value="2">{'Dog'}</option>
|
20
|
+
</optgroup>
|
21
|
+
<optgroup label="Amphibian">
|
22
|
+
<option value="3">{'Frog'}</option>
|
23
|
+
<option value="4">{'Salamander'}</option>
|
24
|
+
</optgroup>
|
25
|
+
</select>
|
26
|
+
</Select>
|
27
|
+
</div>
|
28
|
+
)
|
29
|
+
}
|
30
|
+
|
31
|
+
export default SelectCustomSelectSubheaders
|
@@ -0,0 +1 @@
|
|
1
|
+
To create a select with non-selectable subheaders, use a Custom Select component to render a native `<select>` containing `<optgroup>` elements. The [optgroup HTML element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/optgroup) groups related options under a non-selectable label in the dropdown.
|
@@ -8,6 +8,7 @@ examples:
|
|
8
8
|
- select_required: Required Select Field
|
9
9
|
- select_value_text_same: Equal option value and value text
|
10
10
|
- select_custom_select: Custom Select
|
11
|
+
- select_custom_select_subheaders: Custom Select Subheaders
|
11
12
|
- select_error: Select w/ Error
|
12
13
|
- select_inline: Select Inline
|
13
14
|
- select_inline_show_arrow: Select Inline (Always Show Arrow)
|
@@ -25,6 +26,7 @@ examples:
|
|
25
26
|
- select_required: Required Select Field
|
26
27
|
- select_value_text_same: Equal option value and value text
|
27
28
|
- select_custom_select: Custom Select
|
29
|
+
- select_custom_select_subheaders: Custom Select Subheaders
|
28
30
|
- select_error: Select w/ Error
|
29
31
|
- select_inline: Select Inline
|
30
32
|
- select_inline_show_arrow: Select Inline (Always Show Arrow)
|
@@ -11,3 +11,4 @@ export { default as SelectInlineShowArrow } from './_select_inline_show_arrow.js
|
|
11
11
|
export { default as SelectInlineCompact } from './_select_inline_compact.jsx'
|
12
12
|
export { default as SelectMultiple } from './_select_multiple.jsx'
|
13
13
|
export { default as SelectReactHook } from './_select_react_hook.jsx'
|
14
|
+
export { default as SelectCustomSelectSubheaders } from './_select_custom_select_subheaders.jsx'
|