playbook_ui_docs 13.30.0.pre.alpha.20240515remotebuildkitconversion3150 → 13.31.0.pre.alpha.PBNTR342navtabbing3230
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_date_year_stacked/docs/_date_year_stacked_default.jsx +4 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +14 -19
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md +5 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md +7 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md +3 -5
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md +3 -5
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +9 -0
- data/app/pb_kits/playbook/pb_icon/docs/_icon_default.html.erb +1 -6
- data/app/pb_kits/playbook/pb_icon/docs/_icon_default.jsx +3 -20
- data/app/pb_kits/playbook/pb_nav/docs/_tab_nav.html.erb +12 -0
- data/app/pb_kits/playbook/pb_nav/docs/_tab_nav.html.md +0 -0
- data/app/pb_kits/playbook/pb_nav/docs/example.yml +1 -0
- data/dist/menu.yml +566 -472
- data/dist/playbook-doc.js +5 -5
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d408e0949eb6bb1ea22c13557263595272d0f6883b2f9675de55c988399eb0b3
|
4
|
+
data.tar.gz: dfeadb8a4e5c4d914697d6c7f93a451ac5d69c09246c1ff89606c2188ed3ea4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f072b4577c6aa8a6b929e90106e28c22df57add8eb70cce74747b8bcc852d1c0da8d0c820badce16ec82a54cd8cb0374039a675891b29843f426f1b662d5b97
|
7
|
+
data.tar.gz: d208444eede6743050ebb4c0e0f38dfbcf93b866c63ce38c832f7a71f6751a5cb3fd90ef10c25a2ea4f8156ad7e7e001f1ad7d1d6eb2499c52bcc28ee4380663
|
@@ -4,7 +4,10 @@ import { DateYearStacked } from '../../'
|
|
4
4
|
const DateYearStackedDefault = (props) => {
|
5
5
|
return (
|
6
6
|
<div>
|
7
|
-
<DateYearStacked
|
7
|
+
<DateYearStacked
|
8
|
+
date={new Date()}
|
9
|
+
{...props}
|
10
|
+
/>
|
8
11
|
<DateYearStacked
|
9
12
|
align="center"
|
10
13
|
date={new Date()}
|
@@ -1,23 +1,19 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
|
-
import {
|
2
|
+
import { Flex, Image, Draggable, DraggableProvider } from "../../";
|
3
3
|
|
4
4
|
// Initial items to be dragged
|
5
5
|
const data = [
|
6
6
|
{
|
7
|
-
id: "
|
8
|
-
|
7
|
+
id: "21",
|
8
|
+
url: "https://unsplash.it/500/400/?image=633",
|
9
9
|
},
|
10
10
|
{
|
11
|
-
id: "
|
12
|
-
|
11
|
+
id: "22",
|
12
|
+
url: "https://unsplash.it/500/400/?image=634",
|
13
13
|
},
|
14
14
|
{
|
15
|
-
id: "
|
16
|
-
|
17
|
-
},
|
18
|
-
{
|
19
|
-
id: "4",
|
20
|
-
text: "Task 4",
|
15
|
+
id: "23",
|
16
|
+
url: "https://unsplash.it/500/400/?image=637",
|
21
17
|
},
|
22
18
|
];
|
23
19
|
|
@@ -30,20 +26,19 @@ const DraggableDefault = (props) => {
|
|
30
26
|
onReorder={(items) => setInitialState(items)}
|
31
27
|
>
|
32
28
|
<Draggable.Container {...props}>
|
33
|
-
|
34
|
-
{initialState.map(({ id,
|
29
|
+
<Flex>
|
30
|
+
{initialState.map(({ id, url }) => (
|
35
31
|
<Draggable.Item dragId={id}
|
36
32
|
key={id}
|
37
33
|
>
|
38
|
-
<
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
{...props}
|
34
|
+
<Image alt={id}
|
35
|
+
margin="xs"
|
36
|
+
size="md"
|
37
|
+
url={url}
|
43
38
|
/>
|
44
39
|
</Draggable.Item>
|
45
40
|
))}
|
46
|
-
|
41
|
+
</Flex>
|
47
42
|
</Draggable.Container>
|
48
43
|
</DraggableProvider>
|
49
44
|
</>
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
The Draggable kit gives you a full subcomponent structure that allows it to be used with almost any kits.
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
`DraggableProvider` = This provider manages all settings that allows drag and drop to function and must be used as the outermost wrapper. It has 2 REQUIRED props: `initialItems` (initial data) and `onReorder` (function that returns mutated data as items are reordered via drag and drop). Devs must manage state as shown.
|
4
|
+
|
5
|
+
`Draggable.Container` = This specifies the container within which items can be dropped.
|
6
|
+
`Draggable.Item` = This specifies the items that can be dragged and dropped. `dragId` is a REQUIRED prop for Draggable.Item.
|
@@ -1,5 +1,9 @@
|
|
1
|
-
For a simplified version of the Draggable API for the Card kit,
|
1
|
+
For a simplified version of the Draggable API for the Card kit, you can do the following:
|
2
|
+
|
3
|
+
Use `DraggableProvider` and manage state as shown.
|
4
|
+
|
5
|
+
`Draggable.Container` creates the container within which the cards can be dragged and dropped.
|
6
|
+
|
7
|
+
The Card kit is optimized to work with the draggable kit. To enable drag, use the `draggableItem` and `dragId` props on the Card kit as shown. An additional optional boolean prop (set to true by default) of `dragHandle` is also available to show the drag handle icon.
|
2
8
|
|
3
|
-
In addition to the above `dragId` is a REQUIRED prop to be passedd to the Card kit when implementing dragging.
|
4
9
|
|
5
|
-
The dev must manage state as shown.
|
@@ -1,7 +1,5 @@
|
|
1
|
-
For a simplified version of the Draggable API for the List kit,
|
1
|
+
For a simplified version of the Draggable API for the List kit, you can do the following:
|
2
2
|
|
3
|
-
|
3
|
+
Use `DraggableProvider` and manage state as shown.
|
4
4
|
|
5
|
-
The
|
6
|
-
|
7
|
-
The dragHandle is added by default but this can be opted out of by setting `dragHandle` to false on the List kit.
|
5
|
+
The List kit is optimized to work with the draggable kit. To enable drag, use the `enableDrag` prop on List kit AND `dragId` prop on ListItem. An additional optional boolean prop (set to true by default) of `dragHandle` is also available on List kit to show the drag handle icon.
|
@@ -1,7 +1,5 @@
|
|
1
|
-
For a simplified version of the Draggable API for the SelectableList kit,
|
1
|
+
For a simplified version of the Draggable API for the SelectableList kit, you can do the following:
|
2
2
|
|
3
|
-
|
3
|
+
Use `DraggableProvider` and manage state as shown.
|
4
4
|
|
5
|
-
The
|
6
|
-
|
7
|
-
The dragHandle is added by default but this can be opted out of by setting `dragHandle` to false on the SelectableList kit.
|
5
|
+
The SelectableList kit is optimized to work with the draggable kit. To enable drag, use the `enableDrag` prop on SelectableList kit AND `dragId` prop on SelectableList.Item. An additional optional boolean prop (set to true by default) of `dragHandle` is also available on SelectableList kit to show the drag handle icon.
|
@@ -13,6 +13,14 @@
|
|
13
13
|
]
|
14
14
|
%>
|
15
15
|
|
16
|
+
<%
|
17
|
+
example_dropdown_options = [
|
18
|
+
{ label: 'United States', value: 'United States', id: 'us' },
|
19
|
+
{ label: 'Canada', value: 'Canada', id: 'ca' },
|
20
|
+
{ label: 'Pakistan', value: 'Pakistan', id: 'pk' },
|
21
|
+
]
|
22
|
+
%>
|
23
|
+
|
16
24
|
<%= pb_form_with(scope: :example, method: :get, url: "", validate: true) do |form| %>
|
17
25
|
<%= form.text_field :example_text_field, props: { label: true, required: true } %>
|
18
26
|
<%= form.phone_number_field :example_phone_number_field, props: { label: "Example phone field" } %>
|
@@ -22,6 +30,7 @@
|
|
22
30
|
<%= form.password_field :example_password_field, props: { label: true, required: true } %>
|
23
31
|
<%= form.url_field :example_url_field, props: { label: true, required: true } %>
|
24
32
|
<%= form.text_area :example_text_area, props: { label: true, required: true } %>
|
33
|
+
<%= form.dropdown_field :example_dropdown, props: { label: true, options: example_dropdown_options, required: true } %>
|
25
34
|
<%= form.select :example_select, [ ["Yes", 1], ["No", 2] ], props: { label: true, blank_selection: "Select One...", required: true } %>
|
26
35
|
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true, blank_selection: "Select One...", required: true } %>
|
27
36
|
<%= form.check_box :example_checkbox, props: { text: "Example Checkbox", label: true, required: true } %>
|
@@ -1,6 +1 @@
|
|
1
|
-
<%= pb_rails("icon", props: { icon: "
|
2
|
-
<%= pb_rails("icon", props: { icon: "circle-arrow-right", fixed_width: true }) %>
|
3
|
-
<%= pb_rails("icon", props: { icon: "arrow-circle-right", fixed_width: true }) %>
|
4
|
-
|
5
|
-
<%= pb_rails("caption", props: { text: "Font Awesome (no alias & not in our Playbook-icons lib)", margin_y: "md" }) %>
|
6
|
-
<%= pb_rails("icon", props: { icon: "elephant", fixed_width: true }) %>
|
1
|
+
<%= pb_rails("icon", props: { icon: "user", fixed_width: true }) %>
|
@@ -1,29 +1,12 @@
|
|
1
1
|
import React from "react"
|
2
|
-
|
3
2
|
import Icon from "../_icon"
|
4
|
-
import {Caption} from "../.."
|
5
3
|
|
6
4
|
const IconDefault = (props) => {
|
7
5
|
return (
|
8
6
|
<div>
|
9
|
-
<Icon
|
10
|
-
|
11
|
-
|
12
|
-
/>
|
13
|
-
<Icon fixedWidth
|
14
|
-
icon='circle-arrow-right'
|
15
|
-
{...props}
|
16
|
-
/>
|
17
|
-
<Icon fixedWidth
|
18
|
-
icon='arrow-circle-right'
|
19
|
-
{...props}
|
20
|
-
/>
|
21
|
-
<Caption
|
22
|
-
marginY='md'
|
23
|
-
text='Font Awesome (no alias & not in our Playbook-icons lib)'
|
24
|
-
/>
|
25
|
-
<Icon fixedWidth
|
26
|
-
icon='elephant'
|
7
|
+
<Icon
|
8
|
+
fixedWidth
|
9
|
+
icon="user"
|
27
10
|
{...props}
|
28
11
|
/>
|
29
12
|
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= pb_rails("nav", props: { orientation: "horizontal", variant: "subtle", tabbing: true }) do %>
|
2
|
+
<%= pb_rails("nav/item", props: { text: "About", active: true, data: { pb_nav_item_tab: "about" }, cursor: "pointer" }) %>
|
3
|
+
<%= pb_rails("nav/item", props: { text: "Case Studies", data: { pb_nav_item_tab: "case_studies" }, cursor: "pointer" }) %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<div id="about">
|
7
|
+
This is about!
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div id="case_studies">
|
11
|
+
This is case studies!
|
12
|
+
</div>
|
File without changes
|