playbook_ui 12.25.0 → 12.26.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown794
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/_playbook.scss +1 -0
- data/app/pb_kits/playbook/index.js +1 -0
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_swift.md +82 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +26 -0
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +102 -95
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +30 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +11 -4
- data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +44 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +38 -4
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick.html.erb +8 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick.jsx +18 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +168 -0
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_calendar_input_icon.scss +3 -2
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_quick_pick_styles.scss +75 -0
- data/app/pb_kits/playbook/pb_detail/_detail.scss +44 -0
- data/app/pb_kits/playbook/pb_detail/_detail.tsx +55 -0
- data/app/pb_kits/playbook/pb_detail/_detail_mixins.scss +29 -0
- data/app/pb_kits/playbook/pb_detail/detail.html.erb +7 -0
- data/app/pb_kits/playbook/pb_detail/detail.rb +31 -0
- data/app/pb_kits/playbook/pb_detail/detail.test.jsx +46 -0
- data/app/pb_kits/playbook/pb_detail/docs/_description.md +1 -0
- data/app/pb_kits/playbook/pb_detail/docs/_detail_bold.html.erb +34 -0
- data/app/pb_kits/playbook/pb_detail/docs/_detail_bold.jsx +49 -0
- data/app/pb_kits/playbook/pb_detail/docs/_detail_bold.md +1 -0
- data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.html.erb +24 -0
- data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.jsx +38 -0
- data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.md +6 -0
- data/app/pb_kits/playbook/pb_detail/docs/_detail_default.html.erb +3 -0
- data/app/pb_kits/playbook/pb_detail/docs/_detail_default.jsx +13 -0
- data/app/pb_kits/playbook/pb_detail/docs/_detail_styled.html.erb +22 -0
- data/app/pb_kits/playbook/pb_detail/docs/_detail_styled.jsx +32 -0
- data/app/pb_kits/playbook/pb_detail/docs/example.yml +11 -0
- data/app/pb_kits/playbook/pb_detail/docs/index.js +4 -0
- data/app/pb_kits/playbook/pb_docs/kit_example.html.erb +14 -13
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +3 -2
- data/app/pb_kits/playbook/pb_multi_level_select/_helper_functions.tsx +212 -0
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss +58 -98
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +340 -86
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.md +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.html.erb +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_nav/_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_nav/_subtle_mixin.scss +1 -1
- data/app/pb_kits/playbook/playbook-doc.js +2 -0
- data/dist/menu.yml +1 -0
- data/dist/playbook-rails.js +279 -7
- data/lib/playbook/version.rb +2 -2
- metadata +31 -9
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_select_helper.tsx +0 -31
- data/app/pb_kits/playbook/pb_multi_level_select/helper_functions.ts +0 -87
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.
|
4
|
+
version: 12.26.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown794
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
8
8
|
- Power Devs
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-06-
|
12
|
+
date: 2023-06-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -723,6 +723,8 @@ files:
|
|
723
723
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions.md
|
724
724
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions_element.html.erb
|
725
725
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions_element.jsx
|
726
|
+
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick.html.erb
|
727
|
+
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick.jsx
|
726
728
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb
|
727
729
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx
|
728
730
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_time.html.erb
|
@@ -737,6 +739,7 @@ files:
|
|
737
739
|
- app/pb_kits/playbook/pb_date_picker/docs/_description.md
|
738
740
|
- app/pb_kits/playbook/pb_date_picker/docs/example.yml
|
739
741
|
- app/pb_kits/playbook/pb_date_picker/docs/index.js
|
742
|
+
- app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx
|
740
743
|
- app/pb_kits/playbook/pb_date_picker/plugins/timeSelect.ts
|
741
744
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_calendar_input_icon.scss
|
742
745
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_day_styles.scss
|
@@ -746,6 +749,7 @@ files:
|
|
746
749
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss
|
747
750
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_month_and_year_styles.scss
|
748
751
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss
|
752
|
+
- app/pb_kits/playbook/pb_date_picker/sass_partials/_quick_pick_styles.scss
|
749
753
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_time_selection_styles.scss
|
750
754
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_week_styles.scss
|
751
755
|
- app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss
|
@@ -823,6 +827,25 @@ files:
|
|
823
827
|
- app/pb_kits/playbook/pb_date_year_stacked/docs/_footer.md
|
824
828
|
- app/pb_kits/playbook/pb_date_year_stacked/docs/example.yml
|
825
829
|
- app/pb_kits/playbook/pb_date_year_stacked/docs/index.js
|
830
|
+
- app/pb_kits/playbook/pb_detail/_detail.scss
|
831
|
+
- app/pb_kits/playbook/pb_detail/_detail.tsx
|
832
|
+
- app/pb_kits/playbook/pb_detail/_detail_mixins.scss
|
833
|
+
- app/pb_kits/playbook/pb_detail/detail.html.erb
|
834
|
+
- app/pb_kits/playbook/pb_detail/detail.rb
|
835
|
+
- app/pb_kits/playbook/pb_detail/detail.test.jsx
|
836
|
+
- app/pb_kits/playbook/pb_detail/docs/_description.md
|
837
|
+
- app/pb_kits/playbook/pb_detail/docs/_detail_bold.html.erb
|
838
|
+
- app/pb_kits/playbook/pb_detail/docs/_detail_bold.jsx
|
839
|
+
- app/pb_kits/playbook/pb_detail/docs/_detail_bold.md
|
840
|
+
- app/pb_kits/playbook/pb_detail/docs/_detail_colors.html.erb
|
841
|
+
- app/pb_kits/playbook/pb_detail/docs/_detail_colors.jsx
|
842
|
+
- app/pb_kits/playbook/pb_detail/docs/_detail_colors.md
|
843
|
+
- app/pb_kits/playbook/pb_detail/docs/_detail_default.html.erb
|
844
|
+
- app/pb_kits/playbook/pb_detail/docs/_detail_default.jsx
|
845
|
+
- app/pb_kits/playbook/pb_detail/docs/_detail_styled.html.erb
|
846
|
+
- app/pb_kits/playbook/pb_detail/docs/_detail_styled.jsx
|
847
|
+
- app/pb_kits/playbook/pb_detail/docs/example.yml
|
848
|
+
- app/pb_kits/playbook/pb_detail/docs/index.js
|
826
849
|
- app/pb_kits/playbook/pb_dialog/_close_icon.tsx
|
827
850
|
- app/pb_kits/playbook/pb_dialog/_dialog.scss
|
828
851
|
- app/pb_kits/playbook/pb_dialog/_dialog.tsx
|
@@ -1407,9 +1430,9 @@ files:
|
|
1407
1430
|
- app/pb_kits/playbook/pb_message/message.html.erb
|
1408
1431
|
- app/pb_kits/playbook/pb_message/message.rb
|
1409
1432
|
- app/pb_kits/playbook/pb_message/message.test.js
|
1433
|
+
- app/pb_kits/playbook/pb_multi_level_select/_helper_functions.tsx
|
1410
1434
|
- app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss
|
1411
1435
|
- app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx
|
1412
|
-
- app/pb_kits/playbook/pb_multi_level_select/_multi_select_helper.tsx
|
1413
1436
|
- app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.html.erb
|
1414
1437
|
- app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.jsx
|
1415
1438
|
- app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.md
|
@@ -1418,7 +1441,6 @@ files:
|
|
1418
1441
|
- app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.md
|
1419
1442
|
- app/pb_kits/playbook/pb_multi_level_select/docs/example.yml
|
1420
1443
|
- app/pb_kits/playbook/pb_multi_level_select/docs/index.js
|
1421
|
-
- app/pb_kits/playbook/pb_multi_level_select/helper_functions.ts
|
1422
1444
|
- app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb
|
1423
1445
|
- app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb
|
1424
1446
|
- app/pb_kits/playbook/pb_multi_level_select/multi_level_select.test.jsx
|
@@ -2469,7 +2491,7 @@ homepage: https://playbook.powerapp.cloud/
|
|
2469
2491
|
licenses:
|
2470
2492
|
- ISC
|
2471
2493
|
metadata: {}
|
2472
|
-
post_install_message:
|
2494
|
+
post_install_message:
|
2473
2495
|
rdoc_options: []
|
2474
2496
|
require_paths:
|
2475
2497
|
- lib
|
@@ -2480,12 +2502,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2480
2502
|
version: '0'
|
2481
2503
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2482
2504
|
requirements:
|
2483
|
-
- - "
|
2505
|
+
- - ">"
|
2484
2506
|
- !ruby/object:Gem::Version
|
2485
|
-
version:
|
2507
|
+
version: 1.3.1
|
2486
2508
|
requirements: []
|
2487
2509
|
rubygems_version: 3.3.7
|
2488
|
-
signing_key:
|
2510
|
+
signing_key:
|
2489
2511
|
specification_version: 4
|
2490
2512
|
summary: Playbook Design System
|
2491
2513
|
test_files: []
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import React from "react"
|
2
|
-
import DropdownTreeSelect from "react-dropdown-tree-select"
|
3
|
-
import "react-dropdown-tree-select/dist/styles.css"
|
4
|
-
|
5
|
-
type HelperProps = {
|
6
|
-
id?: string
|
7
|
-
treeData?: { [key: string]: string }[]
|
8
|
-
treeMode?: boolean
|
9
|
-
onChange?: any
|
10
|
-
|
11
|
-
}
|
12
|
-
|
13
|
-
const MultiSelectHelper = (props: HelperProps) => {
|
14
|
-
const { id, treeData, onChange, treeMode } = props
|
15
|
-
|
16
|
-
|
17
|
-
return (
|
18
|
-
<DropdownTreeSelect
|
19
|
-
data={treeData}
|
20
|
-
id={id}
|
21
|
-
keepOpenOnSelect
|
22
|
-
keepTreeOnSearch
|
23
|
-
keepChildrenOnSearch
|
24
|
-
onChange={onChange}
|
25
|
-
texts={{ placeholder: "Select..." }}
|
26
|
-
mode={treeMode ? 'hierarchical' : 'multiSelect'}
|
27
|
-
/>
|
28
|
-
)
|
29
|
-
}
|
30
|
-
|
31
|
-
export default MultiSelectHelper
|
@@ -1,87 +0,0 @@
|
|
1
|
-
export const findItemById = (
|
2
|
-
items: { [key: string]: any }[],
|
3
|
-
id: string
|
4
|
-
): any => {
|
5
|
-
for (const item of items) {
|
6
|
-
if (item.id === id) {
|
7
|
-
return item;
|
8
|
-
}
|
9
|
-
if (item.children) {
|
10
|
-
const found = findItemById(item.children, id);
|
11
|
-
if (found) {
|
12
|
-
return found;
|
13
|
-
}
|
14
|
-
}
|
15
|
-
}
|
16
|
-
return null;
|
17
|
-
};
|
18
|
-
|
19
|
-
export const checkIt = (
|
20
|
-
foundItem: { [key: string]: any },
|
21
|
-
selectedItems: any[],
|
22
|
-
setSelectedItems: Function,
|
23
|
-
expand: boolean
|
24
|
-
) => {
|
25
|
-
if (!foundItem) {
|
26
|
-
return;
|
27
|
-
}
|
28
|
-
|
29
|
-
foundItem.checked = true;
|
30
|
-
foundItem.expanded = expand;
|
31
|
-
selectedItems.push(foundItem);
|
32
|
-
|
33
|
-
if (foundItem.children) {
|
34
|
-
foundItem.children.map((x: any) => {
|
35
|
-
checkIt(x, selectedItems, setSelectedItems, expand);
|
36
|
-
});
|
37
|
-
}
|
38
|
-
|
39
|
-
setSelectedItems([...selectedItems]);
|
40
|
-
};
|
41
|
-
|
42
|
-
export const unCheckIt = (
|
43
|
-
foundItem: { [key: string]: any },
|
44
|
-
selectedItems: any,
|
45
|
-
setSelectedItems: any,
|
46
|
-
expand: boolean
|
47
|
-
) => {
|
48
|
-
if (!foundItem) {
|
49
|
-
return;
|
50
|
-
}
|
51
|
-
|
52
|
-
foundItem.checked = false;
|
53
|
-
foundItem.expanded = false;
|
54
|
-
const newSelectedItems = selectedItems.filter(
|
55
|
-
(item: any) => item.id !== foundItem.id
|
56
|
-
);
|
57
|
-
if (foundItem.children) {
|
58
|
-
foundItem.children.map((x: any) => {
|
59
|
-
unCheckIt(x, selectedItems, setSelectedItems, expand);
|
60
|
-
});
|
61
|
-
}
|
62
|
-
setSelectedItems([...newSelectedItems]);
|
63
|
-
};
|
64
|
-
|
65
|
-
|
66
|
-
export const getParentAndAncestorsIds = (itemId:string, items:{ [key: string]: string; }[], ancestors:string[] = []):any => {
|
67
|
-
for (let i = 0; i < items.length; i++) {
|
68
|
-
const item:any = items[i];
|
69
|
-
if (item.id === itemId) {
|
70
|
-
// item found in current level of items array
|
71
|
-
return [...ancestors, item.id];
|
72
|
-
}
|
73
|
-
if (item.children && item.children.length > 0) {
|
74
|
-
// recursively search through children
|
75
|
-
const foundAncestors = getParentAndAncestorsIds(
|
76
|
-
itemId,
|
77
|
-
item.children,
|
78
|
-
[...ancestors, item.id]
|
79
|
-
);
|
80
|
-
if (foundAncestors) {
|
81
|
-
return foundAncestors;
|
82
|
-
}
|
83
|
-
}
|
84
|
-
}
|
85
|
-
// item not found in this level of items array or its children
|
86
|
-
return null;
|
87
|
-
}
|