playbook_ui_docs 13.22.0 → 13.23.0.pre.alpha.PLAY1284investigation2657

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx +1 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx +1 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx +6 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.md +2 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.jsx +1 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx +1 -1
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.jsx +1 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx +1 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx +1 -1
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +1 -1
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data.json +278 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -1
  14. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +26 -0
  15. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +36 -0
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +3 -0
  17. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +2 -0
  18. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
  19. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.html.erb +0 -7
  20. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.jsx +0 -7
  21. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb +7 -0
  22. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx +7 -0
  23. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -2
  24. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +2 -0
  25. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +17 -1
  26. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +18 -2
  27. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes.html.erb +5 -0
  28. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes.jsx +6 -0
  29. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids.md +2 -2
  30. data/app/pb_kits/playbook/pb_multi_level_select/docs/{_multi_level_select_selected_ids.jsx → _multi_level_select_selected_ids_react.jsx} +2 -2
  31. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids_react.md +5 -0
  32. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +1 -1
  33. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -1
  34. data/app/pb_kits/playbook/pb_online_status/docs/_online_status_default.html.erb +6 -9
  35. data/app/pb_kits/playbook/pb_online_status/docs/_online_status_default.jsx +18 -7
  36. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.html.erb +2 -1
  37. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb +2 -2
  38. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_disabled.html.erb +11 -0
  39. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_disabled.jsx +21 -0
  40. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +3 -1
  41. data/app/pb_kits/playbook/pb_toggle/docs/index.js +1 -0
  42. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +51 -0
  43. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +1 -1
  44. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +1 -0
  45. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
  46. data/dist/menu.yml +4 -0
  47. data/dist/playbook-doc.js +10 -10
  48. metadata +14 -7
  49. data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data.js +0 -278
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7816e281e1433333824ea1879e2cdef51fb005be6e30c0d1884727ae7918961e
4
- data.tar.gz: 0f87385e2a060d2501250ff3d79c72fed1ccae96c45c35966065ad9c18ca8a73
3
+ metadata.gz: 06bdd9ccfee263666899576e57d9ef54ccb2e7906006bcf984b7cf156aa9a8f3
4
+ data.tar.gz: 66c6fabfcc30a18004c79541dc5c354387a624261c3460b7c8442ef5872ec712
5
5
  SHA512:
6
- metadata.gz: 8303962599041c59a49fe5ee6f9122676f31ad0d25dde69f437a596462d6e454f39ddf39136e587b3a379c265e4ce4f773605c9eb7eccf1d7f225d4f49722cbd
7
- data.tar.gz: 7e32c83cf7493af7caf4822ee163bc7855f494283822a5e4f54ee2e08be9332c62f97a7c1a81616be2d19d4ea809ffee7d65baffbe4ba4fdb663600696ba68d9
6
+ metadata.gz: 617bf467c44ac9574c0a09f6818234df1d5f8db9f9303a620052ccc748d9112a03ac5c54ed57a0301dd3b091d9b5933ba752d29bbac7368cb9c89a398d69dcb0
7
+ data.tar.gz: 408a9dd519c47b3fde7761c3eccbb4975f12ac4f4d846a0e587b7c7d0ed78c50399196f92599440909a7c473ee5ddf6aa8aaff2a760d0309559d6a5cbca52f28
@@ -1,6 +1,6 @@
1
1
  import React from "react"
2
2
  import { AdvancedTable } from "../../"
3
- import { MOCK_DATA } from "./_mock_data"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
4
 
