playbook_ui 13.30.0.pre.alpha.PBNTR353draggablev53136 → 13.30.0.pre.alpha.PLAY1328fixtimelinekitglobalpropsreact3096
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_card/_card.tsx +3 -4
- data/app/pb_kits/playbook/pb_draggable/_draggable.scss +4 -2
- data/app/pb_kits/playbook/pb_draggable/context/index.tsx +50 -70
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +1 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +1 -5
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +4 -11
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md +2 -4
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx +2 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md +1 -7
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx +4 -6
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +15 -142
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +5 -6
- data/app/pb_kits/playbook/pb_list/_list.tsx +4 -4
- data/app/pb_kits/playbook/pb_list/_list_item.tsx +3 -7
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +4 -4
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +3 -7
- data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +3 -3
- data/app/pb_kits/playbook/utilities/globalProps.ts +0 -1
- data/dist/menu.yml +2 -2
- data/dist/playbook-rails.js +2 -2
- data/lib/playbook/version.rb +1 -1
- metadata +2 -8
- data/app/pb_kits/playbook/pb_draggable/context/types.ts +0 -26
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md +0 -7
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.html.erb +0 -24
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.html.erb +0 -11
- data/app/pb_kits/playbook/pb_overlay/overlay.html.erb +0 -27
- data/app/pb_kits/playbook/pb_overlay/overlay.rb +0 -110
@@ -11,7 +11,6 @@ type ListItemProps = {
|
|
11
11
|
children: React.ReactNode[] | React.ReactNode,
|
12
12
|
className?: string,
|
13
13
|
data?: Record<string, unknown>,
|
14
|
-
dragId?: string,
|
15
14
|
dragHandle?: boolean,
|
16
15
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
17
16
|
id?: string,
|
@@ -24,8 +23,7 @@ const ListItem = (props: ListItemProps) => {
|
|
24
23
|
children,
|
25
24
|
className,
|
26
25
|
data = {},
|
27
|
-
|
28
|
-
dragId,
|
26
|
+
draggable = false,
|
29
27
|
dragHandle = true,
|
30
28
|
htmlOptions = {},
|
31
29
|
id,
|
@@ -44,10 +42,8 @@ const ListItem = (props: ListItemProps) => {
|
|
44
42
|
return (
|
45
43
|
<>
|
46
44
|
{
|
47
|
-
|
48
|
-
<Draggable.Item
|
49
|
-
dragId={dragId}
|
50
|
-
>
|
45
|
+
draggable ? (
|
46
|
+
<Draggable.Item id={id}>
|
51
47
|
<li
|
52
48
|
{...ariaProps}
|
53
49
|
{...dataProps}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
Overlays
|
1
|
+
Overlays require a `color`, which sets the "start" (opaque) color of a gradient mask. Because this overlay is intended to reveal underlying content, the "end" color is fixed to transparent.
|
2
2
|
|
3
|
-
The optional `layout` prop accepts
|
3
|
+
The optional `layout` prop accepts a `position` and a `size` as a key:value pair object.
|
4
4
|
|
5
|
-
The `position` key accepts `
|
5
|
+
The `position` key accepts `top`, `bottom`, `y` (for both top and bottom) `right`, `left`, or `x` (for both left and right), which sets the side(s) where the `color` overlay starts. The direction of the overlay is always toward the opposite side of the position. For example, the default position of `bottom` starts the overlay on the bottom edge of your container and extends it toward the opposite side: the top.
|
6
6
|
|
7
|
-
The `size` value
|
7
|
+
The `size` value accepts our [spacing tokens](https://playbook.powerapp.cloud/visual_guidelines/spacing) or a percentage value as a string, and literally translates to how much of the container is covered by the overlay. By default, `size` is set to `full` (100%) so that your overlay covers the entire container with a smooth fade from `color` at its starting edge, fading to transparent and ending at the containers opposite edge.
|
@@ -2,7 +2,7 @@ import React, { useState } from "react";
|
|
2
2
|
import classnames from "classnames";
|
3
3
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
|
5
|
-
import { globalProps
|
5
|
+
import { globalProps } from "../utilities/globalProps";
|
6
6
|
|
7
7
|
import Checkbox from "../pb_checkbox/_checkbox";
|
8
8
|
import ListItem from "../pb_list/_list_item";
|
@@ -16,7 +16,6 @@ export type SelectableListItemProps = {
|
|
16
16
|
className?: string;
|
17
17
|
data?: GenericObject;
|
18
18
|
defaultChecked?: boolean;
|
19
|
-
dragId?: string;
|
20
19
|
dragHandle?: boolean;
|
21
20
|
htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
|
22
21
|
id?: string;
|
@@ -34,7 +33,6 @@ const SelectableListItem = ({
|
|
34
33
|
children,
|
35
34
|
className,
|
36
35
|
data = {},
|
37
|
-
dragId,
|
38
36
|
dragHandle = true,
|
39
37
|
defaultChecked,
|
40
38
|
htmlOptions = {},
|
@@ -69,7 +67,7 @@ const SelectableListItem = ({
|
|
69
67
|
{...props}
|
70
68
|
className={classnames(checkedState ? "checked_item" : "", className)}
|
71
69
|
dragHandle={dragHandle}
|
72
|
-
|
70
|
+
id={id}
|
73
71
|
>
|
74
72
|
<div
|
75
73
|
{...ariaProps}
|
@@ -108,9 +106,7 @@ const SelectableListItem = ({
|
|
108
106
|
text={label}
|
109
107
|
type="radio"
|
110
108
|
value={value}
|
111
|
-
|
112
|
-
//@ts-ignore
|
113
|
-
{...domSafeProps(props)}
|
109
|
+
{...props}
|
114
110
|
/>
|
115
111
|
{children}
|
116
112
|
</>
|
@@ -14,7 +14,7 @@ type SelectableListProps = {
|
|
14
14
|
children?: React.ReactElement[],
|
15
15
|
className?: string,
|
16
16
|
data?: GenericObject,
|
17
|
-
|
17
|
+
draggable?: boolean,
|
18
18
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
19
19
|
id?: string,
|
20
20
|
variant?: 'checkbox' | 'radio',
|
@@ -26,7 +26,7 @@ const SelectableList = (props: SelectableListProps) => {
|
|
26
26
|
children,
|
27
27
|
className,
|
28
28
|
data = {},
|
29
|
-
|
29
|
+
draggable = false,
|
30
30
|
htmlOptions = {},
|
31
31
|
id,
|
32
32
|
} = props
|
@@ -68,7 +68,7 @@ const SelectableList = (props: SelectableListProps) => {
|
|
68
68
|
className={classes}
|
69
69
|
id={id}
|
70
70
|
>
|
71
|
-
<List
|
71
|
+
<List draggable={draggable}
|
72
72
|
variant={props.variant}
|
73
73
|
>
|
74
74
|
{selectableListItems}
|