playbook_ui_docs 13.10.0 → 13.11.1.pre.alpha.play900startratingasinput1530

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_button/docs/_button_circle_swift.md +28 -0
  3. data/app/pb_kits/playbook/pb_button/docs/_button_default_swift.md +23 -0
  4. data/app/pb_kits/playbook/pb_button/docs/_button_full_width_swift.md +9 -0
  5. data/app/pb_kits/playbook/pb_button/docs/_button_icon_options_swift.md +18 -0
  6. data/app/pb_kits/playbook/pb_button/docs/_button_props_swift.md +11 -0
  7. data/app/pb_kits/playbook/pb_button/docs/_button_size_swift.md +20 -0
  8. data/app/pb_kits/playbook/pb_button/docs/example.yml +8 -0
  9. data/app/pb_kits/playbook/pb_card/docs/_card_background_swift.md +29 -0
  10. data/app/pb_kits/playbook/pb_card/docs/_card_border_none_swift.md +7 -0
  11. data/app/pb_kits/playbook/pb_card/docs/_card_border_radius_swift.md +33 -0
  12. data/app/pb_kits/playbook/pb_card/docs/_card_header_swift.md +33 -0
  13. data/app/pb_kits/playbook/pb_card/docs/_card_highlight_swift.md +17 -0
  14. data/app/pb_kits/playbook/pb_card/docs/_card_light_swift.md +7 -0
  15. data/app/pb_kits/playbook/pb_card/docs/_card_padding_swift.md +33 -0
  16. data/app/pb_kits/playbook/pb_card/docs/_card_props_swift.md +10 -0
  17. data/app/pb_kits/playbook/pb_card/docs/_card_selected_swift.md +0 -0
  18. data/app/pb_kits/playbook/pb_card/docs/_card_separator_swift.md +11 -0
  19. data/app/pb_kits/playbook/pb_card/docs/_card_shadow_swift.md +21 -0
  20. data/app/pb_kits/playbook/pb_card/docs/_card_styles_swift.md +17 -0
  21. data/app/pb_kits/playbook/pb_card/docs/_card_tag_swift.md +0 -0
  22. data/app/pb_kits/playbook/pb_card/docs/example.yml +12 -0
  23. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_default_swift.md +10 -0
  24. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error_swift.md +12 -0
  25. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_swift.md +12 -0
  26. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_props_swift.md +7 -0
  27. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +7 -0
  28. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_external_controls.html.erb +22 -0
  29. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_external_controls.md +3 -0
  30. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_external_controls_multiple.html.erb +40 -0
  31. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_external_controls_multiple.md +1 -0
  32. data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +2 -0
  33. data/app/pb_kits/playbook/pb_icon/docs/_icon_border_swift.md +7 -0
  34. data/app/pb_kits/playbook/pb_icon/docs/_icon_default_swift.md +7 -0
  35. data/app/pb_kits/playbook/pb_icon/docs/_icon_flip_swift.md +11 -0
  36. data/app/pb_kits/playbook/pb_icon/docs/_icon_props_swift.md +8 -0
  37. data/app/pb_kits/playbook/pb_icon/docs/_icon_rotate_swift.md +11 -0
  38. data/app/pb_kits/playbook/pb_icon/docs/_icon_sizes_swift.md +46 -0
  39. data/app/pb_kits/playbook/pb_icon/docs/example.yml +8 -0
  40. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color_props.md +6 -0
  41. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color_swift.md +16 -0
  42. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_defaul_swift.md +7 -0
  43. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes_swift.md +11 -0
  44. data/app/pb_kits/playbook/pb_icon_circle/docs/example.yml +7 -0
  45. data/app/pb_kits/playbook/pb_image/docs/_image_props_swift.md +7 -0
  46. data/app/pb_kits/playbook/pb_image/docs/_rounded_image_swift.md +47 -0
  47. data/app/pb_kits/playbook/pb_image/docs/_size_image_swift.md +47 -0
  48. data/app/pb_kits/playbook/pb_image/docs/_size_none_image_swift.md +15 -0
  49. data/app/pb_kits/playbook/pb_image/docs/example.yml +5 -0
  50. data/app/pb_kits/playbook/pb_label_value/docs/_label_value_default_swift.md +11 -0
  51. data/app/pb_kits/playbook/pb_label_value/docs/_label_value_details_examples_swift.md +72 -0
  52. data/app/pb_kits/playbook/pb_label_value/docs/_label_value_details_swift.md +41 -0
  53. data/app/pb_kits/playbook/pb_label_value/docs/_label_value_props_swift.md +11 -0
  54. data/app/pb_kits/playbook/pb_label_value/docs/example.yml +6 -0
  55. data/app/pb_kits/playbook/pb_message/docs/_message_default_swift.md +57 -0
  56. data/app/pb_kits/playbook/pb_message/docs/_message_props_swift.md +12 -0
  57. data/app/pb_kits/playbook/pb_message/docs/example.yml +4 -0
  58. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids.html.erb +0 -1
  59. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.html.erb +104 -45
  60. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.jsx +100 -43
  61. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.md +1 -0
  62. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.html.erb +138 -0
  63. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.jsx +150 -0
  64. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.md +1 -0
  65. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
  66. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
  67. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.jsx +33 -0
  68. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.md +3 -0
  69. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
  70. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -1
  71. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.html.erb +7 -0
  72. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.jsx +40 -0
  73. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.html.erb +11 -1
  74. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx +17 -2
  75. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.html.erb +6 -1
  76. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.jsx +22 -5
  77. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.html.erb +12 -0
  78. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.jsx +57 -0
  79. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.html.erb +23 -0
  80. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.jsx +59 -0
  81. data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +10 -5
  82. data/app/pb_kits/playbook/pb_star_rating/docs/index.js +6 -0
  83. data/app/pb_kits/playbook/pb_table/docs/_table_header.html.erb +47 -31
  84. data/app/pb_kits/playbook/pb_table/docs/_table_header.md +5 -0
  85. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
  86. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default_react.jsx +0 -2
  87. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_delay.jsx +0 -1
  88. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_interaction.jsx +0 -1
  89. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_margin.jsx +0 -1
  90. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_selectors.html.erb +1 -1
  91. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_show_tooltip.html.erb +39 -0
  92. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_show_tooltip.md +5 -0
  93. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_show_tooltip_react.jsx +45 -0
  94. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_show_tooltip_react.md +3 -0
  95. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +3 -0
  96. data/app/pb_kits/playbook/pb_tooltip/docs/index.js +1 -0
  97. data/dist/app/components/playbook/pb_docs/kit_example.html.erb +3 -3
  98. data/dist/menu.yml +284 -110
  99. data/dist/pb_doc_helper.rb +5 -5
  100. data/dist/playbook-doc.js +8 -8
  101. metadata +70 -7
@@ -3,69 +3,126 @@ import MultiLevelSelect from "../_multi_level_select";
3
3
 
4
4
  const treeData = [
5
5
  {
6
- label: "Power Home Remodeling",
7
- value: "Power Home Remodeling",
8
- id: "powerhome2",
9
- expanded: true,
6
+ label: "HQ",
7
+ value: "HQ",
8
+ id: "hq",
9
+ },
10
+ {
11
+ label: "Philadelphia",
12
+ value: "Philadelphia",
13
+ id: "phl",
10
14
  children: [
11
15
  {
12
- label: "People",
13
- value: "People",
14
- id: "people2",
15
- expanded: true,
16
+ label: "Marketing & Sales PHL",
17
+ value: "Marketing & Sales PHL",
18
+ id: "marketingPHL",
19
+ },
20
+ {
21
+ label: "Installation Office PHL",
22
+ value: "Installation Office PHL",
23
+ id: "installationPHL",
24
+ },
25
+ {
26
+ label: "Warehouse PHL",
27
+ value: "Warehouse PHL",
28
+ id: "warehousePHL",
29
+ },
30
+ ]
31
+ },
32
+ {
33
+ label: "New Jersey",
34
+ value: "New Jersey",
35
+ id: "nj",
36
+ children: [
37
+ {
38
+ label: "New Jersey",
39
+ value: "New Jersey",
40
+ id: "nj1",
16
41
  children: [
17
42
  {
18
- label: "Talent Acquisition",
19
- value: "Talent Acquisition",
20
- id: "talent2",
43
+ label: "Marketing & Sales NJ",
44
+ value: "Marketing & Sales NJ",
45
+ id: "marketingNJ",
21
46
  },
22
47
  {
23
- label: "Business Affairs",
24
- value: "Business Affairs",
25
- id: "business2",
26
- children: [
27
- {
28
- label: "Initiatives",
29
- value: "Initiatives",
30
- id: "initiative2",
31
- },
32
- {
33
- label: "Learning & Development",
34
- value: "Learning & Development",
35
- id: "development2",
36
- },
37
- ],
48
+ label: "Installation Office NJ",
49
+ value: "Installation Office NJ",
50
+ id: "installationNJ",
38
51
  },
39
52
  {
40
- label: "People Experience",
41
- value: "People Experience",
42
- id: "experience2",
53
+ label: "Warehouse NJ",
54
+ value: "Warehouse NJ",
55
+ id: "warehouseNJ",
43
56
  },
44
57
  ],
45
58
  },
46
59
  {
47
- label: "Contact Center",
48
- value: "Contact Center",
49
- id: "contact2",
60
+ label: "Princeton",
61
+ value: "Princeton",
62
+ id: "princeton",
50
63
  children: [
51
64
  {
52
- label: "Appointment Management",
53
- value: "Appointment Management",
54
- id: "appointment2",
65
+ label: "Marketing & Sales Princeton",
66
+ value: "Marketing & Sales Princeton",
67
+ id: "marketingPR",
55
68
  },
56
69
  {
57
- label: "Customer Service",
58
- value: "Customer Service",
59
- id: "customer2",
70
+ label: "Installation Office Princeton",
71
+ value: "Installation Office Princeton",
72
+ id: "installationPR",
60
73
  },
61
74
  {
62
- label: "Energy",
63
- value: "Energy",
64
- id: "energy2",
75
+ label: "Warehouse Princeton",
76
+ value: "Warehouse Princeton",
77
+ id: "warehousePR",
65
78
  },
66
- ],
79
+ ]
80
+ },
81
+ ]
82
+ },
83
+ {
84
+ label: "Maryland",
85
+ value: "Maryland",
86
+ id: "MD",
87
+ children: [
88
+ {
89
+ label: "Marketing & Sales MD",
90
+ value: "Marketing & Sales MD",
91
+ id: "marketingMD",
92
+ },
93
+ {
94
+ label: "Installation Office MD",
95
+ value: "Installation Office MD",
96
+ id: "installationMD",
97
+ },
98
+ {
99
+ label: "Warehouse MD",
100
+ value: "Warehouse MD",
101
+ id: "warehouseMD",
102
+ },
103
+ ]
104
+ },
105
+ {
106
+ label: "Connecticut",
107
+ value: "Connecticut",
108
+ id: "CT",
109
+ children: [
110
+ {
111
+ label: "Marketing & Sales CT",
112
+ value: "Marketing & Sales CT",
113
+ id: "marketingCT",
114
+ },
115
+ {
116
+ label: "Installation Office CT",
117
+ value: "Installation Office CT",
118
+ id: "installationCT",
119
+ },
120
+ {
121
+ label: "Warehouse CT",
122
+ value: "Warehouse CT",
123
+ id: "warehouseCT",
67
124
  },
68
- ],
125
+ ]
69
126
  },
70
127
  ];
71
128
 
@@ -0,0 +1 @@
1
+ Optionally enable the `single` variant to replace checkboxes with radios so the input accepts and returns only a single selection.
@@ -0,0 +1,138 @@
1
+ <% treeData = [
2
+ {
3
+ label: "HQ",
4
+ value: "HQ",
5
+ id: "hq1",
6
+ },
7
+ {
8
+ label: "Philadelphia",
9
+ value: "Philadelphia",
10
+ id: "phl1",
11
+ hideRadio: true,
12
+ children: [
13
+ {
14
+ label: "Marketing & Sales PHL",
15
+ value: "Marketing & Sales PHL",
16
+ id: "marketingPHL1",
17
+ },
18
+ {
19
+ label: "Installation Office PHL",
20
+ value: "Installation Office PHL",
21
+ id: "installationPHL1",
22
+ },
23
+ {
24
+ label: "Warehouse PHL",
25
+ value: "Warehouse PHL",
26
+ id: "warehousePHL1",
27
+ },
28
+ ]
29
+ },
30
+ {
31
+ label: "New Jersey",
32
+ value: "New Jersey",
33
+ id: "nj2",
34
+ hideRadio: true,
35
+ children: [
36
+ {
37
+ label: "New Jersey",
38
+ value: "New Jersey",
39
+ id: "nj3",
40
+ hideRadio: true,
41
+ children: [
42
+ {
43
+ label: "Marketing & Sales NJ",
44
+ value: "Marketing & Sales NJ",
45
+ id: "marketingNJ1",
46
+ },
47
+ {
48
+ label: "Installation Office NJ",
49
+ value: "Installation Office NJ",
50
+ id: "installationNJ1",
51
+ },
52
+ {
53
+ label: "Warehouse NJ",
54
+ value: "Warehouse NJ",
55
+ id: "warehouseNJ1",
56
+ },
57
+ ],
58
+ },
59
+ {
60
+ label: "Princeton",
61
+ value: "Princeton",
62
+ id: "princeton1",
63
+ hideRadio: true,
64
+ children: [
65
+ {
66
+ label: "Marketing & Sales Princeton",
67
+ value: "Marketing & Sales Princeton",
68
+ id: "marketingPR1",
69
+ },
70
+ {
71
+ label: "Installation Office Princeton",
72
+ value: "Installation Office Princeton",
73
+ id: "installationPR1",
74
+ },
75
+ {
76
+ label: "Warehouse Princeton",
77
+ value: "Warehouse Princeton",
78
+ id: "warehousePR1",
79
+ },
80
+ ]
81
+ },
82
+ ]
83
+ },
84
+ {
85
+ label: "Maryland",
86
+ value: "Maryland",
87
+ id: "MD1",
88
+ hideRadio: true,
89
+ children: [
90
+ {
91
+ label: "Marketing & Sales MD",
92
+ value: "Marketing & Sales MD",
93
+ id: "marketingMD1",
94
+ },
95
+ {
96
+ label: "Installation Office MD",
97
+ value: "Installation Office MD",
98
+ id: "installationMD1",
99
+ },
100
+ {
101
+ label: "Warehouse MD",
102
+ value: "Warehouse MD",
103
+ id: "warehouseMD1",
104
+ },
105
+ ]
106
+ },
107
+ {
108
+ label: "Connecticut",
109
+ value: "Connecticut",
110
+ id: "CT1",
111
+ hideRadio: true,
112
+ children: [
113
+ {
114
+ label: "Marketing & Sales CT",
115
+ value: "Marketing & Sales CT",
116
+ id: "marketingCT1",
117
+ },
118
+ {
119
+ label: "Installation Office CT",
120
+ value: "Installation Office CT",
121
+ id: "installationCT1",
122
+ },
123
+ {
124
+ label: "Warehouse CT",
125
+ value: "Warehouse CT",
126
+ id: "warehouseCT1",
127
+ },
128
+ ]
129
+ },
130
+ ]; %>
131
+
132
+ <%= pb_rails("multi_level_select", props: {
133
+ id: "multi-level-select-single-children-only-rails",
134
+ name: "my_single_children_only_select_array",
135
+ tree_data: treeData,
136
+ input_name: "PowerChildren",
137
+ variant: "single"
138
+ }) %>
@@ -0,0 +1,150 @@
1
+ import React from "react";
2
+ import MultiLevelSelect from "../_multi_level_select";
3
+
4
+ const treeData = [
5
+ {
6
+ label: "HQ",
7
+ value: "HQ",
8
+ id: "hq1",
9
+ },
10
+ {
11
+ label: "Philadelphia",
12
+ value: "Philadelphia",
13
+ id: "phl1",
14
+ hideRadio: true,
15
+ children: [
16
+ {
17
+ label: "Marketing & Sales PHL",
18
+ value: "Marketing & Sales PHL",
19
+ id: "marketingPHL1",
20
+ },
21
+ {
22
+ label: "Installation Office PHL",
23
+ value: "Installation Office PHL",
24
+ id: "installationPHL1",
25
+ },
26
+ {
27
+ label: "Warehouse PHL",
28
+ value: "Warehouse PHL",
29
+ id: "warehousePHL1",
30
+ },
31
+ ]
32
+ },
33
+ {
34
+ label: "New Jersey",
35
+ value: "New Jersey",
36
+ id: "nj2",
37
+ hideRadio: true,
38
+ children: [
39
+ {
40
+ label: "New Jersey",
41
+ value: "New Jersey",
42
+ id: "nj3",
43
+ hideRadio: true,
44
+ children: [
45
+ {
46
+ label: "Marketing & Sales NJ",
47
+ value: "Marketing & Sales NJ",
48
+ id: "marketingNJ1",
49
+ },
50
+ {
51
+ label: "Installation Office NJ",
52
+ value: "Installation Office NJ",
53
+ id: "installationNJ1",
54
+ },
55
+ {
56
+ label: "Warehouse NJ",
57
+ value: "Warehouse NJ",
58
+ id: "warehouseNJ1",
59
+ },
60
+ ],
61
+ },
62
+ {
63
+ label: "Princeton",
64
+ value: "Princeton",
65
+ id: "princeton1",
66
+ hideRadio: true,
67
+ children: [
68
+ {
69
+ label: "Marketing & Sales Princeton",
70
+ value: "Marketing & Sales Princeton",
71
+ id: "marketingPR1",
72
+ },
73
+ {
74
+ label: "Installation Office Princeton",
75
+ value: "Installation Office Princeton",
76
+ id: "installationPR1",
77
+ },
78
+ {
79
+ label: "Warehouse Princeton",
80
+ value: "Warehouse Princeton",
81
+ id: "warehousePR1",
82
+ },
83
+ ]
84
+ },
85
+ ]
86
+ },
87
+ {
88
+ label: "Maryland",
89
+ value: "Maryland",
90
+ id: "MD1",
91
+ hideRadio: true,
92
+ children: [
93
+ {
94
+ label: "Marketing & Sales MD",
95
+ value: "Marketing & Sales MD",
96
+ id: "marketingMD1",
97
+ },
98
+ {
99
+ label: "Installation Office MD",
100
+ value: "Installation Office MD",
101
+ id: "installationMD1",
102
+ },
103
+ {
104
+ label: "Warehouse MD",
105
+ value: "Warehouse MD",
106
+ id: "warehouseMD1",
107
+ },
108
+ ]
109
+ },
110
+ {
111
+ label: "Connecticut",
112
+ value: "Connecticut",
113
+ id: "CT1",
114
+ hideRadio: true,
115
+ children: [
116
+ {
117
+ label: "Marketing & Sales CT",
118
+ value: "Marketing & Sales CT",
119
+ id: "marketingCT1",
120
+ },
121
+ {
122
+ label: "Installation Office CT",
123
+ value: "Installation Office CT",
124
+ id: "installationCT1",
125
+ },
126
+ {
127
+ label: "Warehouse CT",
128
+ value: "Warehouse CT",
129
+ id: "warehouseCT1",
130
+ },
131
+ ]
132
+ },
133
+ ];
134
+
135
+ const MultiLevelSelectSingleChildrenOnly = (props) => {
136
+ return (
137
+ <div>
138
+ <MultiLevelSelect
139
+ id="multiselect-single-children-only"
140
+ inputName="PowerChildren"
141
+ onSelect={(selectedNode) => console.log("Selected Node", selectedNode)}
142
+ treeData={treeData}
143
+ variant="single"
144
+ {...props}
145
+ />
146
+ </div>
147
+ )
148
+ };
149
+
150
+ export default MultiLevelSelectSingleChildrenOnly;
@@ -0,0 +1 @@
1
+ Dynamically control your selectable options by passing `hideRadio: true` to any node within your tree data to omit that node's radio selector. In this example we've hidden all radios except ultimate children (nodes without descendants).
@@ -2,6 +2,7 @@ examples:
2
2
  rails:
3
3
  - multi_level_select_default: Default
4
4
  - multi_level_select_single: Single Select
5
+ - multi_level_select_single_children_only: Single Select w/ Hidden Radios
5
6
  - multi_level_select_return_all_selected: Return All Selected
6
7
  - multi_level_select_selected_ids: Selected Ids
7
8
  - multi_level_select_with_form: With Form
@@ -9,5 +10,6 @@ examples:
9
10
  react:
10
11
  - multi_level_select_default: Default
11
12
  - multi_level_select_single: Single Select
13
+ - multi_level_select_single_children_only: Single Select w/ Hidden Radios
12
14
  - multi_level_select_return_all_selected: Return All Selected
13
15
  - multi_level_select_selected_ids: Selected Ids
@@ -1,4 +1,5 @@
1
1
  export { default as MultiLevelSelectDefault } from './_multi_level_select_default.jsx'
2
2
  export { default as MultiLevelSelectSingle } from './_multi_level_select_single.jsx'
3
+ export { default as MultiLevelSelectSingleChildrenOnly } from './_multi_level_select_single_children_only.jsx'
3
4
  export { default as MultiLevelSelectReturnAllSelected } from './_multi_level_select_return_all_selected.jsx'
4
5
  export { default as MultiLevelSelectSelectedIds } from "./_multi_level_select_selected_ids.jsx"
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ import { useEditor, EditorContent } from "@tiptap/react";
3
+
4
+ import { RichTextEditor } from "../..";
5
+
6
+ import Document from "@tiptap/extension-document";
7
+ import Paragraph from "@tiptap/extension-paragraph";
8
+ import Text from "@tiptap/extension-text";
9
+
10
+ const RichTextEditorToolbarDisabled = (props) => {
11
+ const editor = useEditor({
12
+ extensions: [Document, Paragraph, Text],
13
+ content:
14
+ "Add your text here. You can format your text, add links, quotes, and bullets.",
15
+ });
16
+ if (!editor) {
17
+ return null;
18
+ }
19
+
20
+ return (
21
+ <div>
22
+ <RichTextEditor
23
+ advancedEditor={editor}
24
+ advancedEditorToolbar={false}
25
+ {...props}
26
+ >
27
+ <EditorContent editor={editor} />
28
+ </RichTextEditor>
29
+ </div>
30
+ );
31
+ };
32
+
33
+ export default RichTextEditorToolbarDisabled;
@@ -0,0 +1,3 @@
1
+ Because our default variant's toolbar requires [Tiptap's StarterKit](https://tiptap.dev/api/extensions/starter-kit) which may include features that are not relevant to your project or even block some custom extensions, optionally setting `advancedEditorToolbar` to `false` creates an editor without a toolbar, using only the minimum requirements.
2
+
3
+ __NOTE__: Omitting the Starter Kit requires that the editor’s default extensions (`document`, `paragraph`, and `text`) __must__ be imported directly from Tiptap or as a custom extensions.
@@ -15,6 +15,7 @@ examples:
15
15
  - rich_text_editor_default: Default
16
16
  - rich_text_editor_advanced_default: Advanced Default
17
17
  - rich_text_editor_more_extensions: Advanced (Extra Extensions)
18
+ - rich_text_editor_toolbar_disabled: Advanced (Toolbar disabled)
18
19
  - rich_text_editor_simple: Simple
19
20
  - rich_text_editor_attributes: Attributes
20
21
  - rich_text_editor_focus: Focus
@@ -8,4 +8,5 @@ export { default as RichTextEditorToolbarBottom } from './_rich_text_editor_tool
8
8
  export { default as RichTextEditorInline } from './_rich_text_editor_inline.jsx'
9
9
  export { default as RichTextEditorPreview } from './_rich_text_editor_preview.jsx'
10
10
  export { default as RichTextEditorAdvancedDefault } from './_rich_text_editor_advanced_default.jsx'
11
- export { default as RichTextEditorMoreExtensions } from './_rich_text_editor_more_extensions.jsx'
11
+ export { default as RichTextEditorMoreExtensions } from './_rich_text_editor_more_extensions.jsx'
12
+ export { default as RichTextEditorToolbarDisabled } from './_rich_text_editor_toolbar_disabled.jsx'
@@ -0,0 +1,7 @@
1
+ <%= pb_rails("star_rating", props: { rating: 3 }) %>
2
+ </br>
3
+ <%= pb_rails("star_rating", props: { rating: 3, color_option: "outline" }) %>
4
+ </br>
5
+ <%= pb_rails("star_rating", props: { rating: 3, color_option: "primary" }) %>
6
+ </br>
7
+ <%= pb_rails("star_rating", props: { rating: 3, color_option: "subtle" }) %>
@@ -0,0 +1,40 @@
1
+ import React from 'react'
2
+
3
+ import StarRating from '../_star_rating'
4
+
5
+ const StarRatingColorOptions = (props) => (
6
+ <>
7
+
8
+ <StarRating
9
+ rating={3}
10
+ {...props}
11
+ />
12
+
13
+ <br />
14
+
15
+ <StarRating
16
+ colorOption='outline'
17
+ rating={3}
18
+ {...props}
19
+ />
20
+
21
+ <br />
22
+
23
+ <StarRating
24
+ colorOption='primary'
25
+ rating={3}
26
+ {...props}
27
+ />
28
+
29
+ <br />
30
+
31
+ <StarRating
32
+ colorOption='subtle'
33
+ rating={3}
34
+ {...props}
35
+ />
36
+
37
+ </>
38
+ )
39
+
40
+ export default StarRatingColorOptions
@@ -2,12 +2,22 @@
2
2
 
3
3
  <br>
4
4
 
5
+ <%= pb_rails("star_rating", props: { rating: 1 }) %>
6
+
7
+ <br>
8
+
9
+ <%= pb_rails("star_rating", props: { rating: 2}) %>
10
+
11
+ <br>
12
+
5
13
  <%= pb_rails("star_rating", props: { rating: 3 }) %>
6
14
 
7
15
  <br>
8
16
 
9
- <%= pb_rails("star_rating", props: { rating: 1.5 }) %>
17
+ <%= pb_rails("star_rating", props: { rating: 4 }) %>
10
18
 
11
19
  <br>
12
20
 
13
21
  <%= pb_rails("star_rating", props: { rating: 5 }) %>
22
+
23
+ <br>
@@ -4,12 +4,12 @@ import StarRating from '../_star_rating'
4
4
 
5
5
  const StarRatingDefault = (props) => (
6
6
  <>
7
- <StarRating />
7
+ <StarRating {...props} />
8
8
 
9
9
  <br />
10
10
 
11
11
  <StarRating
12
- rating={3}
12
+ rating={0.9}
13
13
  {...props}
14
14
  />
15
15
 
@@ -20,6 +20,21 @@ const StarRatingDefault = (props) => (
20
20
  {...props}
21
21
  />
22
22
 
23
+ <br />
24
+
25
+ <StarRating
26
+ rating={3}
27
+ {...props}
28
+ />
29
+
30
+ <br />
31
+
32
+ <StarRating
33
+ rating={4.2}
34
+ {...props}
35
+ />
36
+
37
+
23
38
  <br />
24
39
 
25
40
  <StarRating
@@ -1 +1,6 @@
1
- <%= pb_rails("star_rating", props: { rating: 3.5, hide_rating: true }) %>
1
+ <%= pb_rails("star_rating", props: { rating: 3 }) %>
2
+ </br>
3
+ <%= pb_rails("star_rating", props: { rating: 3, layout_option: "number" }) %>
4
+ </br>
5
+ <%= pb_rails("star_rating", props: { rating: 3, layout_option: "onestar" }) %>
6
+ </br>