playbook_ui_docs 13.10.0.pre.alpha.webpackerregistercomponents1463 → 13.11.0
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_dawg/docs/example.yml +9 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids.html.erb +0 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.html.erb +104 -45
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.jsx +100 -43
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.html.erb +138 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.jsx +150 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.jsx +33 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.md +3 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -1
- data/dist/app/components/playbook/pb_docs/kit_example.html.erb +3 -3
- data/dist/menu.yml +284 -110
- data/dist/pb_doc_helper.rb +5 -5
- data/dist/playbook-doc.js +8 -8
- metadata +13 -6
@@ -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'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% example_html = ERB.new(example).result %>
|
2
2
|
|
3
3
|
<%= pb_rails("card", props: { classname: "pb--doc", padding: "none", dark: dark }) do %>
|
4
|
-
<% unless (
|
4
|
+
<% unless (type == "swift") %>
|
5
5
|
<div class="pb--kit-example">
|
6
6
|
<%= pb_rails("caption", props: { text: example_title, dark: dark }) %>
|
7
7
|
<br />
|
@@ -9,12 +9,12 @@
|
|
9
9
|
<br>
|
10
10
|
</div>
|
11
11
|
<% else %>
|
12
|
-
<div class="pb--kit-example-markdown pt_none markdown <%= dark ? "dark" : "" %>">
|
12
|
+
<div class="pb--kit-example-markdown pt_none markdown kit_show_swift <%= dark ? "dark" : "" %>">
|
13
13
|
<%= pb_rails("caption", props: { text: example_title, dark: dark, margin_top: "md" }) %>
|
14
14
|
<%= render_markdown(description) %>
|
15
15
|
</div>
|
16
16
|
<% end %>
|
17
|
-
<% if show_code %>
|
17
|
+
<% if show_code && type != "swift" %>
|
18
18
|
<div class="markdown pb--kit-example-markdown markdown <%= dark ? "dark" : "" %>">
|
19
19
|
<%= render_markdown(description) %>
|
20
20
|
</div>
|
data/dist/menu.yml
CHANGED
@@ -1,111 +1,285 @@
|
|
1
|
+
web: &web ["rails", "react"]
|
2
|
+
all: &all ["rails", "react", "swift"]
|
3
|
+
rails_swift: &rails_swift ["rails", "swift"]
|
4
|
+
react_swift: &react_swift ["swift", "react"]
|
5
|
+
rails_only: &rails_only ["rails"]
|
6
|
+
react_only: &react_only ["react"]
|
7
|
+
swift_only: &swift_only ["swift"]
|
8
|
+
|
1
9
|
kits:
|
2
|
-
- avatars
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
10
|
+
- name: "avatars"
|
11
|
+
components:
|
12
|
+
- name: "avatar"
|
13
|
+
platforms: *all
|
14
|
+
- name: "avatar_action_button"
|
15
|
+
platforms: *web
|
16
|
+
- name: "multiple_users"
|
17
|
+
platforms: *web
|
18
|
+
- name: "multiple_users_stacked"
|
19
|
+
platforms: *web
|
20
|
+
- name: "user"
|
21
|
+
platforms: *web
|
22
|
+
- name: "background"
|
23
|
+
components:
|
24
|
+
- name: "background"
|
25
|
+
platforms: *web
|
26
|
+
- name: "bread_crumbs"
|
27
|
+
components:
|
28
|
+
- name: "bread_crumbs"
|
29
|
+
platforms: *web
|
30
|
+
- name: "buttons"
|
31
|
+
components:
|
32
|
+
- name: "button"
|
33
|
+
platforms: *web
|
34
|
+
- name: "button_toolbar"
|
35
|
+
platforms: *web
|
36
|
+
- name: "circle_icon_button"
|
37
|
+
platforms: *web
|
38
|
+
- name: "card"
|
39
|
+
components:
|
40
|
+
- name: "card"
|
41
|
+
platforms: *all
|
42
|
+
- name: "collapsible"
|
43
|
+
components:
|
44
|
+
- name: "collapsible"
|
45
|
+
platforms: *web
|
46
|
+
- name: "charts_and_graphs"
|
47
|
+
components:
|
48
|
+
- name: "bar_graph"
|
49
|
+
platforms: *web
|
50
|
+
- name: "circle_chart"
|
51
|
+
platforms: *web
|
52
|
+
- name: "distribution_bar"
|
53
|
+
platforms: *web
|
54
|
+
- name: "gauge"
|
55
|
+
platforms: *web
|
56
|
+
- name: "legend"
|
57
|
+
platforms: *web
|
58
|
+
- name: "line_graph"
|
59
|
+
platforms: *web
|
60
|
+
- name: "treemap_chart"
|
61
|
+
platforms: *web
|
62
|
+
- name: "dialog"
|
63
|
+
components:
|
64
|
+
- name: "dialog"
|
65
|
+
platforms: *web
|
66
|
+
- name: "filter"
|
67
|
+
components:
|
68
|
+
- name: "filter"
|
69
|
+
platforms: *web
|
70
|
+
- name: "fixed_confirmation_toast"
|
71
|
+
components:
|
72
|
+
- name: "fixed_confirmation_toast"
|
73
|
+
platforms: *web
|
74
|
+
- name: "forms"
|
75
|
+
components:
|
76
|
+
- name: "checkbox"
|
77
|
+
platforms: *web
|
78
|
+
- name: "date_picker"
|
79
|
+
platforms: *web
|
80
|
+
- name: "file_upload"
|
81
|
+
platforms: *web
|
82
|
+
- name: "form"
|
83
|
+
platforms: *rails_only
|
84
|
+
- name: "form_group"
|
85
|
+
platforms: *web
|
86
|
+
- name: "form_pill"
|
87
|
+
platforms: *web
|
88
|
+
- name: "multi_level_select"
|
89
|
+
platforms: *web
|
90
|
+
- name: "passphrase"
|
91
|
+
platforms: *web
|
92
|
+
- name: "phone_number_input"
|
93
|
+
platforms: *web
|
94
|
+
- name: "radio"
|
95
|
+
platforms: *all
|
96
|
+
- name: "rich_text_editor"
|
97
|
+
platforms: *web
|
98
|
+
- name: "select"
|
99
|
+
platforms: *web
|
100
|
+
- name: "selectable_card"
|
101
|
+
platforms: *web
|
102
|
+
- name: "selectable_card_icon"
|
103
|
+
platforms: *web
|
104
|
+
- name: "selectable_icon"
|
105
|
+
platforms: *web
|
106
|
+
- name: "selectable_list"
|
107
|
+
platforms: *web
|
108
|
+
- name: "text_input"
|
109
|
+
platforms: *web
|
110
|
+
- name: "textarea"
|
111
|
+
platforms: *web
|
112
|
+
- name: "toggle"
|
113
|
+
platforms: *web
|
114
|
+
- name: "typeahead"
|
115
|
+
platforms: *web
|
116
|
+
- name: "highlight"
|
117
|
+
components:
|
118
|
+
- name: "highlight"
|
119
|
+
platforms: *web
|
120
|
+
- name: "icon"
|
121
|
+
components:
|
122
|
+
- name: "icon"
|
123
|
+
platforms: *web
|
124
|
+
- name: "icon_circle"
|
125
|
+
components:
|
126
|
+
- name: "icon_circle"
|
127
|
+
platforms: *web
|
128
|
+
- name: "icon_stat_value"
|
129
|
+
components:
|
130
|
+
- name: "icon_stat_value"
|
131
|
+
platforms: *web
|
132
|
+
- name: "icon_value"
|
133
|
+
components:
|
134
|
+
- name: "icon_value"
|
135
|
+
platforms: *web
|
136
|
+
- name: "image"
|
137
|
+
components:
|
138
|
+
- name: "image"
|
139
|
+
platforms: *web
|
140
|
+
- name: "layouts"
|
141
|
+
components:
|
142
|
+
- name: "flex"
|
143
|
+
platforms: *web
|
144
|
+
- name: "layout"
|
145
|
+
platforms: *web
|
146
|
+
- name: "lightbox"
|
147
|
+
components:
|
148
|
+
- name: "lightbox"
|
149
|
+
platforms: *react_only
|
150
|
+
- name: "list"
|
151
|
+
components:
|
152
|
+
- name: "list"
|
153
|
+
platforms: *web
|
154
|
+
- name: "loading_inline"
|
155
|
+
components:
|
156
|
+
- name: "loading_inline"
|
157
|
+
platforms: *web
|
158
|
+
- name: "map"
|
159
|
+
components:
|
160
|
+
- name: "map"
|
161
|
+
platforms: *react_only
|
162
|
+
- name: "nav"
|
163
|
+
components:
|
164
|
+
- name: "nav"
|
165
|
+
platforms: *web
|
166
|
+
- name: "pagination"
|
167
|
+
components:
|
168
|
+
- name: "pagination"
|
169
|
+
platforms: *rails_only
|
170
|
+
- name: "popover"
|
171
|
+
components:
|
172
|
+
- name: "popover"
|
173
|
+
platforms: *web
|
174
|
+
- name: "progress"
|
175
|
+
components:
|
176
|
+
- name: "progress_pills"
|
177
|
+
platforms: *web
|
178
|
+
- name: "progress_simple"
|
179
|
+
platforms: *web
|
180
|
+
- name: "progress_step"
|
181
|
+
platforms: *web
|
182
|
+
- name: "section_separator"
|
183
|
+
components:
|
184
|
+
- name: "section_separator"
|
185
|
+
platforms: *web
|
186
|
+
- name: "star_rating"
|
187
|
+
components:
|
188
|
+
- name: "star_rating"
|
189
|
+
platforms: *web
|
190
|
+
- name: "table"
|
191
|
+
components:
|
192
|
+
- name: "table"
|
193
|
+
platforms: *web
|
194
|
+
- name: "tags"
|
195
|
+
components:
|
196
|
+
- name: "tags"
|
197
|
+
platforms: *web
|
198
|
+
- name: "badge"
|
199
|
+
platforms: *web
|
200
|
+
- name: "hashtag"
|
201
|
+
platforms: *web
|
202
|
+
- name: "pill"
|
203
|
+
platforms: *all
|
204
|
+
- name: "timeline"
|
205
|
+
components:
|
206
|
+
- name: "timeline"
|
207
|
+
platforms: *web
|
208
|
+
- name: "time_and_date"
|
209
|
+
components:
|
210
|
+
- name: "date"
|
211
|
+
platforms: *web
|
212
|
+
- name: "date_range_inline"
|
213
|
+
platforms: *web
|
214
|
+
- name: "date_range_stacked"
|
215
|
+
platforms: *web
|
216
|
+
- name: "date_stacked"
|
217
|
+
platforms: *web
|
218
|
+
- name: "date_time"
|
219
|
+
platforms: *web
|
220
|
+
- name: "date_time_stacked"
|
221
|
+
platforms: *web
|
222
|
+
- name: "date_year_stacked"
|
223
|
+
platforms: *web
|
224
|
+
- name: "time"
|
225
|
+
platforms: *web
|
226
|
+
- name: "time_range_inline"
|
227
|
+
platforms: *web
|
228
|
+
- name: "time_stacked"
|
229
|
+
platforms: *web
|
230
|
+
- name: "timestamp"
|
231
|
+
platforms: *all
|
232
|
+
- name: "weekday_stacked"
|
233
|
+
platforms: *web
|
234
|
+
- name: "tooltip"
|
235
|
+
components:
|
236
|
+
- name: "tooltip"
|
237
|
+
platforms: *web
|
238
|
+
- name: "typography"
|
239
|
+
components:
|
240
|
+
- name: "body"
|
241
|
+
platforms: *web
|
242
|
+
- name: "caption"
|
243
|
+
platforms: *web
|
244
|
+
- name: "detail"
|
245
|
+
platforms: *web
|
246
|
+
- name: "title"
|
247
|
+
platforms: *web
|
248
|
+
- name: "typography_patterns"
|
249
|
+
components:
|
250
|
+
- name: "contact"
|
251
|
+
platforms: *web
|
252
|
+
- name: "currency"
|
253
|
+
platforms: *web
|
254
|
+
- name: "dashboard_value"
|
255
|
+
platforms: *web
|
256
|
+
- name: "home_address_street"
|
257
|
+
platforms: *web
|
258
|
+
- name: "label_pill"
|
259
|
+
platforms: *web
|
260
|
+
- name: "label_value"
|
261
|
+
platforms: *web
|
262
|
+
- name: "message"
|
263
|
+
platforms: *web
|
264
|
+
- name: "person"
|
265
|
+
platforms: *web
|
266
|
+
- name: "person_contact"
|
267
|
+
platforms: *web
|
268
|
+
- name: "source"
|
269
|
+
platforms: *web
|
270
|
+
- name: "stat_change"
|
271
|
+
platforms: *web
|
272
|
+
- name: "stat_value"
|
273
|
+
platforms: *web
|
274
|
+
- name: "title_count"
|
275
|
+
platforms: *web
|
276
|
+
- name: "title_detail"
|
277
|
+
platforms: *web
|
278
|
+
- name: "user_badge"
|
279
|
+
components:
|
280
|
+
- name: "user_badge"
|
281
|
+
platforms: *web
|
282
|
+
- name: "walkthrough"
|
283
|
+
components:
|
284
|
+
- name: "walkthrough"
|
285
|
+
platforms: *web
|
data/dist/pb_doc_helper.rb
CHANGED
@@ -33,9 +33,9 @@ module PlaybookWebsite
|
|
33
33
|
kits.each do |kit|
|
34
34
|
if kit.is_a?(Hash)
|
35
35
|
nav_hash_array(kit).each do |sub_kit|
|
36
|
-
display_kits << render_pb_doc_kit(sub_kit, type, limit_examples, false, dark_mode)
|
36
|
+
display_kits << render_pb_doc_kit(sub_kit, type, limit_examples, false, dark_mode) if pb_doc_has_kit_type?(sub_kit, type)
|
37
37
|
end
|
38
|
-
|
38
|
+
elsif pb_doc_has_kit_type?(kit, type)
|
39
39
|
display_kits << render_pb_doc_kit(kit, type, limit_examples, false, dark_mode)
|
40
40
|
end
|
41
41
|
end
|
@@ -44,9 +44,9 @@ module PlaybookWebsite
|
|
44
44
|
# rubocop:enable Style/StringConcatenation
|
45
45
|
|
46
46
|
# rubocop:disable Naming/AccessorMethodName
|
47
|
-
def get_kits
|
48
|
-
|
49
|
-
|
47
|
+
def get_kits(_type = "rails")
|
48
|
+
aggregate_kits || []
|
49
|
+
# Filter kits that have at least one component compatible with the type
|
50
50
|
end
|
51
51
|
|
52
52
|
def get_kits_pb_website
|