playbook_ui 15.3.0.pre.alpha.play202412165 → 15.3.0.pre.alpha.play249512047
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_advanced_table/Components/RegularTableView.tsx +1 -2
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/RowUtils.ts +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +5 -68
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +0 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md +0 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.html.erb +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md +0 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.jsx +1 -9
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.jsx +0 -16
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/flat_advanced_table.js +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/index.js +7 -7
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +20 -90
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +3 -32
- data/app/pb_kits/playbook/pb_background/background.html.erb +2 -10
- data/app/pb_kits/playbook/pb_badge/_badge.tsx +1 -4
- data/app/pb_kits/playbook/pb_badge/badge.test.js +0 -13
- data/app/pb_kits/playbook/pb_currency/_currency.tsx +7 -20
- data/app/pb_kits/playbook/pb_currency/currency.rb +8 -35
- data/app/pb_kits/playbook/pb_currency/currency.test.js +0 -47
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +1 -1
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +25 -11
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +4 -16
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +1 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -1
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +6 -111
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -5
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +2 -148
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +1 -15
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +8 -9
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.html.erb +10 -11
- data/app/pb_kits/playbook/pb_form/pb_form_validation.js +11 -44
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -1
- data/app/pb_kits/playbook/pb_nav/_item.tsx +4 -18
- data/app/pb_kits/playbook/pb_nav/_nav.scss +5 -30
- data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +0 -192
- data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_nav/docs/index.js +1 -3
- data/app/pb_kits/playbook/pb_nav/item.html.erb +4 -6
- data/app/pb_kits/playbook/pb_nav/item.rb +2 -11
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +17 -110
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +0 -7
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +1 -64
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -33
- data/dist/chunks/{_line_graph-B4qHP_oq.js → _line_graph-CqE0-dq5.js} +1 -1
- data/dist/chunks/_typeahead-3ZAbZUqU.js +6 -0
- data/dist/chunks/_weekday_stacked-BFB3mjtE.js +37 -0
- data/dist/chunks/{lib-BXBHAZMY.js → lib-CGxXTQ75.js} +1 -1
- data/dist/chunks/pb_form_validation-DebqlUKZ.js +1 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +7 -27
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header_rails.html.erb +0 -104
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header_rails.md +0 -1
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.md +0 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_and_dropdown_range.jsx +0 -38
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_and_dropdown_range.md +0 -14
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick.jsx +0 -18
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick.md +0 -4
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.jsx +0 -18
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.md +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end.jsx +0 -19
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end.md +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers.jsx +0 -38
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers.md +0 -14
- data/app/pb_kits/playbook/pb_dropdown/quickpick/index.ts +0 -60
- data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.html.erb +0 -21
- data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.jsx +0 -113
- data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.md +0 -1
- data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.html.erb +0 -30
- data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.jsx +0 -117
- data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.md +0 -1
- data/dist/chunks/_typeahead-NlACFNiN.js +0 -6
- data/dist/chunks/_weekday_stacked-NviJgRIS.js +0 -37
- data/dist/chunks/pb_form_validation-BNfSnIUF.js +0 -1
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: playbook_ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 15.3.0.pre.alpha.
|
|
4
|
+
version: 15.3.0.pre.alpha.play249512047
|
|
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: 2025-11-
|
|
12
|
+
date: 2025-11-04 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: actionpack
|
|
@@ -411,8 +411,6 @@ files:
|
|
|
411
411
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header.md
|
|
412
412
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.jsx
|
|
413
413
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.md
|
|
414
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header_rails.html.erb
|
|
415
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header_rails.md
|
|
416
414
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.html.erb
|
|
417
415
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.md
|
|
418
416
|
- app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js
|
|
@@ -948,7 +946,6 @@ files:
|
|
|
948
946
|
- app/pb_kits/playbook/pb_currency/docs/_currency_unstyled.md
|
|
949
947
|
- app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb
|
|
950
948
|
- app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx
|
|
951
|
-
- app/pb_kits/playbook/pb_currency/docs/_currency_variants.md
|
|
952
949
|
- app/pb_kits/playbook/pb_currency/docs/_description.md
|
|
953
950
|
- app/pb_kits/playbook/pb_currency/docs/example.yml
|
|
954
951
|
- app/pb_kits/playbook/pb_currency/docs/index.js
|
|
@@ -1006,8 +1003,6 @@ files:
|
|
|
1006
1003
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.html.erb
|
|
1007
1004
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.jsx
|
|
1008
1005
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.md
|
|
1009
|
-
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_and_dropdown_range.jsx
|
|
1010
|
-
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_and_dropdown_range.md
|
|
1011
1006
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_anti_patterns.html.erb
|
|
1012
1007
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.html.erb
|
|
1013
1008
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.jsx
|
|
@@ -1371,14 +1366,6 @@ files:
|
|
|
1371
1366
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.jsx
|
|
1372
1367
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.html.erb
|
|
1373
1368
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.jsx
|
|
1374
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick.jsx
|
|
1375
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick.md
|
|
1376
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.jsx
|
|
1377
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.md
|
|
1378
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end.jsx
|
|
1379
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end.md
|
|
1380
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers.jsx
|
|
1381
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers.md
|
|
1382
1369
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb
|
|
1383
1370
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx
|
|
1384
1371
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
|
|
@@ -1443,7 +1430,6 @@ files:
|
|
|
1443
1430
|
- app/pb_kits/playbook/pb_dropdown/hooks/useHandleOnKeydown.tsx
|
|
1444
1431
|
- app/pb_kits/playbook/pb_dropdown/index.js
|
|
1445
1432
|
- app/pb_kits/playbook/pb_dropdown/keyboard_accessibility.js
|
|
1446
|
-
- app/pb_kits/playbook/pb_dropdown/quickpick/index.ts
|
|
1447
1433
|
- app/pb_kits/playbook/pb_dropdown/scss_partials/_dropdown_animation.scss
|
|
1448
1434
|
- app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownContainer.tsx
|
|
1449
1435
|
- app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx
|
|
@@ -2290,9 +2276,6 @@ files:
|
|
|
2290
2276
|
- app/pb_kits/playbook/pb_nav/docs/_description.md
|
|
2291
2277
|
- app/pb_kits/playbook/pb_nav/docs/_horizontal_nav.html.erb
|
|
2292
2278
|
- app/pb_kits/playbook/pb_nav/docs/_horizontal_nav.jsx
|
|
2293
|
-
- app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.html.erb
|
|
2294
|
-
- app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.jsx
|
|
2295
|
-
- app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.md
|
|
2296
2279
|
- app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_extendedunderline.html.erb
|
|
2297
2280
|
- app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_extendedunderline.jsx
|
|
2298
2281
|
- app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_extendedunderline.md
|
|
@@ -2325,9 +2308,6 @@ files:
|
|
|
2325
2308
|
- app/pb_kits/playbook/pb_nav/docs/_subtle_with_icons_nav.jsx
|
|
2326
2309
|
- app/pb_kits/playbook/pb_nav/docs/_tab_nav.html.erb
|
|
2327
2310
|
- app/pb_kits/playbook/pb_nav/docs/_tab_nav.md
|
|
2328
|
-
- app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.html.erb
|
|
2329
|
-
- app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.jsx
|
|
2330
|
-
- app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.md
|
|
2331
2311
|
- app/pb_kits/playbook/pb_nav/docs/_with_icons_nav.html.erb
|
|
2332
2312
|
- app/pb_kits/playbook/pb_nav/docs/_with_icons_nav.jsx
|
|
2333
2313
|
- app/pb_kits/playbook/pb_nav/docs/_with_img_nav.html.erb
|
|
@@ -3820,13 +3800,13 @@ files:
|
|
|
3820
3800
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
|
3821
3801
|
- app/pb_kits/playbook/utilities/text.ts
|
|
3822
3802
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
|
3823
|
-
- dist/chunks/_line_graph-
|
|
3824
|
-
- dist/chunks/_typeahead-
|
|
3825
|
-
- dist/chunks/_weekday_stacked-
|
|
3803
|
+
- dist/chunks/_line_graph-CqE0-dq5.js
|
|
3804
|
+
- dist/chunks/_typeahead-3ZAbZUqU.js
|
|
3805
|
+
- dist/chunks/_weekday_stacked-BFB3mjtE.js
|
|
3826
3806
|
- dist/chunks/componentRegistry-DzmmLR2x.js
|
|
3827
3807
|
- dist/chunks/lazysizes-B7xYodB-.js
|
|
3828
|
-
- dist/chunks/lib-
|
|
3829
|
-
- dist/chunks/pb_form_validation-
|
|
3808
|
+
- dist/chunks/lib-CGxXTQ75.js
|
|
3809
|
+
- dist/chunks/pb_form_validation-DebqlUKZ.js
|
|
3830
3810
|
- dist/chunks/vendor.js
|
|
3831
3811
|
- dist/menu.yml
|
|
3832
3812
|
- dist/playbook-doc.js
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
column_definitions = [
|
|
3
|
-
{
|
|
4
|
-
accessor: "year",
|
|
5
|
-
label: "Year",
|
|
6
|
-
id: "year",
|
|
7
|
-
cellAccessors: ["quarter", "month", "day"],
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
label: "Enrollment Data",
|
|
11
|
-
id: "enrollmentData",
|
|
12
|
-
header: ->(cell, label) {
|
|
13
|
-
capture do
|
|
14
|
-
pb_rails("flex", props: { align_items: "center", justify_content: "center" }) do
|
|
15
|
-
pb_rails("caption", props: { margin_right: "xs", text: "Enrollment Data" }) +
|
|
16
|
-
pb_rails("icon", props: { id: "tooltip-interact-multi", icon: "info", size: "xs", cursor: "pointer" }) +
|
|
17
|
-
pb_rails("tooltip", props: {
|
|
18
|
-
trigger_element_id: "tooltip-interact-multi",
|
|
19
|
-
tooltip_id: "example-custom-tooltip-multi",
|
|
20
|
-
position: "top",
|
|
21
|
-
z_index: "10"
|
|
22
|
-
}) do
|
|
23
|
-
"Whoa. I'm a Tooltip"
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
},
|
|
28
|
-
columns: [
|
|
29
|
-
{
|
|
30
|
-
label: "Enrollment Stats",
|
|
31
|
-
id: "enrollmentStats",
|
|
32
|
-
columns: [
|
|
33
|
-
{
|
|
34
|
-
accessor: "newEnrollments",
|
|
35
|
-
id: "newEnrollments",
|
|
36
|
-
label: "New Enrollments",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
accessor: "scheduledMeetings",
|
|
40
|
-
id: "scheduledMeetings",
|
|
41
|
-
label: "Scheduled Meetings",
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
label: "Performance Data",
|
|
49
|
-
id: "performanceData",
|
|
50
|
-
columns: [
|
|
51
|
-
{
|
|
52
|
-
label: "Completion Metrics",
|
|
53
|
-
id: "completionMetrics",
|
|
54
|
-
columns: [
|
|
55
|
-
{
|
|
56
|
-
accessor: "completedClasses",
|
|
57
|
-
id: "completedClasses",
|
|
58
|
-
label: "Completed Classes",
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
accessor: "classCompletionRate",
|
|
62
|
-
id: "classCompletionRate",
|
|
63
|
-
label: "Class Completion Rate",
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
label: "Attendance",
|
|
69
|
-
id: "attendance",
|
|
70
|
-
header: ->(cell, label) {
|
|
71
|
-
capture do
|
|
72
|
-
pb_rails("flex", props: { align_items: "center", justify_content: "center" }) do
|
|
73
|
-
pb_rails("caption", props: { margin_right: "xs", text: "Attendance" }) +
|
|
74
|
-
pb_rails("icon", props: { id: "tooltip-interact-multi-2", icon: "info", size: "xs", cursor: "pointer" }) +
|
|
75
|
-
pb_rails("tooltip", props: {
|
|
76
|
-
trigger_element_id: "tooltip-interact-multi-2",
|
|
77
|
-
tooltip_id: "example-custom-tooltip-multi-2",
|
|
78
|
-
position: "top",
|
|
79
|
-
z_index: "10"
|
|
80
|
-
}) do
|
|
81
|
-
"Whoa. I'm a Tooltip Too!"
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
},
|
|
86
|
-
columns: [
|
|
87
|
-
{
|
|
88
|
-
accessor: "attendanceRate",
|
|
89
|
-
id: "attendanceRate",
|
|
90
|
-
label: "Attendance Rate",
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
accessor: "scheduledMeetings",
|
|
94
|
-
id: "scheduledMeetings",
|
|
95
|
-
label: "Scheduled Meetings",
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
},
|
|
101
|
-
]
|
|
102
|
-
%>
|
|
103
|
-
|
|
104
|
-
<%= pb_rails("advanced_table", props: { id: "custom_header_multi_header_table", table_data: @table_data, column_definitions: column_definitions }) %>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
The optional `header` item within `column_definitions` can also be used with multi headers as seen here.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
**NOTE:** The value passed into the `amount` prop can be either a string or numeric value.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Dropdown from "../../pb_dropdown/_dropdown";
|
|
3
|
-
import DatePicker from "../../pb_date_picker/_date_picker";
|
|
4
|
-
|
|
5
|
-
const DatePickerAndDropdownRange = (props) => {
|
|
6
|
-
return (
|
|
7
|
-
<>
|
|
8
|
-
<Dropdown
|
|
9
|
-
controlsEndId="end-date-picker1"
|
|
10
|
-
controlsStartId="start-date-picker1"
|
|
11
|
-
id="dropdown-as-quickpick"
|
|
12
|
-
label="Date Range"
|
|
13
|
-
marginBottom="sm"
|
|
14
|
-
placeholder="Select a Date Range"
|
|
15
|
-
variant="quickpick"
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
|
|
19
|
-
<DatePicker
|
|
20
|
-
label="Start Date"
|
|
21
|
-
pickerId="start-date-picker1"
|
|
22
|
-
placeholder="Select a Start Date"
|
|
23
|
-
syncStartWith="dropdown-as-quickpick"
|
|
24
|
-
{...props}
|
|
25
|
-
/>
|
|
26
|
-
|
|
27
|
-
<DatePicker
|
|
28
|
-
label="End Date"
|
|
29
|
-
pickerId="end-date-picker1"
|
|
30
|
-
placeholder="Select an End Date"
|
|
31
|
-
syncEndWith="dropdown-as-quickpick"
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
</>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export default DatePickerAndDropdownRange;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
You can link a Dropdown (`quickpick` variant) to standard DatePickers using the following props:
|
|
2
|
-
|
|
3
|
-
**For the Dropdown**:
|
|
4
|
-
`controlsStartId`: ID of the DatePicker that should receive the start date.
|
|
5
|
-
|
|
6
|
-
`controlsEndId`: ID of the DatePicker that should receive the end date.
|
|
7
|
-
|
|
8
|
-
When a quickpick option like “This Year” is selected, it automatically populates the linked start and end inputs.
|
|
9
|
-
|
|
10
|
-
**For the Start/End DatePickers**:
|
|
11
|
-
`syncStartWith`: ID of the quickpick this start date is synced to.
|
|
12
|
-
`syncEndWith`: ID of the quickpick this end date is synced to.
|
|
13
|
-
|
|
14
|
-
When a user manually edits the start or end date, it clears the selected quickpick to prevent conflicting values.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Dropdown from '../../pb_dropdown/_dropdown'
|
|
3
|
-
|
|
4
|
-
const DropdownQuickpick = (props) => {
|
|
5
|
-
|
|
6
|
-
return (
|
|
7
|
-
<div>
|
|
8
|
-
<Dropdown
|
|
9
|
-
label="Date Range"
|
|
10
|
-
onSelect={(selectedItem) => console.log(selectedItem)}
|
|
11
|
-
variant="quickpick"
|
|
12
|
-
{...props}
|
|
13
|
-
/>
|
|
14
|
-
</div>
|
|
15
|
-
)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default DropdownQuickpick
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Dropdown from '../../pb_dropdown/_dropdown'
|
|
3
|
-
|
|
4
|
-
const DropdownQuickpickDefaultDates = (props) => {
|
|
5
|
-
|
|
6
|
-
return (
|
|
7
|
-
<div>
|
|
8
|
-
<Dropdown
|
|
9
|
-
defaultValue="This Year"
|
|
10
|
-
label="Date Range"
|
|
11
|
-
variant="quickpick"
|
|
12
|
-
{...props}
|
|
13
|
-
/>
|
|
14
|
-
</div>
|
|
15
|
-
)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default DropdownQuickpickDefaultDates
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
To set a default value for the Dropdown, you can use the label of the range you want set as default, for example "This Year", "Today", etc.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Dropdown from '../../pb_dropdown/_dropdown'
|
|
3
|
-
|
|
4
|
-
const DropdownQuickpickRangeEnd = (props) => {
|
|
5
|
-
|
|
6
|
-
return (
|
|
7
|
-
<div>
|
|
8
|
-
<Dropdown
|
|
9
|
-
label="Date Range"
|
|
10
|
-
onSelect={(selectedItem) => console.log(selectedItem)}
|
|
11
|
-
rangeEndsToday
|
|
12
|
-
variant="quickpick"
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
</div>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default DropdownQuickpickRangeEnd
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
The optional `rangeEndsToday` prop can be used with the quickpick variant to set end date on all ranges that start with 'this' to today's date. For instance, by default 'This Year' will set end day to 12/31/(current year), but if `rangeEndsToday` prop is used, end date on that range will be today's date.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Dropdown from "../../pb_dropdown/_dropdown";
|
|
3
|
-
import DatePicker from "../../pb_date_picker/_date_picker";
|
|
4
|
-
|
|
5
|
-
const DropdownQuickpickWithDatePickers = (props) => {
|
|
6
|
-
return (
|
|
7
|
-
<>
|
|
8
|
-
<Dropdown
|
|
9
|
-
controlsEndId="end-date-picker"
|
|
10
|
-
controlsStartId="start-date-picker"
|
|
11
|
-
id="dropdown-quickpick"
|
|
12
|
-
label="Range"
|
|
13
|
-
marginBottom="sm"
|
|
14
|
-
placeholder="Select a Date Range"
|
|
15
|
-
variant="quickpick"
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
|
|
19
|
-
<DatePicker
|
|
20
|
-
label="Start Date"
|
|
21
|
-
pickerId="start-date-picker"
|
|
22
|
-
placeholder="Select a Start Date"
|
|
23
|
-
syncStartWith="dropdown-quickpick"
|
|
24
|
-
{...props}
|
|
25
|
-
/>
|
|
26
|
-
|
|
27
|
-
<DatePicker
|
|
28
|
-
label="End Date"
|
|
29
|
-
pickerId="end-date-picker"
|
|
30
|
-
placeholder="Select an End Date"
|
|
31
|
-
syncEndWith="dropdown-quickpick"
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
</>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export default DropdownQuickpickWithDatePickers;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
You can link a Dropdown (`quickpick` variant) to standard DatePickers using the following props:
|
|
2
|
-
|
|
3
|
-
**For the Dropdown**:
|
|
4
|
-
`controlsStartId`: ID of the DatePicker that should receive the start date.
|
|
5
|
-
|
|
6
|
-
`controlsEndId`: ID of the DatePicker that should receive the end date.
|
|
7
|
-
|
|
8
|
-
When a quickpick option like “This Year” is selected, it automatically populates the linked start and end inputs.
|
|
9
|
-
|
|
10
|
-
**For the Start/End DatePickers**:
|
|
11
|
-
`syncStartWith`: ID of the quickpick this start date is synced to.
|
|
12
|
-
`syncEndWith`: ID of the quickpick this end date is synced to.
|
|
13
|
-
|
|
14
|
-
When a user manually edits the start or end date, it clears the selected quickpick to prevent conflicting values.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// QuickPick default options for Dropdown
|
|
2
|
-
// This provides date range options similar to the DatePicker QuickPick functionality
|
|
3
|
-
|
|
4
|
-
import DateTime from '../../pb_kit/dateTime';
|
|
5
|
-
|
|
6
|
-
type QuickPickOption = {
|
|
7
|
-
label: string;
|
|
8
|
-
value: Date[];
|
|
9
|
-
formattedStartDate?: string;
|
|
10
|
-
formattedEndDate?: string;
|
|
11
|
-
id?: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
// Helper to get QuickPick options with date ranges
|
|
15
|
-
const getQuickPickOptions = (rangeEndsToday = false): QuickPickOption[] => {
|
|
16
|
-
const today = new Date();
|
|
17
|
-
const yesterday = DateTime.getYesterdayDate(new Date());
|
|
18
|
-
|
|
19
|
-
const thisWeekStartDate = DateTime.getFirstDayOfWeek(new Date());
|
|
20
|
-
const thisWeekEndDate = rangeEndsToday ? new Date() : DateTime.getLastDayOfWeek(new Date());
|
|
21
|
-
const lastWeekStartDate = DateTime.getPreviousWeekStartDate(new Date());
|
|
22
|
-
const lastWeekEndDate = DateTime.getPreviousWeekEndDate(new Date());
|
|
23
|
-
|
|
24
|
-
const thisMonthStartDate = DateTime.getMonthStartDate(new Date());
|
|
25
|
-
const thisMonthEndDate = rangeEndsToday ? new Date() : DateTime.getMonthEndDate(new Date());
|
|
26
|
-
const lastMonthStartDate = DateTime.getPreviousMonthStartDate(new Date());
|
|
27
|
-
const lastMonthEndDate = DateTime.getPreviousMonthEndDate(new Date());
|
|
28
|
-
|
|
29
|
-
const thisQuarterStartDate = DateTime.getQuarterStartDate(new Date());
|
|
30
|
-
const thisQuarterEndDate = rangeEndsToday ? new Date() : DateTime.getQuarterEndDate(new Date());
|
|
31
|
-
const lastQuarterStartDate = DateTime.getPreviousQuarterStartDate(new Date());
|
|
32
|
-
const lastQuarterEndDate = DateTime.getPreviousQuarterEndDate(new Date());
|
|
33
|
-
|
|
34
|
-
const thisYearStartDate = DateTime.getYearStartDate(new Date());
|
|
35
|
-
const thisYearEndDate = rangeEndsToday ? new Date() : DateTime.getYearEndDate(new Date());
|
|
36
|
-
const lastYearStartDate = DateTime.getPreviousYearStartDate(new Date());
|
|
37
|
-
const lastYearEndDate = DateTime.getPreviousYearEndDate(new Date());
|
|
38
|
-
|
|
39
|
-
const formatDate = (date: Date) => {
|
|
40
|
-
const day = String(date.getDate()).padStart(2, "0")
|
|
41
|
-
const month = String(date.getMonth() + 1).padStart(2, "0")
|
|
42
|
-
const year = date.getFullYear()
|
|
43
|
-
|
|
44
|
-
return `${month}/${day}/${year}`
|
|
45
|
-
}
|
|
46
|
-
return [
|
|
47
|
-
{ label: 'Today', value: [today, today], id: 'quickpick-today' },
|
|
48
|
-
{ label: 'Yesterday', value: [yesterday, yesterday], formattedStartDate: `${formatDate(yesterday)}`, formattedEndDate: `${formatDate(yesterday)}`, id: 'quickpick-yesterday' },
|
|
49
|
-
{ label: 'This Week', value: [thisWeekStartDate, thisWeekEndDate], formattedStartDate: `${formatDate(thisWeekStartDate)}`, formattedEndDate: `${formatDate(thisWeekEndDate)}`, id: 'quickpick-this-week' },
|
|
50
|
-
{ label: 'This Month', value: [thisMonthStartDate, thisMonthEndDate], formattedStartDate: `${formatDate(thisMonthStartDate)}`, formattedEndDate: `${formatDate(thisMonthEndDate)}`, id: 'quickpick-this-month' },
|
|
51
|
-
{ label: 'This Quarter', value: [thisQuarterStartDate, thisQuarterEndDate], formattedStartDate: `${formatDate(thisQuarterStartDate)}`, formattedEndDate: `${formatDate(thisQuarterEndDate)}`, id: 'quickpick-this-quarter' },
|
|
52
|
-
{ label: 'This Year', value: [thisYearStartDate, thisYearEndDate], formattedStartDate: `${formatDate(thisYearStartDate)}`, formattedEndDate: `${formatDate(thisYearEndDate)}`, id: 'quickpick-this-year' },
|
|
53
|
-
{ label: 'Last Week', value: [lastWeekStartDate, lastWeekEndDate], formattedStartDate: `${formatDate(lastWeekStartDate)}`, formattedEndDate: `${formatDate(lastWeekEndDate)}`, id: 'quickpick-last-week' },
|
|
54
|
-
{ label: 'Last Month', value: [lastMonthStartDate, lastMonthEndDate], formattedStartDate: `${formatDate(lastMonthStartDate)}`, formattedEndDate: `${formatDate(lastMonthEndDate)}`, id: 'quickpick-last-month' },
|
|
55
|
-
{ label: 'Last Quarter', value: [lastQuarterStartDate, lastQuarterEndDate], formattedStartDate: `${formatDate(lastQuarterStartDate)}`, formattedEndDate: `${formatDate(lastQuarterEndDate)}`, id: 'quickpick-last-quarter' },
|
|
56
|
-
{ label: 'Last Year', value: [lastYearStartDate, lastYearEndDate], formattedStartDate: `${formatDate(lastYearStartDate)}`, formattedEndDate: `${formatDate(lastYearEndDate)}`, id: 'quickpick-last-year' },
|
|
57
|
-
];
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export default getQuickPickOptions
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<%= pb_rails("caption", props: { margin_bottom: "sm", text: "Default Variant" }) %>
|
|
2
|
-
<%= pb_rails("nav", props: { orientation: "horizontal" }) do %>
|
|
3
|
-
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
4
|
-
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
5
|
-
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
6
|
-
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
7
|
-
<% end %>
|
|
8
|
-
<%= pb_rails("caption", props: { margin_bottom: "sm", margin_top:"lg", text: "Subtle Variant" }) %>
|
|
9
|
-
<%= pb_rails("nav", props: { orientation: "horizontal", variant: "subtle" }) do %>
|
|
10
|
-
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
11
|
-
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
12
|
-
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
13
|
-
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
14
|
-
<% end %>
|
|
15
|
-
<%= pb_rails("caption", props: { margin_bottom: "sm", margin_top:"lg", text: "Bold Variant" }) %>
|
|
16
|
-
<%= pb_rails("nav", props: { orientation: "horizontal", variant: "bold" }) do %>
|
|
17
|
-
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
18
|
-
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
19
|
-
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
20
|
-
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
21
|
-
<% end %>
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import Nav from '../_nav'
|
|
4
|
-
import NavItem from '../_item'
|
|
5
|
-
import Caption from '../../pb_caption/_caption'
|
|
6
|
-
|
|
7
|
-
const HorizontalNavDisabled = (props) => {
|
|
8
|
-
return (
|
|
9
|
-
<>
|
|
10
|
-
<Caption marginBottom="sm">Default Variant</Caption>
|
|
11
|
-
<Nav
|
|
12
|
-
link="#"
|
|
13
|
-
orientation="horizontal"
|
|
14
|
-
{...props}
|
|
15
|
-
>
|
|
16
|
-
<NavItem
|
|
17
|
-
link="#"
|
|
18
|
-
text="About"
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
<NavItem
|
|
22
|
-
active
|
|
23
|
-
link="#"
|
|
24
|
-
text="Case Studies"
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
<NavItem
|
|
28
|
-
disabled
|
|
29
|
-
link="#"
|
|
30
|
-
text="Service"
|
|
31
|
-
{...props}
|
|
32
|
-
/>
|
|
33
|
-
<NavItem
|
|
34
|
-
link="#"
|
|
35
|
-
text="Contacts"
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
</Nav>
|
|
39
|
-
<Caption
|
|
40
|
-
marginBottom="sm"
|
|
41
|
-
marginTop="lg"
|
|
42
|
-
>
|
|
43
|
-
Subtle Variant
|
|
44
|
-
</Caption>
|
|
45
|
-
<Nav
|
|
46
|
-
link="#"
|
|
47
|
-
orientation="horizontal"
|
|
48
|
-
variant="subtle"
|
|
49
|
-
{...props}
|
|
50
|
-
>
|
|
51
|
-
<NavItem
|
|
52
|
-
link="#"
|
|
53
|
-
text="About"
|
|
54
|
-
{...props}
|
|
55
|
-
/>
|
|
56
|
-
<NavItem
|
|
57
|
-
active
|
|
58
|
-
link="#"
|
|
59
|
-
text="Case Studies"
|
|
60
|
-
{...props}
|
|
61
|
-
/>
|
|
62
|
-
<NavItem
|
|
63
|
-
disabled
|
|
64
|
-
link="#"
|
|
65
|
-
text="Service"
|
|
66
|
-
{...props}
|
|
67
|
-
/>
|
|
68
|
-
<NavItem
|
|
69
|
-
link="#"
|
|
70
|
-
text="Contacts"
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
</Nav>
|
|
74
|
-
<Caption
|
|
75
|
-
marginBottom="sm"
|
|
76
|
-
marginTop="lg"
|
|
77
|
-
>
|
|
78
|
-
Bold Variant
|
|
79
|
-
</Caption>
|
|
80
|
-
<Nav
|
|
81
|
-
link="#"
|
|
82
|
-
orientation="horizontal"
|
|
83
|
-
variant="bold"
|
|
84
|
-
{...props}
|
|
85
|
-
>
|
|
86
|
-
<NavItem
|
|
87
|
-
link="#"
|
|
88
|
-
text="About"
|
|
89
|
-
{...props}
|
|
90
|
-
/>
|
|
91
|
-
<NavItem
|
|
92
|
-
active
|
|
93
|
-
link="#"
|
|
94
|
-
text="Case Studies"
|
|
95
|
-
{...props}
|
|
96
|
-
/>
|
|
97
|
-
<NavItem
|
|
98
|
-
disabled
|
|
99
|
-
link="#"
|
|
100
|
-
text="Service"
|
|
101
|
-
{...props}
|
|
102
|
-
/>
|
|
103
|
-
<NavItem
|
|
104
|
-
link="#"
|
|
105
|
-
text="Contacts"
|
|
106
|
-
{...props}
|
|
107
|
-
/>
|
|
108
|
-
</Nav>
|
|
109
|
-
</>
|
|
110
|
-
)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export default HorizontalNavDisabled
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Use the `disabled` prop on a `navItem`/`nav_item` within a horizontal nav to set it as disabled. This will render the UI as disabled, prevent clicks and not allow for tabIndex to access the item.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<%= pb_rails("flex", props: { justify: "between" }) do %>
|
|
2
|
-
<%= pb_rails("flex", props: { orientation:"column", wrap: true }) do %>
|
|
3
|
-
<%= pb_rails("caption", props: { margin_bottom: "sm", text: "Default Variant" }) %>
|
|
4
|
-
<%= pb_rails("nav") do %>
|
|
5
|
-
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
6
|
-
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
7
|
-
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
8
|
-
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
9
|
-
<% end %>
|
|
10
|
-
<% end %>
|
|
11
|
-
<%= pb_rails("flex", props: { orientation:"column", wrap: true }) do %>
|
|
12
|
-
<%= pb_rails("caption", props: { margin_bottom: "sm", text: "Subtle Variant" }) %>
|
|
13
|
-
<%= pb_rails("nav", props:{variant: "subtle"}) do %>
|
|
14
|
-
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
15
|
-
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
16
|
-
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
17
|
-
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
18
|
-
<% end %>
|
|
19
|
-
<% end %>
|
|
20
|
-
<%= pb_rails("flex", props: { orientation:"column", wrap: true }) do %>
|
|
21
|
-
<%= pb_rails("caption", props: { margin_bottom: "sm", text: "Bold Variant" }) %>
|
|
22
|
-
<%= pb_rails("nav", props:{variant: "bold"}) do %>
|
|
23
|
-
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
24
|
-
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
25
|
-
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
26
|
-
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
27
|
-
<% end %>
|
|
28
|
-
<% end %>
|
|
29
|
-
|
|
30
|
-
<% end %>
|