playbook_ui_docs 16.1.0.pre.alpha.play277814027 → 16.1.0.pre.alpha.play279914268
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/docs/_advanced_table_sort.md +1 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_required_indicator.html.erb +6 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_required_indicator.jsx +17 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_required_indicator.md +3 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb +6 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.jsx +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.md +3 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.html.erb +5 -3
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb +3 -3
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx +4 -7
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.md +3 -0
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_disabled_item.html.erb +24 -0
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_disabled_item.jsx +87 -0
- data/app/pb_kits/playbook/pb_nav/docs/example.yml +2 -6
- data/app/pb_kits/playbook/pb_nav/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_label.jsx +44 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_label.md +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_required_indicator.jsx +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_label.jsx +28 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_label.md +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_required_indicator.jsx +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_required_indicator.html.erb +16 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_required_indicator.jsx +23 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_required_indicator.md +3 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +22 -21
- metadata +15 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c3736a232ae892c28aba8e55b4c79b81586c24c01ab54ebaaa55b48c0577560
|
|
4
|
+
data.tar.gz: eb6bdbdc97f6bdceb335d332577b1a1c22b92359e9bbdfe4464efd5baf0db605
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c1ace983f142b7e52638434a2d02abbb4744eef2ddd3d360db7af110c6750737287377d2f5fed0cb9fa136a9e6535c283fd479a32eb11713802aeb852088401
|
|
7
|
+
data.tar.gz: c885fa4dbedecbc66518b6f20a67212d289c58a74d10f467f2afecbf3d66d9130467ccc340e5ed58578656769e856694f25a8c102e2889c5f48183bb67d59a19
|
|
@@ -2,4 +2,4 @@ the `enableSorting` prop is a boolean prop set to false by default. If true, the
|
|
|
2
2
|
|
|
3
3
|
### sortIcon
|
|
4
4
|
|
|
5
|
-
An optional prop, `sortIcon` allows you to customize your icon sets by passing it an array of any comma-separated pair of icon values. The first icon value will replace the kit's default icon when sort direction is desc, and the second value will replace the default icon when sort direction is asc. `sortIcon` also allows you to pass it a single icon as a string, in which case the icon will not toggle with the sort state. Default for this prop is `["arrow-up-short
|
|
5
|
+
An optional prop, `sortIcon` allows you to customize your icon sets by passing it an array of any comma-separated pair of icon values. The first icon value will replace the kit's default icon when sort direction is desc, and the second value will replace the default icon when sort direction is asc. `sortIcon` also allows you to pass it a single icon as a string, in which case the icon will not toggle with the sort state. Default for this prop is `["arrow-up-wide-short", "arrow-down-short-wide"]`. All strings must be valid FA icons.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Checkbox from '../_checkbox'
|
|
3
|
+
|
|
4
|
+
const CheckboxRequiredIndicator = () => {
|
|
5
|
+
return (
|
|
6
|
+
<div>
|
|
7
|
+
<Checkbox
|
|
8
|
+
name="checkbox-name"
|
|
9
|
+
requiredIndicator
|
|
10
|
+
text="Checkbox label"
|
|
11
|
+
value="check-box value"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default CheckboxRequiredIndicator
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
The `requiredIndicator`/`required_indicator` prop displays a red asterisk (*) next to the label, visually indicating that the field is required. This is purely visual and does not enforce validation.
|
|
2
|
+
|
|
3
|
+
You can use `requiredIndicator`/`required_indicator` with any validation approach: HTML5 validation via the `required` prop, client-side validation, or backend validation. For this reason, it works independently and doesn't need to be paired with the `required` prop.
|
|
@@ -8,6 +8,7 @@ examples:
|
|
|
8
8
|
- checkbox_indeterminate: Indeterminate Checkbox
|
|
9
9
|
- checkbox_disabled: Disabled Checkbox
|
|
10
10
|
- checkbox_form: Form and Hidden Input
|
|
11
|
+
# - checkbox_required_indicator: Required Indicator
|
|
11
12
|
|
|
12
13
|
react:
|
|
13
14
|
- checkbox_default: Default
|
|
@@ -17,6 +18,7 @@ examples:
|
|
|
17
18
|
- checkbox_error: Default w/ Error
|
|
18
19
|
- checkbox_indeterminate: Indeterminate Checkbox
|
|
19
20
|
- checkbox_disabled: Disabled Checkbox
|
|
21
|
+
# - checkbox_required_indicator: Required Indicator
|
|
20
22
|
|
|
21
23
|
swift:
|
|
22
24
|
- checkbox_default_swift: Default
|
|
@@ -5,3 +5,4 @@ export { default as CheckboxError } from './_checkbox_error.jsx'
|
|
|
5
5
|
export { default as CheckboxChecked } from './_checkbox_checked.jsx'
|
|
6
6
|
export { default as CheckboxIndeterminate } from './_checkbox_indeterminate.jsx'
|
|
7
7
|
export { default as CheckboxDisabled } from './_checkbox_disabled.jsx'
|
|
8
|
+
export { default as CheckboxRequiredIndicator } from './_checkbox_required_indicator.jsx'
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
const option = e.detail;
|
|
77
77
|
const dropdown = e.target;
|
|
78
78
|
|
|
79
|
-
const display = dropdown.querySelector("
|
|
79
|
+
const display = dropdown.querySelector("[data-dropdown-trigger-custom-display]");
|
|
80
80
|
if (!display) return;
|
|
81
81
|
|
|
82
82
|
const nameEl = display.querySelector("#dropdown-avatar-name");
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
<%
|
|
1
|
+
<%
|
|
2
2
|
options = [
|
|
3
3
|
{ label: 'United States', value: 'unitedStates', id: 'us' },
|
|
4
4
|
{ label: 'Canada', value: 'canada', id: 'ca' },
|
|
5
5
|
{ label: 'Pakistan', value: 'pakistan', id: 'pk' },
|
|
6
6
|
]
|
|
7
|
-
|
|
8
7
|
%>
|
|
9
8
|
|
|
10
|
-
<%= pb_rails("dropdown", props: {
|
|
9
|
+
<%= pb_rails("dropdown", props: {
|
|
10
|
+
id: "select_a_country",
|
|
11
|
+
label: "Select a Country",
|
|
12
|
+
options: options
|
|
13
|
+
}) %>
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
The top-level Dropdown component optionally accepts any string through a `label` prop to produce a label above your trigger element.
|
|
1
|
+
The top-level Dropdown component optionally accepts any string through a `label` prop to produce a label above your trigger element.
|
|
2
|
+
|
|
3
|
+
Add an `id` to wire the label to the trigger so that clicking the label will move focus directly to the input, and open the drop-down.
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
<%= pb_form_with(scope: :example, url: "", method: :get, validate: true) do |form| %>
|
|
2
|
+
<%= form.typeahead :example_typeahead_field, props: { label: true, required: true, required_indicator: true } %>
|
|
2
3
|
<%= form.text_field :example_text_field, props: { label: true, required: true, required_indicator: true } %>
|
|
3
4
|
<%= form.text_field :example_text_field_2, props: { label: "Text Field Custom Label", required: true, required_indicator: true } %>
|
|
4
|
-
<%= form.
|
|
5
|
-
<%= form.text_area :example_text_area_2, props: { label: "Textarea Custom Label", required: true, required_indicator: true } %>
|
|
5
|
+
<%= form.phone_number_field :example_phone_number_field, props: { label: true, required: true, required_indicator: true } %>
|
|
6
6
|
<%= form.email_field :example_email_field, props: { label: true, required: true, required_indicator: true } %>
|
|
7
7
|
<%= form.number_field :example_number_field, props: { label: true, required: true, required_indicator: true } %>
|
|
8
8
|
<%= form.search_field :example_search_field, props: { label: true, required: true, required_indicator: true } %>
|
|
9
9
|
<%= form.password_field :example_password_field, props: { label: true, required: true, required_indicator: true } %>
|
|
10
10
|
<%= form.url_field :example_url_field, props: { label: true, required: true, required_indicator: true } %>
|
|
11
|
-
<%= form.
|
|
11
|
+
<%= form.text_area :example_text_area, props: { label: true, required: true, required_indicator: true } %>
|
|
12
|
+
<%= form.text_area :example_text_area_2, props: { label: "Textarea Custom Label", required: true, required_indicator: true } %>
|
|
13
|
+
<%# <%= form.check_box :example_checkbox, props: { label: true, text: "Checkbox Label", required: true, required_indicator: true } %>
|
|
12
14
|
<%= form.time_picker :example_time_picker_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
13
15
|
|
|
14
16
|
<%= form.actions do |action| %>
|
|
@@ -73,14 +73,11 @@ const MultiLevelSelectDefault = (props) => {
|
|
|
73
73
|
return (
|
|
74
74
|
<div>
|
|
75
75
|
<MultiLevelSelect
|
|
76
|
-
id=
|
|
76
|
+
id="select_a_department"
|
|
77
77
|
label="Select a Department"
|
|
78
78
|
onSelect={(selectedNodes) =>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
selectedNodes
|
|
82
|
-
)
|
|
83
|
-
}
|
|
79
|
+
console.log("Selected Items", selectedNodes)
|
|
80
|
+
}
|
|
84
81
|
treeData={treeData}
|
|
85
82
|
{...props}
|
|
86
83
|
/>
|
|
@@ -88,4 +85,4 @@ const MultiLevelSelectDefault = (props) => {
|
|
|
88
85
|
)
|
|
89
86
|
};
|
|
90
87
|
|
|
91
|
-
export default MultiLevelSelectDefault;
|
|
88
|
+
export default MultiLevelSelectDefault;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<%= pb_rails("nav", props: { variant: "bold" }) do %>
|
|
2
|
+
<%= pb_rails("nav/item", props: { text: "Overview", link: "#", collapsible: true, icon_left:"city", disabled: true }) do %>
|
|
3
|
+
<%= pb_rails("nav", props: { variant: "bold" }) do %>
|
|
4
|
+
<%= pb_rails("nav/item", props: { text: "City", link: "#" }) %>
|
|
5
|
+
<%= pb_rails("nav/item", props: { text: "People", link: "#" }) %>
|
|
6
|
+
<%= pb_rails("nav/item", props: { text: "Business", link: "#" }) %>
|
|
7
|
+
<% end %>
|
|
8
|
+
<% end %>
|
|
9
|
+
<%= pb_rails("nav/item", props: { text: "Albums", link: "#", active: true, collapsible: true, icon_left: "theater-masks" }) do %>
|
|
10
|
+
<%= pb_rails("nav", props: { variant: "bold" }) do %>
|
|
11
|
+
<%= pb_rails("nav/item", props: { text: "Entertainment", link: "#" }) %>
|
|
12
|
+
<%= pb_rails("nav/item", props: { text: "Food", link: "#" }) %>
|
|
13
|
+
<%= pb_rails("nav/item", props: { text: "Style", link: "#" }) %>
|
|
14
|
+
<% end %>
|
|
15
|
+
<% end %>
|
|
16
|
+
<%= pb_rails("nav/item", props: { text: "Similar Artists", link: "#", collapsible: true, icon_left: "city" }) do %>
|
|
17
|
+
<%= pb_rails("nav", props: { variant: "bold" }) do %>
|
|
18
|
+
<%= pb_rails("nav/item", props: { text: "City", link: "#", disabled: true }) %>
|
|
19
|
+
<%= pb_rails("nav/item", props: { text: "People", link: "#" }) %>
|
|
20
|
+
<%= pb_rails("nav/item", props: { text: "Business", link: "#" }) %>
|
|
21
|
+
<% end %>
|
|
22
|
+
<% end %>
|
|
23
|
+
<% end %>
|
|
24
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Nav from '../../pb_nav/_nav'
|
|
3
|
+
import NavItem from '../../pb_nav/_item'
|
|
4
|
+
|
|
5
|
+
const CollapsibleNavDisabledItem = (props) => {
|
|
6
|
+
return (
|
|
7
|
+
<Nav
|
|
8
|
+
variant="bold"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<NavItem
|
|
12
|
+
collapsed={false}
|
|
13
|
+
collapsible
|
|
14
|
+
disabled
|
|
15
|
+
iconLeft="city"
|
|
16
|
+
link="#"
|
|
17
|
+
text="Overview"
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
20
|
+
<NavItem
|
|
21
|
+
link="#"
|
|
22
|
+
text="City"
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
<NavItem
|
|
26
|
+
link="#"
|
|
27
|
+
text="People"
|
|
28
|
+
{...props}
|
|
29
|
+
/>
|
|
30
|
+
<NavItem
|
|
31
|
+
link="#"
|
|
32
|
+
text="Business"
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
</NavItem>
|
|
36
|
+
<NavItem
|
|
37
|
+
collapsible
|
|
38
|
+
iconLeft="theater-masks"
|
|
39
|
+
link="#"
|
|
40
|
+
text="Albums"
|
|
41
|
+
{...props}
|
|
42
|
+
>
|
|
43
|
+
<NavItem
|
|
44
|
+
disabled
|
|
45
|
+
link="#"
|
|
46
|
+
text="Entertainment"
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
<NavItem
|
|
50
|
+
link="#"
|
|
51
|
+
text="Food"
|
|
52
|
+
{...props}
|
|
53
|
+
/>
|
|
54
|
+
<NavItem
|
|
55
|
+
link="#"
|
|
56
|
+
text="Style"
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
</NavItem>
|
|
60
|
+
<NavItem
|
|
61
|
+
collapsible
|
|
62
|
+
iconLeft="city"
|
|
63
|
+
link="#"
|
|
64
|
+
text="Similar Artists"
|
|
65
|
+
{...props}
|
|
66
|
+
>
|
|
67
|
+
<NavItem
|
|
68
|
+
link="#"
|
|
69
|
+
text="City"
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
<NavItem
|
|
73
|
+
link="#"
|
|
74
|
+
text="People"
|
|
75
|
+
{...props}
|
|
76
|
+
/>
|
|
77
|
+
<NavItem
|
|
78
|
+
link="#"
|
|
79
|
+
text="Business"
|
|
80
|
+
{...props}
|
|
81
|
+
/>
|
|
82
|
+
</NavItem>
|
|
83
|
+
</Nav>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export default CollapsibleNavDisabledItem
|
|
@@ -14,6 +14,7 @@ examples:
|
|
|
14
14
|
- collapsible_nav: Collapsible Nav
|
|
15
15
|
- collapsible_nav_with_all_options: Collapsible Nav With Options
|
|
16
16
|
- collapsible_nav_no_icon: Collapsible Nav No Icon
|
|
17
|
+
- collapsible_nav_disabled_item: Collapsible Nav With Disabled Item
|
|
17
18
|
- horizontal_nav: Horizontal Nav
|
|
18
19
|
- subtle_horizontal_nav: Subtle Horizontal Nav
|
|
19
20
|
- bold_horizontal_nav: Bold Horizontal Nav
|
|
@@ -42,6 +43,7 @@ examples:
|
|
|
42
43
|
- collapsible_nav_item_spacing: Collapsible Nav With ItemSpacing
|
|
43
44
|
- collapsible_nav_custom: Collapsible Nav With Custom Toggling
|
|
44
45
|
- collapsible_nav_no_icon: Collapsible Nav No Icon
|
|
46
|
+
- collapsible_nav_disabled_item: Collapsible Nav With Disabled Item
|
|
45
47
|
- horizontal_nav: Horizontal Nav
|
|
46
48
|
- subtle_horizontal_nav: Subtle Horizontal Nav
|
|
47
49
|
- bold_horizontal_nav: Bold Horizontal Nav
|
|
@@ -62,9 +64,3 @@ examples:
|
|
|
62
64
|
- nav_horizontal_subtle_no_highlight_swift: Horizontal Subtle No Highlight
|
|
63
65
|
- nav_horizontal_bold_swift: Horizontal Bold
|
|
64
66
|
- nav_props_swift: ""
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
@@ -22,4 +22,5 @@ export { default as CollapsibleNavItemSpacing } from "./_collapsible_nav_item_sp
|
|
|
22
22
|
export { default as CollapsibleNavNoIcon } from "./_collapsible_nav_no_icon.jsx"
|
|
23
23
|
export { default as HorizontalNavExtendedunderline } from './_horizontal_nav_extendedunderline.jsx'
|
|
24
24
|
export { default as HorizontalNavDisabled } from './_horizontal_nav_disabled.jsx'
|
|
25
|
-
export { default as VerticalNavDisabled } from './_vertical_nav_disabled.jsx'
|
|
25
|
+
export { default as VerticalNavDisabled } from './_vertical_nav_disabled.jsx'
|
|
26
|
+
export { default as CollapsibleNavDisabledItem } from './_collapsible_nav_disabled_item.jsx'
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import RichTextEditor from '../../pb_rich_text_editor/_rich_text_editor'
|
|
3
|
+
import { useEditor, EditorContent } from "@tiptap/react"
|
|
4
|
+
import StarterKit from "@tiptap/starter-kit"
|
|
5
|
+
import Link from '@tiptap/extension-link'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
const RichTextEditorAdvancedLabel = (props) => {
|
|
9
|
+
|
|
10
|
+
const editor = useEditor({
|
|
11
|
+
extensions: [StarterKit, Link],
|
|
12
|
+
content: "Add your text here. You can format your text, add links, quotes, and bullets.",
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const editorNoLabel = useEditor({
|
|
16
|
+
extensions: [StarterKit, Link],
|
|
17
|
+
content: "Add your text here. You can format your text, add links, quotes, and bullets.",
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
if (!editor || !editorNoLabel) return null
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div>
|
|
24
|
+
<RichTextEditor
|
|
25
|
+
advancedEditor={editor}
|
|
26
|
+
id={"advanced-example"}
|
|
27
|
+
label="Advanced Example Label"
|
|
28
|
+
{...props}
|
|
29
|
+
>
|
|
30
|
+
<EditorContent editor={editor}/>
|
|
31
|
+
</RichTextEditor>
|
|
32
|
+
<br/>
|
|
33
|
+
<RichTextEditor
|
|
34
|
+
advancedEditor={editorNoLabel}
|
|
35
|
+
label="Advanced Example Label No ID"
|
|
36
|
+
{...props}
|
|
37
|
+
>
|
|
38
|
+
<EditorContent editor={editorNoLabel}/>
|
|
39
|
+
</RichTextEditor>
|
|
40
|
+
</div>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default RichTextEditorAdvancedLabel
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The optional `label` prop adds a visible label to the advanced editor. Passing in the `id` prop associates the `label` with the editor for accessibility, enabling screen reader support and label-based focus behavior.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import RichTextEditor from '../../pb_rich_text_editor/_rich_text_editor'
|
|
3
|
+
|
|
4
|
+
const RichTextEditorLabel = (props) => {
|
|
5
|
+
const [value, setValue] = useState(''),
|
|
6
|
+
handleOnChange = (html) => setValue(html)
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<div>
|
|
10
|
+
<RichTextEditor
|
|
11
|
+
id="example"
|
|
12
|
+
label="Example Label"
|
|
13
|
+
onChange={handleOnChange}
|
|
14
|
+
value={value}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
<br/>
|
|
18
|
+
<RichTextEditor
|
|
19
|
+
label="Example Label No ID"
|
|
20
|
+
onChange={handleOnChange}
|
|
21
|
+
value={value}
|
|
22
|
+
{...props}
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default RichTextEditorLabel
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The optional `label` prop adds a visible label to the editor. Passing in the `id` prop associates the `label` with the editor for accessibility, enabling screen reader support and label-based focus behavior.
|
|
@@ -32,6 +32,8 @@ examples:
|
|
|
32
32
|
- rich_text_editor_advanced_inline: Advanced (Inline)
|
|
33
33
|
- rich_text_editor_advanced_height: Advanced Height
|
|
34
34
|
- rich_text_editor_advanced_min_height: Advanced Min Height
|
|
35
|
+
- rich_text_editor_label: Label
|
|
36
|
+
- rich_text_editor_advanced_label: Advanced (Label)
|
|
35
37
|
- rich_text_editor_required_indicator: Required Indicator
|
|
36
38
|
- rich_text_editor_advanced_required_indicator: Advanced Required Indicator
|
|
37
39
|
- rich_text_editor_preview: Preview
|
|
@@ -21,3 +21,5 @@ export { default as RichTextEditorAdvancedHeight } from './_rich_text_editor_adv
|
|
|
21
21
|
export { default as RichTextEditorAdvancedMinHeight } from './_rich_text_editor_advanced_min_height.jsx'
|
|
22
22
|
export { default as RichTextEditorRequiredIndicator } from './_rich_text_editor_required_indicator.jsx'
|
|
23
23
|
export { default as RichTextEditorAdvancedRequiredIndicator } from './_rich_text_editor_advanced_required_indicator.jsx'
|
|
24
|
+
export { default as RichTextEditorLabel } from './_rich_text_editor_label.jsx'
|
|
25
|
+
export { default as RichTextEditorAdvancedLabel } from './_rich_text_editor_advanced_label.jsx'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<%
|
|
2
|
+
options = [
|
|
3
|
+
{ label: 'Orange', value: '#FFA500' },
|
|
4
|
+
{ label: 'Red', value: '#FF0000' },
|
|
5
|
+
{ label: 'Green', value: '#00FF00' },
|
|
6
|
+
{ label: 'Blue', value: '#0000FF' },
|
|
7
|
+
]
|
|
8
|
+
%>
|
|
9
|
+
|
|
10
|
+
<%= pb_rails("typeahead", props: {
|
|
11
|
+
id: "typeahead-required-indicator",
|
|
12
|
+
is_multi: false,
|
|
13
|
+
label: "Colors",
|
|
14
|
+
options: options,
|
|
15
|
+
required_indicator: true,
|
|
16
|
+
}) %>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import Typeahead from "../../pb_typeahead/_typeahead"
|
|
3
|
+
|
|
4
|
+
const options = [
|
|
5
|
+
{label: "Orange", value: "#FFA500"},
|
|
6
|
+
{label: "Red", value: "#FF0000"},
|
|
7
|
+
{label: "Green", value: "#00FF00"},
|
|
8
|
+
{label: "Blue", value: "#0000FF"},
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
const TypeaheadRequiredIndicator = (props) => {
|
|
12
|
+
return (
|
|
13
|
+
<Typeahead
|
|
14
|
+
id="typeahead_required_indicator"
|
|
15
|
+
label="Colors"
|
|
16
|
+
options={options}
|
|
17
|
+
requiredIndicator
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default TypeaheadRequiredIndicator
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
The `requiredIndicator`/`required_indicator` prop displays a red asterisk (*) next to the label, visually indicating that the field is required. This is purely visual and does not enforce validation.
|
|
2
|
+
|
|
3
|
+
You can use `requiredIndicator`/`required_indicator` with any validation approach: HTML5 validation via the `required` prop, client-side validation, or backend validation. For this reason, it works independently and doesn't need to be paired with the `required` prop.
|
|
@@ -19,6 +19,7 @@ examples:
|
|
|
19
19
|
- typeahead_dynamic_options_pure_rails: Dynamic Options (Pure Rails)
|
|
20
20
|
- typeahead_disabled: Disabled
|
|
21
21
|
- typeahead_preserve_input: Preserve Search Input
|
|
22
|
+
- typeahead_required_indicator: Required Indicator
|
|
22
23
|
|
|
23
24
|
react:
|
|
24
25
|
- typeahead_default: Default
|
|
@@ -42,3 +43,4 @@ examples:
|
|
|
42
43
|
- typeahead_truncated_text: Truncated Text
|
|
43
44
|
- typeahead_disabled: Disabled
|
|
44
45
|
- typeahead_preserve_input: Preserve Search Input
|
|
46
|
+
- typeahead_required_indicator: Required Indicator
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
1
|
+
export {default as TypeaheadDefault} from "./_typeahead_default.jsx"
|
|
2
|
+
export {default as TypeaheadWithHighlight} from "./_typeahead_with_highlight.jsx"
|
|
3
|
+
export {default as TypeaheadWithPills} from "./_typeahead_with_pills.jsx"
|
|
4
|
+
export {default as TypeaheadWithPillsAsync} from "./_typeahead_with_pills_async.jsx"
|
|
5
|
+
export {default as TypeaheadWithPillsAsyncUsers} from "./_typeahead_with_pills_async_users.jsx"
|
|
6
|
+
export {default as TypeaheadWithPillsAsyncCustomOptions} from "./_typeahead_with_pills_async_custom_options.jsx"
|
|
7
|
+
export {default as TypeaheadInline} from "./_typeahead_inline.jsx"
|
|
8
|
+
export {default as TypeaheadMultiKit} from "./_typeahead_multi_kit.jsx"
|
|
9
|
+
export {default as TypeaheadCreateable} from "./_typeahead_createable.jsx"
|
|
10
|
+
export {default as TypeaheadAsyncCreateable} from "./_typeahead_async_createable.jsx"
|
|
11
|
+
export {default as TypeaheadErrorState} from "./_typeahead_error_state.jsx"
|
|
12
|
+
export {default as TypeaheadCustomMenuList} from "./_typeahead_custom_menu_list.jsx"
|
|
13
|
+
export {default as TypeaheadMarginBottom} from "./_typeahead_margin_bottom.jsx"
|
|
14
|
+
export {default as TypeaheadWithPillsColor} from "./_typeahead_with_pills_color.jsx"
|
|
15
|
+
export {default as TypeaheadTruncatedText} from "./_typeahead_truncated_text.jsx"
|
|
16
|
+
export {default as TypeaheadReactHook} from "./_typeahead_react_hook.jsx"
|
|
17
|
+
export {default as TypeaheadDisabled} from "./_typeahead_disabled.jsx"
|
|
18
|
+
export {default as TypeaheadPreserveInput} from "./_typeahead_preserve_input.jsx"
|
|
19
|
+
export {default as TypeaheadDefaultValue} from "./_typeahead_default_value.jsx"
|
|
20
|
+
export {default as TypeaheadCustomOptions} from "./_typeahead_custom_options.jsx"
|
|
21
|
+
export {default as TypeaheadInputDisplay} from "./_typeahead_input_display.jsx"
|
|
22
|
+
export {default as TypeaheadRequiredIndicator} from "./_typeahead_required_indicator.jsx"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: playbook_ui_docs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 16.1.0.pre.alpha.
|
|
4
|
+
version: 16.1.0.pre.alpha.play279914268
|
|
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: 2026-
|
|
12
|
+
date: 2026-02-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: playbook_ui
|
|
@@ -421,6 +421,9 @@ files:
|
|
|
421
421
|
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_props_swift.md
|
|
422
422
|
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.jsx
|
|
423
423
|
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.md
|
|
424
|
+
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_required_indicator.html.erb
|
|
425
|
+
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_required_indicator.jsx
|
|
426
|
+
- app/pb_kits/playbook/pb_checkbox/docs/_checkbox_required_indicator.md
|
|
424
427
|
- app/pb_kits/playbook/pb_checkbox/docs/_description.md
|
|
425
428
|
- app/pb_kits/playbook/pb_checkbox/docs/example.yml
|
|
426
429
|
- app/pb_kits/playbook/pb_checkbox/docs/index.js
|
|
@@ -1431,6 +1434,7 @@ files:
|
|
|
1431
1434
|
- app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_input_display.md
|
|
1432
1435
|
- app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb
|
|
1433
1436
|
- app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx
|
|
1437
|
+
- app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.md
|
|
1434
1438
|
- app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_react_hook.jsx
|
|
1435
1439
|
- app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_react_hook.md
|
|
1436
1440
|
- app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.html.erb
|
|
@@ -1506,6 +1510,8 @@ files:
|
|
|
1506
1510
|
- app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.md
|
|
1507
1511
|
- app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_custom.jsx
|
|
1508
1512
|
- app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_custom.md
|
|
1513
|
+
- app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_disabled_item.html.erb
|
|
1514
|
+
- app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_disabled_item.jsx
|
|
1509
1515
|
- app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_item_spacing.jsx
|
|
1510
1516
|
- app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_item_spacing.md
|
|
1511
1517
|
- app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_no_icon.html.erb
|
|
@@ -1932,6 +1938,8 @@ files:
|
|
|
1932
1938
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_height.md
|
|
1933
1939
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.jsx
|
|
1934
1940
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.md
|
|
1941
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_label.jsx
|
|
1942
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_label.md
|
|
1935
1943
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_min_height.jsx
|
|
1936
1944
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_min_height.md
|
|
1937
1945
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_preview.jsx
|
|
@@ -1950,6 +1958,8 @@ files:
|
|
|
1950
1958
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_focus.jsx
|
|
1951
1959
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.html.erb
|
|
1952
1960
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.jsx
|
|
1961
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_label.jsx
|
|
1962
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_label.md
|
|
1953
1963
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_more_extensions.jsx
|
|
1954
1964
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_more_extensions.md
|
|
1955
1965
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
|
|
@@ -2613,6 +2623,9 @@ files:
|
|
|
2613
2623
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input_react.md
|
|
2614
2624
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx
|
|
2615
2625
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.md
|
|
2626
|
+
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_required_indicator.html.erb
|
|
2627
|
+
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_required_indicator.jsx
|
|
2628
|
+
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_required_indicator.md
|
|
2616
2629
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb
|
|
2617
2630
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.jsx
|
|
2618
2631
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md
|