5
5
  const AdvancedTableCollapsibleTrail = (props) => {
6
6
  const columnDefinitions = [
@@ -1,6 +1,6 @@
1
1
  import React from "react"
2
2
  import { AdvancedTable } from "../../"
3
- import { MOCK_DATA } from "./_mock_data"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
4
 
5
5
  const AdvancedTableDefault = (props) => {
6
6
  const columnDefinitions = [
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from "react"
2
2
  import { AdvancedTable } from "../../"
3
- import { MOCK_DATA } from "./_mock_data"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
4
 
5
5
  const AdvancedTableExpandedControl = (props) => {
6
6
  const columnDefinitions = [
@@ -44,11 +44,16 @@ const AdvancedTableExpandedControl = (props) => {
44
44
  onChange: setExpanded,
45
45
  }
46
46
 
47
+ const onRowToggleClick = (row) => {
48
+ setExpanded({ ...expanded, [row.id]: !expanded[row.id] })
49
+ }
50
+
47
51
  return (
48
52
  <div>
49
53
  <AdvancedTable
50
54
  columnDefinitions={columnDefinitions}
51
55
  expandedControl={expandedControl}
56
+ onRowToggleClick={onRowToggleClick}
52
57
  tableData={MOCK_DATA}
53
58
  {...props}
54
59
  />
@@ -1,3 +1,5 @@
1
+ **NOTE**: If using `expandedControl` the dev is expected to manage the row level expansion state themselves, the kit itself will NOT do it by default.
2
+
1
3
  `expandedControl` is an optional prop that can be used to gain greater control over the expansion state of the Advanced Table. Tanstack handles expansion itself, however it does provide for a way to handle the state manually if needed. Usecases for this include needing to store the expansion state so it persists on page reload, set an initial expansion state, etc.
2
4
 
3
5
  In this example we are showing that if initial expansion state is set, it will render the table expanded according to that state.
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from "react"
2
2
  import { AdvancedTable } from "../../"
3
3
  import { Button } from "../../"
4
- import { MOCK_DATA } from "./_mock_data"
4
+ import MOCK_DATA from "./advanced_table_mock_data.json"
5
5
 
6
6
  const AdvancedTableLoading = (props) => {
7
7
 
@@ -1,6 +1,6 @@
1
1
  import React from "react"
2
2
  import { AdvancedTable } from "../.."
3
- import { MOCK_DATA } from "./_mock_data"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
4
 
5
5
  const AdvancedTableSort = (props) => {
6
6
  const columnDefinitions = [
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from "react"
2
2
  import { AdvancedTable } from "../.."
3
- import { MOCK_DATA } from "./_mock_data"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
4
 
5
5
  const AdvancedTableSortControl = (props) => {
6
6
  const columnDefinitions = [
@@ -1,6 +1,6 @@
1
1
  import React from "react"
2
2
  import { AdvancedTable } from "../.."
3
- import { MOCK_DATA } from "./_mock_data"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
4
 
5
5
  const AdvancedTableSubrowHeaders = (props) => {
6
6
  const columnDefinitions = [
@@ -1,6 +1,6 @@
1
1
  import React from "react"
2
2
  import { AdvancedTable } from "../../"
3
- import { MOCK_DATA } from "./_mock_data"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
4
 
5
5
  const AdvancedTableTableOptions = (props) => {
6
6
  const columnDefinitions = [
@@ -1,6 +1,6 @@
1
1
  import React from "react"
2
2
  import { AdvancedTable } from "../../"
3
- import { MOCK_DATA } from "./_mock_data"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
4
 
5
5
  const AdvancedTableTableProps = (props) => {
6
6
  const columnDefinitions = [
@@ -0,0 +1,278 @@
1
+ [
2
+ {
3
+ "year": "2021",
4
+ "quarter": null,
5
+ "month": null,
6
+ "day": null,
7
+ "newEnrollments": "20",
8
+ "scheduledMeetings": "10",
9
+ "attendanceRate": "51%",
10
+ "completedClasses": "3",
11
+ "classCompletionRate": "33%",
12
+ "graduatedStudents": "19",
13
+ "children": [
14
+ {
15
+ "year": "2021",
16
+ "quarter": "Q1",
17
+ "month": null,
18
+ "day": null,
19
+ "newEnrollments": "2",
20
+ "scheduledMeetings": "35",
21
+ "attendanceRate": "32%",
22
+ "completedClasses": "15",
23
+ "classCompletionRate": "52%",
24
+ "graduatedStudents": "36",
25
+ "children": [
26
+ {
27
+ "year": "2021",
28
+ "quarter": "Q1",
29
+ "month": "January",
30
+ "day": null,
31
+ "newEnrollments": "16",
32
+ "scheduledMeetings": "20",
33
+ "attendanceRate": "11%",
34
+ "completedClasses": "13",
35
+ "classCompletionRate": "47%",
36
+ "graduatedStudents": "28",
37
+ "children": [
38
+ {
39
+ "year": "2021",
40
+ "quarter": "Q1",
41
+ "month": "January",
42
+ "day": "10",
43
+ "newEnrollments": "34",
44
+ "scheduledMeetings": "28",
45
+ "attendanceRate": "97%",
46
+ "completedClasses": "20",
47
+ "classCompletionRate": "15%",
48
+ "graduatedStudents": "17"
49
+ },
50
+ {
51
+ "year": "2021",
52
+ "quarter": "Q1",
53
+ "month": "January",
54
+ "day": "20",
55
+ "newEnrollments": "43",
56
+ "scheduledMeetings": "23",
57
+ "attendanceRate": "66%",
58
+ "completedClasses": "26",
59
+ "classCompletionRate": "47%",
60
+ "graduatedStudents": "9"
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "year": "2021",
66
+ "quarter": "Q1",
67
+ "month": "February",
68
+ "day": null,
69
+ "newEnrollments": "20",
70
+ "scheduledMeetings": "41",
71
+ "attendanceRate": "95%",
72
+ "completedClasses": "26",
73
+ "classCompletionRate": "83%",
74
+ "graduatedStudents": "43",
75
+ "children": [
76
+ {
77
+ "year": "2021",
78
+ "quarter": "Q1",
79
+ "month": "February",
80
+ "day": "15",
81
+ "newEnrollments": "19",
82
+ "scheduledMeetings": "35",
83
+ "attendanceRate": "69%",
84
+ "completedClasses": "8",
85
+ "classCompletionRate": "75%",
86
+ "graduatedStudents": "23"
87
+ }
88
+ ]
89
+ }
90
+ ]
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ "year": "2022",
96
+ "quarter": null,
97
+ "month": null,
98
+ "day": null,
99
+ "newEnrollments": "25",
100
+ "scheduledMeetings": "17",
101
+ "attendanceRate": "75%",
102
+ "completedClasses": "5",
103
+ "classCompletionRate": "45%",
104
+ "graduatedStudents": "32",
105
+ "children": [
106
+ {
107
+ "year": "2022",
108
+ "quarter": "Q1",
109
+ "month": null,
110
+ "day": null,
111
+ "newEnrollments": "2",
112
+ "scheduledMeetings": "35",
113
+ "attendanceRate": "32%",
114
+ "completedClasses": "15",
115
+ "classCompletionRate": "52%",
116
+ "graduatedStudents": "36",
117
+ "children": [
118
+ {
119
+ "year": "2022",
120
+ "quarter": "Q1",
121
+ "month": "January",
122
+ "day": null,
123
+ "newEnrollments": "16",
124
+ "scheduledMeetings": "20",
125
+ "attendanceRate": "11%",
126
+ "completedClasses": "13",
127
+ "classCompletionRate": "47%",
128
+ "graduatedStudents": "28",
129
+ "children": [
130
+ {
131
+ "year": "2022",
132
+ "quarter": "Q1",
133
+ "month": "January",
134
+ "day": "15",
135
+ "newEnrollments": "34",
136
+ "scheduledMeetings": "28",
137
+ "attendanceRate": "97%",
138
+ "completedClasses": "20",
139
+ "classCompletionRate": "15%",
140
+ "graduatedStudents": "17"
141
+ },
142
+ {
143
+ "year": "2022",
144
+ "quarter": "Q1",
145
+ "month": "January",
146
+ "day": "25",
147
+ "newEnrollments": "43",
148
+ "scheduledMeetings": "23",
149
+ "attendanceRate": "66%",
150
+ "completedClasses": "26",
151
+ "classCompletionRate": "47%",
152
+ "graduatedStudents": "9"
153
+ }
154
+ ]
155
+ },
156
+ {
157
+ "year": "2022",
158
+ "quarter": "Q1",
159
+ "month": "May",
160
+ "day": null,
161
+ "newEnrollments": "20",
162
+ "scheduledMeetings": "41",
163
+ "attendanceRate": "95%",
164
+ "completedClasses": "26",
165
+ "classCompletionRate": "83%",
166
+ "graduatedStudents": "43",
167
+ "children": [
168
+ {
169
+ "year": "2022",
170
+ "quarter": "Q1",
171
+ "month": "May",
172
+ "day": "2",
173
+ "newEnrollments": "19",
174
+ "scheduledMeetings": "35",
175
+ "attendanceRate": "69%",
176
+ "completedClasses": "8",
177
+ "classCompletionRate": "75%",
178
+ "graduatedStudents": "23"
179
+ }
180
+ ]
181
+ }
182
+ ]
183
+ }
184
+ ]
185
+ },
186
+ {
187
+ "year": "2023",
188
+ "quarter": null,
189
+ "month": null,
190
+ "day": null,
191
+ "newEnrollments": "10",
192
+ "scheduledMeetings": "15",
193
+ "attendanceRate": "65%",
194
+ "completedClasses": "4",
195
+ "classCompletionRate": "49%",
196
+ "graduatedStudents": "29",
197
+ "children": [
198
+ {
199
+ "year": "2023",
200
+ "quarter": "Q1",
201
+ "month": null,
202
+ "day": null,
203
+ "newEnrollments": "2",
204
+ "scheduledMeetings": "35",
205
+ "attendanceRate": "32%",
206
+ "completedClasses": "15",
207
+ "classCompletionRate": "52%",
208
+ "graduatedStudents": "36",
209
+ "children": [
210
+ {
211
+ "year": "2023",
212
+ "quarter": "Q1",
213
+ "month": "March",
214
+ "day": null,
215
+ "newEnrollments": "16",
216
+ "scheduledMeetings": "20",
217
+ "attendanceRate": "11%",
218
+ "completedClasses": "13",
219
+ "classCompletionRate": "47%",
220
+ "graduatedStudents": "28",
221
+ "children": [
222
+ {
223
+ "year": "2023",
224
+ "quarter": "Q1",
225
+ "month": "March",
226
+ "day": "10",
227
+ "newEnrollments": "34",
228
+ "scheduledMeetings": "28",
229
+ "attendanceRate": "97%",
230
+ "completedClasses": "20",
231
+ "classCompletionRate": "15%",
232
+ "graduatedStudents": "17"
233
+ },
234
+ {
235
+ "year": "2023",
236
+ "quarter": "Q1",
237
+ "month": "March",
238
+ "day": "11",
239
+ "newEnrollments": "43",
240
+ "scheduledMeetings": "23",
241
+ "attendanceRate": "66%",
242
+ "completedClasses": "26",
243
+ "classCompletionRate": "47%",
244
+ "graduatedStudents": "9"
245
+ }
246
+ ]
247
+ },
248
+ {
249
+ "year": "2023",
250
+ "quarter": "Q1",
251
+ "month": "April",
252
+ "day": null,
253
+ "newEnrollments": "20",
254
+ "scheduledMeetings": "41",
255
+ "attendanceRate": "95%",
256
+ "completedClasses": "26",
257
+ "classCompletionRate": "83%",
258
+ "graduatedStudents": "43",
259
+ "children": [
260
+ {
261
+ "year": "2023",
262
+ "quarter": "Q1",
263
+ "month": "April",
264
+ "day": "15",
265
+ "newEnrollments": "19",
266
+ "scheduledMeetings": "35",
267
+ "attendanceRate": "69%",
268
+ "completedClasses": "8",
269
+ "classCompletionRate": "75%",
270
+ "graduatedStudents": "23"
271
+ }
272
+ ]
273
+ }
274
+ ]
275
+ }
276
+ ]
277
+ }
278
+ ]
@@ -1,6 +1,6 @@
1
1
  examples:
2
2
  # rails:
3
- # - advanced_table_default: Default (Required Props)
3
+ # - advanced_table_default: Default (Required Props)
4
4
  react:
5
5
  - advanced_table_default: Default (Required Props)
6
6
  - advanced_table_loading: Loading State
@@ -0,0 +1,26 @@
1
+ <% data = [{
2
+ name: 'Number of Installations',
3
+ data: [1475,200,3000,654,656]
4
+ }, {
5
+ type: 'spline',
6
+ name: 'Percentage',
7
+ data: [48, 70, 25, 55, 72],
8
+ color: '#F9BB00',
9
+ yAxis: 1
10
+ }] %>
11
+
12
+ <% axis_titles = [{name: "Number of Installations"}, {name: "Percentage"}] %>
13
+
14
+ <% axis_formats = [{format: ""}, {format: "{value}%"}] %>
15
+
16
+ <%= pb_rails("bar_graph", props: {
17
+ axis_format: axis_formats,
18
+ axis_title: axis_titles,
19
+ chart_data: data,
20
+ id: "bar-spline",
21
+ y_axis_min: 0,
22
+ x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
23
+ subtitle: 'Source: thesolarfoundation.com',
24
+ title: 'Bar Graph with Secondary Y-axis',
25
+ legend: true,
26
+ }) %>
@@ -0,0 +1,36 @@
1
+ import React from 'react'
2
+
3
+ import BarGraph from '../_bar_graph'
4
+
5
+ const chartData = [{
6
+ name: 'Number of Installations',
7
+ data: [1475, 200, 3000, 654, 656],
8
+ }, {
9
+ type: 'spline',
10
+ name: 'Percentage',
11
+ data: [48, 70, 25, 55, 72],
12
+ color: '#F9BB00',
13
+ yAxis: 1
14
+ }]
15
+
16
+ const axisTitles = [ {name: "Number of Installations"}, {name: "Percentage"}]
17
+
18
+ const axisFormats = [{format: ""}, {format: "{value}%"}]
19
+
20
+ const BarGraphSecondaryYAxis= (props) => (
21
+ <div>
22
+ <BarGraph
23
+ axisFormat={axisFormats}
24
+ axisTitle={axisTitles}
25
+ chartData={chartData}
26
+ id="bar-spline"
27
+ legend
28
+ title="Bar Graph with Secondary Y-axis"
29
+ xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
30
+ yAxisMin={0}
31
+ {...props}
32
+ />
33
+ </div>
34
+ )
35
+
36
+ export default BarGraphSecondaryYAxis
@@ -0,0 +1,3 @@
1
+ Optionally add a second yAxis to support secondary datasets (e.x., a spline) by passing` yAxis: 1` to the second node of your `chartData` array.
2
+
3
+ To customize the format and/or title of your secondary yAxis, pass your desired values as arrays through the `axisFormat` and `axisTitle` props, respectively.
@@ -9,6 +9,7 @@ examples:
9
9
  - bar_graph_spline: Spline
10
10
  - bar_graph_colors: Color Overrides
11
11
  - bar_graph_custom: Custom Overrides
12
+ - bar_graph_secondary_y_axis: Secondary Y-Axis
12
13
 
13
14
 
14
15
  react:
@@ -20,3 +21,4 @@ examples:
20
21
  - bar_graph_spline: Spline
21
22
  - bar_graph_colors: Color Overrides
22
23
  - bar_graph_custom: Custom Overrides
24
+ - bar_graph_secondary_y_axis: Secondary Y-Axis
@@ -6,3 +6,4 @@ export { default as BarGraphHeight } from './_bar_graph_height.jsx'
6
6
  export { default as BarGraphSpline } from './_bar_graph_spline.jsx'
7
7
  export { default as BarGraphColors } from './_bar_graph_colors.jsx'
8
8
  export { default as BarGraphCustom } from './_bar_graph_custom.jsx'
9
+ export { default as BarGraphSecondaryYAxis } from './_bar_graph_secondary_y_axis.jsx'
@@ -10,13 +10,6 @@
10
10
  picker_id: "date-picker-default-date2"
11
11
  }) %>
12
12
 
13
- <%= pb_rails("date_picker", props: {
14
- default_date: [DateTime.current.utc.iso8601, (DateTime.current + 7.day).utc.iso8601],
15
- label: "Default Date Range",
16
- mode: "range",
17
- picker_id: "date-picker-default-date3"
18
- }) %>
19
-
20
13
  <%= pb_rails("date_picker", props: {
21
14
  label: "Default Behavior",
22
15
  picker_id: "date-picker-default-date4"
@@ -16,13 +16,6 @@ const DatePickerDefaultDate = (props) => (
16
16
  pickerId="date-picker-default-date2"
17
17
  {...props}
18
18
  />
19
- <DatePicker
20
- defaultDate={[new Date(), new Date().fp_incr(7)]}
21
- label="Default Date Range"
22
- mode="range"
23
- pickerId="date-picker-default-date3"
24
- {...props}
25
- />
26
19
  <DatePicker
27
20
  label="Default Behavior"
28
21
  pickerId="date-picker-default-date4"
@@ -2,4 +2,11 @@
2
2
  default_date: [DateTime.current.utc.iso8601, (DateTime.current + 7.day).utc.iso8601],
3
3
  mode: "range",
4
4
  picker_id: "date-picker-range"
5
+ }) %>
6
+
7
+ <%= pb_rails("date_picker", props: {
8
+ default_date: [DateTime.current.utc.iso8601, (DateTime.current + 7.day).utc.iso8601],
9
+ label: "Default Date Range",
10
+ mode: "range",
11
+ picker_id: "date-picker-default-date3"
5
12
  }) %>
@@ -10,6 +10,13 @@ const DatePickerRange = (props) => (
10
10
  pickerId="date-picker-range"
11
11
  {...props}
12
12
  />
13
+ <DatePicker
14
+ defaultDate={[new Date(), new Date().fp_incr(7)]}
15
+ label="Default Date Range"
16
+ mode="range"
17
+ pickerId="date-picker-default-date3"
18
+ {...props}
19
+ />
13
20
  </div>
14
21
  )
15
22
 
@@ -7,7 +7,7 @@ examples:
7
7
  - date_picker_allow_input: Allow Input
8
8
  - date_picker_input: Input Field
9
9
  - date_picker_label: Label
10
- - date_picker_range: Range
10
+ # - date_picker_range: Range
11
11
  - date_picker_quick_pick_rails: Range (Quick Pick)
12
12
  - date_picker_quick_pick_range_limit: Range (Quick Pick w/ “This” Range limit)
13
13
  - date_picker_quick_pick_custom: Custom Quick Pick Dates
@@ -37,7 +37,7 @@ examples:
37
37
  - date_picker_label: Label
38
38
  - date_picker_on_change: onChange
39
39
  - date_picker_on_close: onClose
40
- - date_picker_range: Range
40
+ # - date_picker_range: Range
41
41
  - date_picker_quick_pick_react: Range (Quick Pick)
42
42
  - date_picker_quick_pick_range_limit: Range (Quick Pick w/ “This” Range limit)
43
43
  - date_picker_quick_pick_custom: Custom Quick Pick Dates
@@ -1,6 +1,7 @@
1
1
  <%= pb_rails("button", props: { text: "Open Complex Dialog", data:{"open-dialog": "dialog-complex"} }) %>
2
2
 
3
3
  <%= pb_rails("dialog", props: { id:"dialog-complex", size: "lg", full_height: true }) do %>
4
+ <form>
4
5
  <%= pb_rails("dialog/dialog_header", props: { id: "dialog-complex" } ) do %>
5
6
  <%= pb_rails("body", props: { text: "What do you need us to take care of?" }) %>
6
7
  <% end %>
@@ -12,4 +13,5 @@
12
13
 
13
14
  <% end %>
14
15
  <%= pb_rails("dialog/dialog_footer", props: {cancel_button: "Back", confirm_button: "Send my Issue", confirm_button_id:"confirm-complex", id: "dialog-complex"}) %>
16
+ </form>
15
17
  <% end %>
@@ -1,6 +1,7 @@
1
1
  <div>
2
+
2
3
  <%= pb_rails("form_group") do %>
3
- <%= pb_rails("text_input", props: { label: "Artist", placeholder: "Enter Artist Name" }) %>
4
+ <%= pb_rails("text_input", props: { placeholder: "Enter Artist Name" }) %>
4
5
  <%= pb_rails("select", props: {
5
6
  blank_selection: "Genre",
6
7
  options: [
@@ -16,4 +17,19 @@
16
17
  ]
17
18
  }) %>
18
19
  <% end %>
20
+ <br>
21
+ <br>
22
+ <%= pb_rails("form_group") do %>
23
+ <%= pb_rails("select", props: {
24
+ blank_selection: "Phone",
25
+ options: [
26
+ { value: "Cell" },
27
+ { value: "Work" },
28
+ { value: "Home" },
29
+ ]
30
+ }) %>
31
+ <%= pb_rails("phone_number_input", props: {
32
+ id: "phone"
33
+ }) %>
34
+ <% end %>
19
35
  </div>
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
 
3
3
  import FormGroup from '../_form_group'
4
-
4
+ import PhoneNumberInput from '../../pb_phone_number_input/_phone_number_input'
5
5
  import Select from '../../pb_select/_select'
6
6
  import TextInput from '../../pb_text_input/_text_input'
7
7
 
@@ -18,11 +18,16 @@ const FormGroupSelect = (props) => {
18
18
  { value: 'Other' },
19
19
  ]
20
20
 
21
+ const phoneOptions = [
22
+ { value: 'Cell' },
23
+ { value: 'Work' },
24
+ { value: 'Home' },
25
+ ]
26
+
21
27
  return (
22
28
  <div>
23
29
  <FormGroup>
24
30
  <TextInput
25
- label="Artist"
26
31
  placeholder="Enter Artist Name"
27
32
  {...props}
28
33
  />
@@ -32,6 +37,17 @@ const FormGroupSelect = (props) => {
32
37
  {...props}
33
38
  />
34
39
  </FormGroup>
40
+ <br />
41
+ <br />
42
+ <FormGroup>
43
+ <Select
44
+ blankSelection="Phone"
45
+ options={phoneOptions}
46
+ />
47
+ <PhoneNumberInput
48
+ id='default'
49
+ />
50
+ </FormGroup>
35
51
  </div>
36
52
  )
37
53
  }