playbook_ui_docs 14.9.0.pre.alpha.PLAY1731inputmasking4927 → 14.9.0.pre.alpha.PLAY16264952
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_checkbox/docs/_checkbox_form.jsx +138 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +7 -6
- data/app/pb_kits/playbook/pb_checkbox/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_form.jsx +109 -0
- data/app/pb_kits/playbook/pb_select/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_select/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
- data/dist/playbook-doc.js +1 -1
- metadata +4 -3
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.jsx +0 -88
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: 14.9.0.pre.alpha.
|
4
|
+
version: 14.9.0.pre.alpha.PLAY16264952
|
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-12-
|
12
|
+
date: 2024-12-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: playbook_ui
|
@@ -323,6 +323,7 @@ files:
|
|
323
323
|
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error.html.erb
|
324
324
|
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error.jsx
|
325
325
|
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error_swift.md
|
326
|
+
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_form.jsx
|
326
327
|
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb
|
327
328
|
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.jsx
|
328
329
|
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_swift.md
|
@@ -1562,6 +1563,7 @@ files:
|
|
1562
1563
|
- app/pb_kits/playbook/pb_select/docs/_select_error.jsx
|
1563
1564
|
- app/pb_kits/playbook/pb_select/docs/_select_error.md
|
1564
1565
|
- app/pb_kits/playbook/pb_select/docs/_select_error_swift.md
|
1566
|
+
- app/pb_kits/playbook/pb_select/docs/_select_form.jsx
|
1565
1567
|
- app/pb_kits/playbook/pb_select/docs/_select_inline.html.erb
|
1566
1568
|
- app/pb_kits/playbook/pb_select/docs/_select_inline.jsx
|
1567
1569
|
- app/pb_kits/playbook/pb_select/docs/_select_inline_compact.html.erb
|
@@ -1800,7 +1802,6 @@ files:
|
|
1800
1802
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_error_swift.md
|
1801
1803
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.html.erb
|
1802
1804
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.jsx
|
1803
|
-
- app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.jsx
|
1804
1805
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_no_label.html.erb
|
1805
1806
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_no_label.jsx
|
1806
1807
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_options.html.erb
|
@@ -1,88 +0,0 @@
|
|
1
|
-
import React, { useState } from 'react'
|
2
|
-
|
3
|
-
import Caption from '../../pb_caption/_caption'
|
4
|
-
import TextInput from '../../pb_text_input/_text_input'
|
5
|
-
import Title from '../../pb_title/_title'
|
6
|
-
|
7
|
-
const TextInputMask = (props) => {
|
8
|
-
const [ssn, setSSN] = useState('')
|
9
|
-
const handleOnChangeSSN = ({ target }) => {
|
10
|
-
setSSN(target.value)
|
11
|
-
}
|
12
|
-
const ref = React.createRef()
|
13
|
-
|
14
|
-
const [formFields, setFormFields] = useState({
|
15
|
-
currency: '',
|
16
|
-
zipCode: '',
|
17
|
-
postalCode: '',
|
18
|
-
ssn: '',
|
19
|
-
})
|
20
|
-
|
21
|
-
const handleOnChangeFormField = ({ target }) => {
|
22
|
-
const { name, value } = target
|
23
|
-
setFormFields({ ...formFields, [name]: value })
|
24
|
-
}
|
25
|
-
|
26
|
-
return (
|
27
|
-
<div>
|
28
|
-
<TextInput
|
29
|
-
label="Currency"
|
30
|
-
mask="currency"
|
31
|
-
name="currency"
|
32
|
-
onChange={handleOnChangeFormField}
|
33
|
-
value={formFields.currency}
|
34
|
-
{...props}
|
35
|
-
/>
|
36
|
-
<TextInput
|
37
|
-
label="Zip Code"
|
38
|
-
mask="zipCode"
|
39
|
-
name="zipCode"
|
40
|
-
onChange={handleOnChangeFormField}
|
41
|
-
value={formFields.zipCode}
|
42
|
-
{...props}
|
43
|
-
/>
|
44
|
-
<TextInput
|
45
|
-
label="Postal Code"
|
46
|
-
mask="postalCode"
|
47
|
-
name="postalCode"
|
48
|
-
onChange={handleOnChangeFormField}
|
49
|
-
value={formFields.postalCode}
|
50
|
-
{...props}
|
51
|
-
/>
|
52
|
-
<TextInput
|
53
|
-
label="SSN"
|
54
|
-
mask="ssn"
|
55
|
-
name="ssn"
|
56
|
-
onChange={handleOnChangeFormField}
|
57
|
-
value={formFields.ssn}
|
58
|
-
{...props}
|
59
|
-
/>
|
60
|
-
|
61
|
-
<br />
|
62
|
-
<br />
|
63
|
-
|
64
|
-
<Title>{'Event Handler Props'}</Title>
|
65
|
-
|
66
|
-
<br />
|
67
|
-
<Caption>{'onChange'}</Caption>
|
68
|
-
|
69
|
-
<br />
|
70
|
-
|
71
|
-
<TextInput
|
72
|
-
label="SSN"
|
73
|
-
mask="ssn"
|
74
|
-
onChange={handleOnChangeSSN}
|
75
|
-
placeholder="Enter SSN"
|
76
|
-
ref={ref}
|
77
|
-
value={ssn}
|
78
|
-
{...props}
|
79
|
-
/>
|
80
|
-
|
81
|
-
{ssn !== '' && (
|
82
|
-
<React.Fragment>{`SSN is: ${ssn}`}</React.Fragment>
|
83
|
-
)}
|
84
|
-
</div>
|
85
|
-
)
|
86
|
-
}
|
87
|
-
|
88
|
-
export default TextInputMask
|