playbook_ui_docs 14.2.1 → 14.3.0.pre.alpha.revert3654PBNTR479removeextraspacingfromradiochildren3734
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/pb_circle_icon_button/docs/_circle_icon_button_loading.html.erb +29 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_loading.jsx +43 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_no_icon.html.erb +10 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_no_icon.jsx +21 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.html.erb +13 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.md +3 -0
- data/app/pb_kits/playbook/pb_dialog/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.html.erb +1 -1
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.jsx +1 -1
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.md +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.html.erb +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.jsx +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.md +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_no_icon.html.erb +24 -0
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_no_icon.jsx +88 -0
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_no_icon_rails.md +1 -0
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_no_icon_react.md +1 -0
- data/app/pb_kits/playbook/pb_nav/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_nav/docs/index.js +4 -3
- data/app/pb_kits/playbook/pb_radio/docs/_radio_children.jsx +56 -0
- data/app/pb_kits/playbook/pb_radio/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_radio/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb +21 -11
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default_value.html.erb +1 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.html.erb +2 -2
- data/dist/playbook-doc.js +1 -1
- metadata +17 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab93c8dd0ab0a5618620fbb9e684eedf2b1f83e05007641cbcda0f7b7f23d4c3
|
4
|
+
data.tar.gz: 43cd4cc453785e1b63c18c6fc3d33130e8e3f8eefc98455732633b2e5c615727
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdcc82307a561dc425accb0eb8e2f6615aefabf256e3bf2cc8e5c29599e67e0240575f8dc789caa796a1f654a078bc4ea0e5349fa72ae64636baa6df3a342969
|
7
|
+
data.tar.gz: e885b778d86a923de98f8471f646c0d077677b38c4c86da6b5423e0efa2abfe0752ed3256fb164a6c4a69b7ac6977a1a24ccde19effee64d5e619062b070ea59
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<%= pb_rails("circle_icon_button", props: {
|
2
|
+
variant: "primary",
|
3
|
+
icon: "plus",
|
4
|
+
loading: true
|
5
|
+
}) %>
|
6
|
+
|
7
|
+
<br/>
|
8
|
+
|
9
|
+
<%= pb_rails("circle_icon_button", props: {
|
10
|
+
variant: "secondary",
|
11
|
+
icon: "pen",
|
12
|
+
loading: true
|
13
|
+
}) %>
|
14
|
+
|
15
|
+
<br/>
|
16
|
+
|
17
|
+
<%= pb_rails("circle_icon_button", props: {
|
18
|
+
disabled: true,
|
19
|
+
icon: "times",
|
20
|
+
loading: true
|
21
|
+
}) %>
|
22
|
+
|
23
|
+
<br/>
|
24
|
+
|
25
|
+
<%= pb_rails("circle_icon_button", props: {
|
26
|
+
variant: "link",
|
27
|
+
icon: "user",
|
28
|
+
loading: true
|
29
|
+
}) %>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import CircleIconButton from '../_circle_icon_button'
|
4
|
+
|
5
|
+
const CircleIconButtonLoading = (props) => (
|
6
|
+
<div>
|
7
|
+
<CircleIconButton
|
8
|
+
icon="plus"
|
9
|
+
loading
|
10
|
+
variant="primary"
|
11
|
+
{...props}
|
12
|
+
/>
|
13
|
+
|
14
|
+
<br />
|
15
|
+
|
16
|
+
<CircleIconButton
|
17
|
+
icon="pen"
|
18
|
+
loading
|
19
|
+
variant="secondary"
|
20
|
+
{...props}
|
21
|
+
/>
|
22
|
+
|
23
|
+
<br />
|
24
|
+
|
25
|
+
<CircleIconButton
|
26
|
+
disabled
|
27
|
+
icon="times"
|
28
|
+
loading
|
29
|
+
{...props}
|
30
|
+
/>
|
31
|
+
|
32
|
+
<br />
|
33
|
+
|
34
|
+
<CircleIconButton
|
35
|
+
icon="user"
|
36
|
+
loading
|
37
|
+
variant="link"
|
38
|
+
{...props}
|
39
|
+
/>
|
40
|
+
</div>
|
41
|
+
)
|
42
|
+
|
43
|
+
export default CircleIconButtonLoading
|
@@ -3,8 +3,10 @@ examples:
|
|
3
3
|
rails:
|
4
4
|
- circle_icon_button_default: Default
|
5
5
|
- circle_icon_button_link: Link
|
6
|
+
- circle_icon_button_loading: Loading
|
6
7
|
|
7
8
|
react:
|
8
9
|
- circle_icon_button_default: Default
|
9
10
|
- circle_icon_button_click: Click Handler
|
10
11
|
- circle_icon_button_link: Link
|
12
|
+
- circle_icon_button_loading: Loading
|
@@ -1,3 +1,4 @@
|
|
1
1
|
export { default as CircleIconButtonDefault } from './_circle_icon_button_default.jsx'
|
2
2
|
export { default as CircleIconButtonClick } from './_circle_icon_button_click.jsx'
|
3
3
|
export { default as CircleIconButtonLink } from './_circle_icon_button_link.jsx'
|
4
|
+
export { default as CircleIconButtonLoading } from './_circle_icon_button_loading.jsx'
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%= pb_rails("collapsible", props: { name: "no-icon-example" }) do %>
|
2
|
+
<%= pb_rails("collapsible/collapsible_main", props: { padding: "md", name: "no-icon-main", icon: "none" }) do %>
|
3
|
+
<%= pb_rails("body", props: { text: "Main Section"}) %>
|
4
|
+
<% end %>
|
5
|
+
<%= pb_rails("collapsible/collapsible_content", props: { padding: "md" }) do %>
|
6
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis, risus a fringilla luctus, sapien eros sodales ex, quis molestie est nulla non turpis. Vestibulum aliquet at ipsum eget posuere. Morbi sed laoreet erat. Sed commodo posuere lectus, at porta nulla ornare a. Suspendisse quam est, sollicitudin ut enim sit amet, commodo placerat enim. Donec laoreet metus ac mauris pellentesque mattis. Pellentesque luctus vel mauris non aliquam. Mauris hendrerit mattis porttitor. Curabitur vehicula justo non ex consectetur commodo. Quisque posuere aliquet quam. Maecenas malesuada magna mauris, ac tempor metus euismod at.
|
7
|
+
<br><br>
|
8
|
+
Cras ornare fermentum magna mollis efficitur. Sed vitae nulla vel purus ultrices mollis. Maecenas id nulla id libero faucibus feugiat quis sit amet turpis. In commodo pellentesque risus at fringilla. Integer non interdum leo, non commodo ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut mi augue, dignissim at orci vel, egestas aliquam mi. Proin finibus aliquet tempor. Integer cursus, ex quis gravida rhoncus, nisi elit viverra ipsum, non efficitur est ex ac tortor. Praesent vitae odio massa.
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Collapsible } from 'playbook-ui'
|
3
|
+
|
4
|
+
const CollapsibleNoIcon = (props) => (
|
5
|
+
<Collapsible
|
6
|
+
icon="none"
|
7
|
+
>
|
8
|
+
<Collapsible.Main {...props}>
|
9
|
+
<div>{'Main Section'}</div>
|
10
|
+
</Collapsible.Main>
|
11
|
+
<Collapsible.Content>
|
12
|
+
<div>
|
13
|
+
{
|
14
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In vel erat sed purus hendrerit viverra. Duis et vestibulum metus. Sed consequat ut ante non vehicula. Etiam nunc massa, pharetra vel quam id, posuere rhoncus quam. Quisque imperdiet arcu enim, nec aliquet justo auctor eget. Curabitur in metus nec nunc rhoncus faucibus vitae ac elit. Nulla facilisi. Vestibulum quis pretium nulla. Nulla ut accumsan velit. Duis varius urna sed sem tempor, sit amet fermentum nibh auctor. Praesent lorem arcu, egestas non ante quis, placerat pellentesque lectus.Vestibulum lacinia ipsum quis venenatis tristique. Vivamus suscipit, libero eu fringilla egestas, orci urna commodo arcu, vel gravida turpis ipsum molestie nibh. Donec cursus eu ante sagittis ultrices. Phasellus id sagittis risus. Mauris dapibus neque faucibus, tempor ligula vel, cursus ante. Donec faucibus gravida porta. Nullam egestas est quis aliquam feugiat. Sed eget metus diam. Cras eget placerat libero.'
|
15
|
+
}
|
16
|
+
</div>
|
17
|
+
</Collapsible.Content>
|
18
|
+
</Collapsible>
|
19
|
+
)
|
20
|
+
|
21
|
+
export default CollapsibleNoIcon
|
@@ -9,6 +9,7 @@ examples:
|
|
9
9
|
- collapsible_external_controls_multiple: Toggle All Collapsibles With One Control
|
10
10
|
- collapsible_custom_main_rails: Custom Main Section
|
11
11
|
- collapsible_custom_main_with_icon_rails: Custom Main Section With Icon
|
12
|
+
- collapsible_no_icon: No Icon
|
12
13
|
|
13
14
|
|
14
15
|
react:
|
@@ -19,6 +20,7 @@ examples:
|
|
19
20
|
- collapsible_state: useCollapsible Hook
|
20
21
|
- collapsible_custom_main: Custom Main Section
|
21
22
|
- collapsible_custom_main_with_icon: Custom Main Section With Icon
|
23
|
+
- collapsible_no_icon: No Icon
|
22
24
|
|
23
25
|
|
24
26
|
|
@@ -4,4 +4,5 @@ export { default as CollapsibleColor } from './_collapsible_color.jsx'
|
|
4
4
|
export { default as CollapsibleIcons } from './_collapsible_icons.jsx'
|
5
5
|
export { default as CollapsibleState } from './_collapsible_state.jsx'
|
6
6
|
export { default as CollapsibleCustomMain } from './_collapsible_custom_main.jsx'
|
7
|
-
export { default as CollapsibleCustomMainWithIcon } from './_collapsible_custom_main_with_icon.jsx'
|
7
|
+
export { default as CollapsibleCustomMainWithIcon } from './_collapsible_custom_main_with_icon.jsx'
|
8
|
+
export { default as CollapsibleNoIcon } from './_collapsible_no_icon.jsx'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= pb_rails("button", props: { text: "Open Dialog", data: {"open-dialog": "dialog-loading"} }) %>
|
2
|
+
|
3
|
+
<%= pb_rails("dialog", props: {
|
4
|
+
id:"dialog-loading",
|
5
|
+
size: "sm",
|
6
|
+
title: "Loading Exmaple",
|
7
|
+
text: "Make a loading request?",
|
8
|
+
cancel_button: "Cancel Button",
|
9
|
+
cancel_button_id: "cancel-button-loading",
|
10
|
+
confirm_button: "Okay",
|
11
|
+
confirm_button_id: "confirm-button-loading",
|
12
|
+
loading: true,
|
13
|
+
}) %>
|
@@ -2,4 +2,4 @@
|
|
2
2
|
|
3
3
|
<br/><br/>
|
4
4
|
|
5
|
-
<%= pb_rails("hashtag", props: {text: "Open in a new Window", url: "https://google.com", type: "project",
|
5
|
+
<%= pb_rails("hashtag", props: {text: "Open in a new Window", url: "https://google.com", type: "project", target: "_blank"}) %>
|
@@ -1 +1 @@
|
|
1
|
-
Use the
|
1
|
+
Use the `target` prop to control whether the link opens on the same or a new tab (same page is the default behavior). You can use any [web/standard](https://www.w3schools.com/tags/att_a_target.asp) values or a custom string to specify your link target.
|
@@ -1 +1 @@
|
|
1
|
-
Use the `
|
1
|
+
Use the `target` prop to control whether the link opens on the same or a new tab (same page is the default behavior). You can use any [web/standard](https://www.w3schools.com/tags/att_a_target.asp) values or a custom string to specify your link target.
|
@@ -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", collapsed: false, icon_right: "none" }) 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", icon_right: "none" }) 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", icon_right: "none" }) do %>
|
17
|
+
<%= pb_rails("nav", props: { variant: "bold" }) do %>
|
18
|
+
<%= pb_rails("nav/item", props: { text: "City", link: "#" }) %>
|
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,88 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { Nav, NavItem } from 'playbook-ui'
|
3
|
+
|
4
|
+
const CollapsibleNavNoIcon = (props) => {
|
5
|
+
return (
|
6
|
+
<Nav
|
7
|
+
variant="bold"
|
8
|
+
{...props}
|
9
|
+
>
|
10
|
+
<NavItem
|
11
|
+
active
|
12
|
+
collapsed={false}
|
13
|
+
collapsible
|
14
|
+
iconLeft="city"
|
15
|
+
iconRight="none"
|
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
|
+
iconRight="none"
|
40
|
+
link="#"
|
41
|
+
text="Albums"
|
42
|
+
{...props}
|
43
|
+
>
|
44
|
+
<NavItem
|
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
|
+
iconRight="none"
|
64
|
+
link="#"
|
65
|
+
text="Similar Artists"
|
66
|
+
{...props}
|
67
|
+
>
|
68
|
+
<NavItem
|
69
|
+
link="#"
|
70
|
+
text="City"
|
71
|
+
{...props}
|
72
|
+
/>
|
73
|
+
<NavItem
|
74
|
+
link="#"
|
75
|
+
text="People"
|
76
|
+
{...props}
|
77
|
+
/>
|
78
|
+
<NavItem
|
79
|
+
link="#"
|
80
|
+
text="Business"
|
81
|
+
{...props}
|
82
|
+
/>
|
83
|
+
</NavItem>
|
84
|
+
</Nav>
|
85
|
+
);
|
86
|
+
};
|
87
|
+
|
88
|
+
export default CollapsibleNavNoIcon
|
@@ -0,0 +1 @@
|
|
1
|
+
Optionally remove the expand/collapse icon(s) from any collapsible nav item by passing "none" to the `icon_right` prop on that nav item.
|
@@ -0,0 +1 @@
|
|
1
|
+
Optionally remove the expand/collapse icon(s) from any collapsible nav item by passing "none" to the `iconRight` prop on that nav item.
|
@@ -13,6 +13,7 @@ examples:
|
|
13
13
|
- nav_with_font_control: Nav With Font Control
|
14
14
|
- collapsible_nav: Collapsible Nav
|
15
15
|
- collapsible_nav_with_all_options: Collapsible Nav With Options
|
16
|
+
- collapsible_nav_no_icon: Collapsible Nav No Icon
|
16
17
|
- horizontal_nav: Horizontal Nav
|
17
18
|
- subtle_horizontal_nav: Subtle Horizontal Nav
|
18
19
|
- bold_horizontal_nav: Bold Horizontal Nav
|
@@ -37,6 +38,7 @@ examples:
|
|
37
38
|
- collapsible_nav_with_all_options: Collapsible Nav With Options
|
38
39
|
- collapsible_nav_item_spacing: Collapsible Nav With ItemSpacing
|
39
40
|
- collapsible_nav_custom: Collapsible Nav With Custom Toggling
|
41
|
+
- collapsible_nav_no_icon: Collapsible Nav No Icon
|
40
42
|
- horizontal_nav: Horizontal Nav
|
41
43
|
- subtle_horizontal_nav: Subtle Horizontal Nav
|
42
44
|
- bold_horizontal_nav: Bold Horizontal Nav
|
@@ -15,7 +15,8 @@ export { default as BoldHorizontalNav } from './_bold_horizontal_nav.jsx'
|
|
15
15
|
export { default as BoldVerticalNav } from './_bold_vertical_nav.jsx'
|
16
16
|
export { default as CollapsibleNav } from './_collapsible_nav.jsx'
|
17
17
|
export { default as CollapsibleNavCustom } from './_collapsible_nav_custom.jsx'
|
18
|
-
export {default as CollapsibleNavWithAllOptions} from "./_collapsible_nav_with_all_options.jsx"
|
18
|
+
export { default as CollapsibleNavWithAllOptions} from "./_collapsible_nav_with_all_options.jsx"
|
19
19
|
export { default as NavWithFontControl } from "./_nav_with_font_control.jsx"
|
20
|
-
export {default as NavWithSpacingControl } from "./_nav_with_spacing_control.jsx"
|
21
|
-
export {default as CollapsibleNavItemSpacing } from "./_collapsible_nav_item_spacing.jsx"
|
20
|
+
export { default as NavWithSpacingControl } from "./_nav_with_spacing_control.jsx"
|
21
|
+
export { default as CollapsibleNavItemSpacing } from "./_collapsible_nav_item_spacing.jsx"
|
22
|
+
export { default as CollapsibleNavNoIcon } from "./_collapsible_nav_no_icon.jsx"
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Radio from '../_radio'
|
3
|
+
import Select from '../../pb_select/_select'
|
4
|
+
import Typeahead from '../../pb_typeahead/_typeahead'
|
5
|
+
import Title from '../../pb_title/_title'
|
6
|
+
|
7
|
+
const RadioChildren = (props) => {
|
8
|
+
|
9
|
+
|
10
|
+
const options = [
|
11
|
+
{ label: 'Orange', value: 'Orange' },
|
12
|
+
{ label: 'Red', value: 'Red' },
|
13
|
+
{ label: 'Green', value: 'Green' },
|
14
|
+
{ label: 'Blue', value: 'Blue' },
|
15
|
+
]
|
16
|
+
|
17
|
+
return (
|
18
|
+
<div>
|
19
|
+
<Radio
|
20
|
+
label="Select"
|
21
|
+
name="Group1"
|
22
|
+
tabIndex={0}
|
23
|
+
value="Select"
|
24
|
+
{...props}
|
25
|
+
>
|
26
|
+
<Select
|
27
|
+
minWidth="xs"
|
28
|
+
options={options}
|
29
|
+
/>
|
30
|
+
</Radio>
|
31
|
+
<Radio
|
32
|
+
label="Typeahead"
|
33
|
+
name="Group1"
|
34
|
+
tabIndex={0}
|
35
|
+
value="Typeahead"
|
36
|
+
{...props}
|
37
|
+
>
|
38
|
+
<Typeahead
|
39
|
+
minWidth="xs"
|
40
|
+
options={options}
|
41
|
+
/>
|
42
|
+
</Radio>
|
43
|
+
<br />
|
44
|
+
<Radio
|
45
|
+
defaultChecked={false}
|
46
|
+
label="Typography"
|
47
|
+
name="Group1"
|
48
|
+
value="Typography"
|
49
|
+
{...props}
|
50
|
+
>
|
51
|
+
<Title text="Custom Typography" />
|
52
|
+
</Radio>
|
53
|
+
</div>
|
54
|
+
)
|
55
|
+
}
|
56
|
+
export default RadioChildren
|
@@ -3,3 +3,4 @@ export { default as RadioCustom } from './_radio_custom.jsx'
|
|
3
3
|
export { default as RadioError } from './_radio_error.jsx'
|
4
4
|
export { default as RadioAlignment } from './_radio_alignment.jsx'
|
5
5
|
export { default as RadioDisabled } from './_radio_disabled.jsx'
|
6
|
+
export { default as RadioChildren } from './_radio_children.jsx'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
<%= pb_rails("rich_text_editor", props: { id: "content-preview-editor" }) %>
|
3
3
|
<div id="card-obfuscation" style="display:none">
|
4
|
-
<%= pb_rails("card", props: { margin_top: "md" }) do %>
|
4
|
+
<%= pb_rails("card", props: { margin_top: "md", max_width: "md", padding: "sm" }) do %>
|
5
5
|
<div id="content-preview" class="trix-content">
|
6
6
|
</div>
|
7
7
|
<% end %>
|
@@ -11,15 +11,25 @@
|
|
11
11
|
<% end %>
|
12
12
|
|
13
13
|
<script>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
const previewArea = document.getElementById('content-preview');
|
19
|
-
const cardDiv = document.getElementById('card-obfuscation');
|
14
|
+
document.addEventListener('DOMContentLoaded', () => {
|
15
|
+
function handleButtonClick() {
|
16
|
+
const editorContainer = [...document.querySelectorAll('[data-react-props]')]
|
17
|
+
.find(element => element.getAttribute('data-react-props')?.includes('"id":"content-preview-editor"'))
|
20
18
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
const editorElement = editorContainer?.querySelector('trix-editor')
|
20
|
+
const inputId = editorElement?.getAttribute('input')
|
21
|
+
const inputElement = inputId && document.getElementById(inputId)
|
22
|
+
|
23
|
+
const editorContent = inputElement?.value || ''
|
24
|
+
const previewArea = document.getElementById('content-preview')
|
25
|
+
const cardDiv = document.getElementById('card-obfuscation')
|
26
|
+
|
27
|
+
if (previewArea && cardDiv) {
|
28
|
+
previewArea.innerHTML = editorContent
|
29
|
+
cardDiv.style.display = 'block'
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
document.getElementById('preview-button')?.addEventListener('click', handleButtonClick)
|
34
|
+
})
|
25
35
|
</script>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= pb_rails("star_rating", props: { default_value: "2", padding_bottom: "xs", variant: "interactive" }) %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<br>
|
9
9
|
|
10
10
|
<%= pb_rails("timestamp", props: {
|
11
|
-
timestamp: DateTime.now,
|
11
|
+
timestamp: DateTime.now - 3.months,
|
12
12
|
variant: "elapsed",
|
13
13
|
show_user: false
|
14
14
|
}) %>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<br>
|
17
17
|
|
18
18
|
<%= pb_rails("timestamp", props: {
|
19
|
-
timestamp: DateTime.now,
|
19
|
+
timestamp: DateTime.now - 320.days,
|
20
20
|
variant: "elapsed",
|
21
21
|
show_user: false,
|
22
22
|
hide_updated: true
|