playbook_ui_docs 14.9.0.pre.alpha.PLAY16264818 → 14.9.0.pre.alpha.play1703errorstatealignment4889
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +6 -0
- data/app/pb_kits/playbook/pb_select/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_select/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb +95 -0
- data/dist/playbook-doc.js +1 -1
- metadata +3 -3
- data/app/pb_kits/playbook/pb_select/docs/_select_form.jsx +0 -108
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.play1703errorstatealignment4889
|
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-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: playbook_ui
|
@@ -1562,7 +1562,6 @@ files:
|
|
1562
1562
|
- app/pb_kits/playbook/pb_select/docs/_select_error.jsx
|
1563
1563
|
- app/pb_kits/playbook/pb_select/docs/_select_error.md
|
1564
1564
|
- app/pb_kits/playbook/pb_select/docs/_select_error_swift.md
|
1565
|
-
- app/pb_kits/playbook/pb_select/docs/_select_form.jsx
|
1566
1565
|
- app/pb_kits/playbook/pb_select/docs/_select_inline.html.erb
|
1567
1566
|
- app/pb_kits/playbook/pb_select/docs/_select_inline.jsx
|
1568
1567
|
- app/pb_kits/playbook/pb_select/docs/_select_inline_compact.html.erb
|
@@ -1747,6 +1746,7 @@ files:
|
|
1747
1746
|
- app/pb_kits/playbook/pb_table/docs/_table_sticky.html.erb
|
1748
1747
|
- app/pb_kits/playbook/pb_table/docs/_table_sticky.jsx
|
1749
1748
|
- app/pb_kits/playbook/pb_table/docs/_table_sticky.md
|
1749
|
+
- app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb
|
1750
1750
|
- app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx
|
1751
1751
|
- app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md
|
1752
1752
|
- app/pb_kits/playbook/pb_table/docs/_table_striped.html.erb
|
@@ -1,108 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { useForm } from 'react-hook-form'
|
3
|
-
import { Select, Card, Body, Button } from 'playbook-ui'
|
4
|
-
|
5
|
-
const SelectForm = (props) => {
|
6
|
-
const {
|
7
|
-
register,
|
8
|
-
handleSubmit,
|
9
|
-
formState: { errors },
|
10
|
-
watch,
|
11
|
-
} = useForm({
|
12
|
-
defaultValues: {
|
13
|
-
favoriteFood: '',
|
14
|
-
mealType: '',
|
15
|
-
dietaryRestrictions: '',
|
16
|
-
}
|
17
|
-
})
|
18
|
-
|
19
|
-
const onSubmit = (data) => {
|
20
|
-
console.log('Form submitted:', data)
|
21
|
-
}
|
22
|
-
|
23
|
-
// Watch form values for real-time display
|
24
|
-
const formValues = watch()
|
25
|
-
|
26
|
-
const foodOptions = [
|
27
|
-
{ value: 'pizza', text: 'Pizza' },
|
28
|
-
{ value: 'burger', text: 'Burger' },
|
29
|
-
{ value: 'sushi', text: 'Sushi' },
|
30
|
-
{ value: 'salad', text: 'Salad' },
|
31
|
-
]
|
32
|
-
|
33
|
-
const mealTypes = [
|
34
|
-
{ value: 'breakfast', text: 'Breakfast' },
|
35
|
-
{ value: 'lunch', text: 'Lunch' },
|
36
|
-
{ value: 'dinner', text: 'Dinner' },
|
37
|
-
]
|
38
|
-
|
39
|
-
const dietaryOptions = [
|
40
|
-
{ value: 'none', text: 'No Restrictions' },
|
41
|
-
{ value: 'vegetarian', text: 'Vegetarian' },
|
42
|
-
{ value: 'vegan', text: 'Vegan' },
|
43
|
-
{ value: 'glutenFree', text: 'Gluten Free' },
|
44
|
-
]
|
45
|
-
|
46
|
-
return (
|
47
|
-
<div>
|
48
|
-
<Card>
|
49
|
-
<form onSubmit={handleSubmit(onSubmit)}>
|
50
|
-
<Select
|
51
|
-
error={errors.favoriteFood?.message}
|
52
|
-
label="What's your favorite food?"
|
53
|
-
name="favoriteFood"
|
54
|
-
options={foodOptions}
|
55
|
-
register={register}
|
56
|
-
rules={{
|
57
|
-
required: 'Please select your favorite food',
|
58
|
-
}}
|
59
|
-
{...props}
|
60
|
-
/>
|
61
|
-
<Select
|
62
|
-
blankSelection="Choose a meal type..."
|
63
|
-
error={errors.mealType?.message}
|
64
|
-
label="Preferred meal time"
|
65
|
-
marginTop="md"
|
66
|
-
name="mealType"
|
67
|
-
options={mealTypes}
|
68
|
-
register={register}
|
69
|
-
rules={{
|
70
|
-
required: 'Please select a meal type',
|
71
|
-
}}
|
72
|
-
{...props}
|
73
|
-
/>
|
74
|
-
<Select
|
75
|
-
label="Dietary Restrictions"
|
76
|
-
marginTop="md"
|
77
|
-
name="dietaryRestrictions"
|
78
|
-
options={dietaryOptions}
|
79
|
-
register={register}
|
80
|
-
{...props}
|
81
|
-
/>
|
82
|
-
|
83
|
-
<Button
|
84
|
-
marginTop="lg"
|
85
|
-
text="Submit"
|
86
|
-
type="submit"
|
87
|
-
variant="primary"
|
88
|
-
|
89
|
-
/>
|
90
|
-
</form>
|
91
|
-
<Card marginTop="lg">
|
92
|
-
<Body
|
93
|
-
text="Current Form Values:"
|
94
|
-
variant="bold"
|
95
|
-
/>
|
96
|
-
<pre style={{ marginTop: '8px', color: "white" }}>
|
97
|
-
{JSON.stringify(formValues, null, 2)}
|
98
|
-
</pre>
|
99
|
-
</Card>
|
100
|
-
</Card>
|
101
|
-
</div>
|
102
|
-
)
|
103
|
-
}
|
104
|
-
|
105
|
-
export default SelectForm
|
106
|
-
|
107
|
-
|
108
|
-
|