playbook_ui_docs 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f561299e831e96ce1418236e2bebc1a33e5655c53226bc50c877ab38d4a698d9
4
- data.tar.gz: 35ef55ef238504ef32ecb0ccd9d4108e3428272716437aecf1abcd081b059354
3
+ metadata.gz: '05813b97210befb8bf5db329609990ff637f48a7defa0b0cb9a8f61ceaf68cd5'
4
+ data.tar.gz: 25da023059632ffbb44140ba1e24799de56d0c3dc198513c3f25cdfa98e0fd1f
5
5
  SHA512:
6
- metadata.gz: d4a4e79a56df618ad59184c57aef9fd59bce593a98f06cffc3017d17c6d25e176bdfac1f63bdc373a0391f01e92aa3d71ea2ca3584761ed004f4486e6b0ac48a
7
- data.tar.gz: 6c3e50107b18352613cd01680687574fa752cd55320300a2106a4370117e42aa4447214b5f65739edc51359ea48b5f716bf473d13baaff4f3b8f5c2d910f011f
6
+ metadata.gz: 8517a60878e5668d21cae27692409fb51350aa132a02263d96e47f2a0c141463a4dfac9962c1dcaee88f4592ab23400dc8ec97aafde94bfc4a792debfd2d1b40
7
+ data.tar.gz: 2e9fec1a843f16c91034368c8c0f2cb3b242b32d10f27d7043cb476f5b11c869405cd19d7362b66cf5225ceb8458337b7be0f4bcd6368267944483edb062f6b5
@@ -32,14 +32,13 @@ const DraggableDefault = (props) => {
32
32
  <Draggable.Container {...props}>
33
33
  <SelectableList variant="checkbox">
34
34
  {initialState.map(({ id, text }) => (
35
- <Draggable.Item dragId={id}
35
+ <Draggable.Item id={id}
36
36
  key={id}
37
37
  >
38
38
  <SelectableList.Item
39
39
  label={text}
40
40
  name={id}
41
41
  value={id}
42
- {...props}
43
42
  />
44
43
  </Draggable.Item>
45
44
  ))}
@@ -1,4 +1,4 @@
1
1
  To use the Draggable kit, you must use the DraggableProvider and pass in `initialItems`. The `onReorder` is a function that returns the data as it changes as items are reordered. Use this to manage state as shown.
2
2
 
3
3
  The `Draggable.Container` specifies the container within which items can be dropped.
4
- The `Draggable.Item` specifies the items that can be dragged and dropped. `dragId` is a REQUIRED prop for Draggable.Item.
4
+ The `Draggable.Item` specifies the items that can be dragged and dropped. `Draggable.Item` requires `id` to be passed in as shown.
@@ -113,13 +113,12 @@ const DraggableMultipleContainer = (props) => {
113
113
  }) => (
114
114
  <Draggable.Item
115
115
  container={container}
116
- dragId={id}
116
+ id={id}
117
117
  key={id}
118
118
  >
119
119
  <Card
120
120
  marginBottom="sm"
121
121
  padding="sm"
122
- {...props}
123
122
  >
124
123
  <Flex justify="between">
125
124
  <FlexItem>
@@ -132,7 +131,6 @@ const DraggableMultipleContainer = (props) => {
132
131
  <Title paddingLeft="xs"
133
132
  size={4}
134
133
  text={title}
135
- {...props}
136
134
  />
137
135
  </Flex>
138
136
  </FlexItem>
@@ -141,12 +139,10 @@ const DraggableMultipleContainer = (props) => {
141
139
  rounded
142
140
  text={badgeProperties(container).text}
143
141
  variant={badgeProperties(container).color}
144
- {...props}
145
142
  />
146
143
  </Flex>
147
144
  <Body paddingTop="xs"
148
145
  text={description}
149
- {...props}
150
146
  />
151
147
  </Card>
152
148
  </Draggable.Item>
@@ -36,32 +36,29 @@ const DraggableWithCards = (props) => {
36
36
  >
37
37
  <Draggable.Container {...props}>
38
38
  {initialState.map(({ id, text }) => (
39
- <Card dragId={id}
39
+ <Card
40
40
  draggableItem
41
41
  highlight={{ color: "primary", position: "side" }}
42
+ id={id}
42
43
  key={id}
43
44
  marginBottom="xs"
44
45
  padding="xs"
45
- {...props}
46
46
  >
47
47
  <Flex alignItems="stretch"
48
48
  flexDirection="column"
49
49
  >
50
50
  <Flex gap="xs">
51
51
  <Title size={4}
52
- text={text}
53
- {...props}
52
+ text={text}
54
53
  />
55
54
  <Badge
56
55
  text="35-12345"
57
56
  variant="primary"
58
- {...props}
59
57
  />
60
58
  </Flex>
61
59
  <Caption
62
60
  size="xs"
63
61
  text="8:00A • Township Name • 90210"
64
- {...props}
65
62
  />
66
63
  <Flex gap="xxs"
67
64
  spacing="between"
@@ -69,7 +66,6 @@ const DraggableWithCards = (props) => {
69
66
  <Flex gap="xxs">
70
67
  <Caption color="error"
71
68
  size="xs"
72
- {...props}
73
69
  >
74
70
  <Icon icon="house-circle-exclamation" />
75
71
  </Caption>
@@ -82,17 +78,14 @@ const DraggableWithCards = (props) => {
82
78
  <Badge rounded
83
79
  text="Schedule QA"
84
80
  variant="warning"
85
- {...props}
86
81
  />
87
82
  <Badge rounded
88
83
  text="Flex"
89
- variant="primary"
90
- {...props}
84
+ variant="primary"
91
85
  />
92
86
  <Badge rounded
93
87
  text="R99"
94
88
  variant="primary"
95
- {...props}
96
89
  />
97
90
  </Flex>
98
91
  </Flex>
@@ -1,5 +1,3 @@
1
- For a simplified version of the Draggable API for the Card kit, You can use the Card kit as the Draggable Item by using the `draggableItem` prop. The dragHandle is added by default but this can be opted out of by setting `dragHandle` to false on the Card kit.
1
+ For a simplified version of the Draggable API for the Card kit, You can use the the Card kit as the Draggable Item by using the `draggableItem` prop on Card. The dragHandle is added by default but this can be opted out off by setting `dragHandle` to false on the Card kit.
2
2
 
3
- In addition to the above, `dragId` is a REQUIRED prop to be passed to the Card kit when implementing dragging.
4
-
5
- The dev must manage state as shown.
3
+ The dev must manage state as shown and pass in id to the Card for dragging to work.
@@ -30,11 +30,11 @@ const DraggableWithList = (props) => {
30
30
  <DraggableProvider initialItems={data}
31
31
  onReorder={(items) => setInitialState(items)}
32
32
  >
33
- <List enableDrag
33
+ <List draggable
34
34
  {...props}
35
35
  >
36
36
  {initialState.map(({ id, text }) => (
37
- <ListItem dragId={id}
37
+ <ListItem id={id}
38
38
  key={id}
39
39
  >
40
40
  {text}
@@ -1,7 +1 @@
1
- For a simplified version of the Draggable API for the List kit, use the DraggableProvider to wrap the List kit and use the `enableDrag` prop.
2
-
3
- In addition to the above, `dragId` is a REQUIRED prop to be passed to the List kit when implementing dragging.
4
-
5
- The dev must manage state as shown.
6
-
7
- The dragHandle is added by default but this can be opted out of by setting `dragHandle` to false on the List kit.
1
+ For a simplified version of the Draggable API for the List kit, use the DraggableProvider to wrap the List kit and use the `draggable` prop on List. The dev must manage state as shown and pass in id to the ListItem for dragging to work.
@@ -29,18 +29,16 @@ const DraggableWithSelectableList = (props) => {
29
29
  <DraggableProvider initialItems={data}
30
30
  onReorder={(items) => setInitialState(items)}
31
31
  >
32
- <SelectableList enableDrag
33
- variant="radio"
32
+ <SelectableList draggable
33
+ variant="checkbox"
34
34
  {...props}
35
35
  >
36
36
  {initialState.map(({ id, text }) => (
37
- <SelectableList.Item
38
- dragId={id}
37
+ <SelectableList.Item id={id}
39
38
  key={id}
40
39
  label={text}
41
- name="radio-test"
40
+ name={id}
42
41
  value={id}
43
- {...props}
44
42
  />
45
43
  ))}
46
44
  </SelectableList>
@@ -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
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: