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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_card/_card.tsx +3 -4
  3. data/app/pb_kits/playbook/pb_draggable/_draggable.scss +4 -2
  4. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +50 -70
  5. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +1 -2
  6. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md +1 -1
  7. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +1 -5
  8. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +4 -11
  9. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md +2 -4
  10. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx +2 -2
  11. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md +1 -7
  12. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx +4 -6
  13. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +15 -142
  14. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +5 -6
  15. data/app/pb_kits/playbook/pb_list/_list.tsx +4 -4
  16. data/app/pb_kits/playbook/pb_list/_list_item.tsx +3 -7
  17. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +4 -4
  18. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -4
  19. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +3 -7
  20. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +3 -3
  21. data/app/pb_kits/playbook/utilities/globalProps.ts +0 -1
  22. data/dist/menu.yml +2 -2
  23. data/dist/playbook-rails.js +2 -2
  24. data/lib/playbook/version.rb +1 -1
  25. metadata +2 -8
  26. data/app/pb_kits/playbook/pb_draggable/context/types.ts +0 -26
  27. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md +0 -7
  28. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.html.erb +0 -24
  29. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.html.erb +0 -11
  30. data/app/pb_kits/playbook/pb_overlay/overlay.html.erb +0 -27
  31. 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
- enableDrag,
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
- enableDrag ? (
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 optionally accept 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.
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 the `position` and `size` of the overlay as a key:value pair.
3
+ The optional `layout` prop accepts a `position` and a `size` as a key:value pair object.
4
4
 
5
- The `position` key accepts `bottom` (default), `top`, `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.
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 is `full` (100%) by default, but 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(s).
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,3 @@ examples:
2
2
  react:
3
3
  - overlay_default: Default
4
4
  - overlay_multi_directional: Multi-directional
5
-
6
- rails:
7
- - overlay_default: Default
8
- - overlay_multi_directional: Multi-directional
@@ -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, domSafeProps } from "../utilities/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
- dragId={dragId}
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
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
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
- enableDrag?: boolean,
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
- enableDrag = false,
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 enableDrag={enableDrag}
71
+ <List draggable={draggable}
72
72
  variant={props.variant}
73
73
  >
74
74
  {selectableListItems}
@@ -520,7 +520,6 @@ export const domSafeProps = (props: {[key: string]: string}): {[key: string]: st
520
520
  'paddingY',
521
521
  'padding',
522
522
  'dark',
523
- 'enableDrag',
524
523
  ]
525
524
  return omit(props, notSafeProps)
526
525
  }
data/dist/menu.yml CHANGED
@@ -353,8 +353,8 @@ kits:
353
353
  description:
354
354
  status: "stable"
355
355
  - name: "overlay"
356
- platforms: *web
357
- status: "stable"
356
+ platforms: *react_only
357
+ status: "beta"
358
358
  - name: "draggable"
359
359
  platforms: *react_only
360
360
  description: