playbook_ui_docs 13.28.0.pre.alpha.PBNTR296dropdownwithform2941 → 13.28.0.pre.alpha.PBNTR297gradientoverlay3029

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +40 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md +3 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.md +1 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -1
  6. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +2 -1
  7. data/app/pb_kits/playbook/pb_bar_graph/docs/{_bar_graph_custom.html.erb → _bar_graph_custom_rails.html.erb} +3 -3
  8. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +2 -0
  9. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -1
  10. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +53 -0
  11. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +159 -0
  12. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +121 -0
  13. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +9 -0
  14. data/app/pb_kits/playbook/pb_draggable/docs/index.js +3 -0
  15. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.jsx +40 -0
  16. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +7 -0
  17. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.jsx +36 -0
  18. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.md +5 -0
  19. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +4 -0
  20. data/app/pb_kits/playbook/pb_overlay/docs/index.js +2 -0
  21. data/app/pb_kits/playbook/pb_pill/docs/_description.md +1 -1
  22. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.jsx +33 -32
  23. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.md +1 -1
  24. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.md +2 -0
  25. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.jsx +33 -33
  26. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.md +1 -1
  27. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.html.erb +34 -0
  28. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.md +2 -0
  29. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.jsx +51 -50
  30. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.md +1 -1
  31. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.html.erb +54 -0
  32. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.md +2 -0
  33. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.jsx +37 -38
  34. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.md +1 -0
  35. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.html.erb +53 -0
  36. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.md +1 -0
  37. data/app/pb_kits/playbook/pb_table/docs/{_table_alignment_row.html.erb → _table_outer_padding.html.erb} +7 -7
  38. data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.jsx +76 -0
  39. data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.md +1 -0
  40. data/app/pb_kits/playbook/pb_table/docs/example.yml +9 -9
  41. data/app/pb_kits/playbook/pb_table/docs/index.js +1 -0
  42. data/dist/menu.yml +7 -2
  43. data/dist/playbook-doc.js +10 -10
  44. metadata +29 -7
  45. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.html.erb +0 -63
  46. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.html.erb +0 -52
  47. /data/app/pb_kits/playbook/pb_table/docs/{_table_alignment_column.html.erb → _table_alignment_column_rails.html.erb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f02e743e2bbecb16ca04bf79ae10a2586b38f6e04a132f65a230c423cb4a2910
4
- data.tar.gz: 8e2257efd28225f8dcaf388aa3f2927e29f8e965db06178658647dd0e7f5293d
3
+ metadata.gz: 68319a6bec5bf342bcc43c82ea9f60eea9b3998bbc731ec509cc9045935afde3
4
+ data.tar.gz: 587805464e81282168cf9035f2100486356f4ceca8495879fcd10f0360d3df7e
5
5
  SHA512:
6
- metadata.gz: 9fe0f38c9e9fd984301178933047053b5a74bd5f28f47416a442f5e19322b3b60cf0b6b7a4cb6be84dfa1050ad9ee75546cb5985a9be58ee6f5cab0fa5bc030a
7
- data.tar.gz: 959a070dd6af81b899d5b026fe17b91f8d2058f620c4aa09791bdb6942cd425e4171a6067ee80c82388080a45a8e745a6bb8b0a466c63b27dfa9e1d34c25f8ae
6
+ metadata.gz: 76cedfd8ebd4cfb5cf29a38f03e646d52044cb058c486e26c82a0f8e84b30e051b5320591c86d605c14988719392e799cbff4c200580e8a063b85b074c12aaa4
7
+ data.tar.gz: dc466cd04903c60c0173f5e62ade2a93c92da6760c3f74da08d42adfcb07d677befe201b04435750b61688f6e82d80c57574c67e85d63d483417c46fdfc8cc51
@@ -0,0 +1,40 @@
1
+ <%
2
+ column_definitions = [
3
+ {
4
+ accessor: "year",
5
+ label: "Year",
6
+ cellAccessors: ["quarter", "month", "day"],
7
+ },
8
+ {
9
+ accessor: "newEnrollments",
10
+ label: "New Enrollments",
11
+ },
12
+ {
13
+ accessor: "scheduledMeetings",
14
+ label: "Scheduled Meetings",
15
+ },
16
+ {
17
+ accessor: "attendanceRate",
18
+ label: "Attendance Rate",
19
+ },
20
+ {
21
+ accessor: "completedClasses",
22
+ label: "Completed Classes",
23
+ },
24
+ {
25
+ accessor: "classCompletionRate",
26
+ label: "Class Completion Rate",
27
+ },
28
+ {
29
+ accessor: "graduatedStudents",
30
+ label: "Graduated Students",
31
+ }
32
+ ]
33
+
34
+ subrow_headers = ["Quarter", "Month", "Day"]
35
+ %>
36
+
37
+ <%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions }) do %>
38
+ <%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
39
+ <%= pb_rails("advanced_table/table_body", props: { id: "subrow_headers", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
40
+ <% end %>
@@ -0,0 +1,3 @@
1
+ `subrow_headers` is an optional prop that if present will add header rows at each level of the nested data. The prop takes an array of strings, each string being the text for each header row. The array of strings must be in the order in which they need to be rendered in the UI according to depth.
2
+
3
+ `enable_toggle_expansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enable_toggle_expansion` is a string that can be "all", "header" or "none". If set to "all", the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to "header" button will only appear in header and NOT in subRow headers. This is set to "header" by default.
@@ -1,3 +1,3 @@
1
1
  `subRowHeaders` is an optional prop that if present will add header rows at each level of the nested data. The prop takes an array of strings, each string being the text for each header row. The array of strings must be in the order in which they need to be rendered in the UI according to depth.
2
2
 
3
- `enableToggleExpansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enableToggleExpansion` is a string that can be 'all', 'header" or "none". If set to 'all', the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to 'header' button will only appear in header and NOT in subRow headers. This is set to 'header' by default.
3
+ `enableToggleExpansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enableToggleExpansion` is a string that can be "all", "header" or "none". If set to "all", the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to "header" button will only appear in header and NOT in subRow headers. This is set to "header" by default.
@@ -1,6 +1,7 @@
1
1
  examples:
2
2
  rails:
3
3
  - advanced_table_beta: Default (Required Props)
4
+ - advanced_table_beta_subrow_headers: SubRow Headers
4
5
  react:
5
6
  - advanced_table_default: Default (Required Props)
6
7
  - advanced_table_loading: Loading State
@@ -12,4 +13,3 @@ examples:
12
13
  - advanced_table_table_options: Table Options
13
14
  - advanced_table_table_props: Table Props
14
15
  - advanced_table_inline_row_loading: inline Row Loading
15
-
@@ -1 +1,2 @@
1
- See https://api.highcharts.com/highcharts/ for a comprehensive list of available options.
1
+ The `customOptions` prop provides comprehensive access to additional [Highcharts options](https://api.highcharts.com/highcharts/) that are not explicitly defined as props.
2
+ It's important to note that certain options may require specific script imports to function properly.
@@ -15,7 +15,7 @@
15
15
  data: [1111,677,3245,500,200]
16
16
  }] %>
17
17
 
18
- <% custom_options = {
18
+ <% bar_graph_options = {
19
19
  customOptions: {
20
20
  subtitle: {
21
21
  text: "Overwritten subtitle",
@@ -45,5 +45,5 @@
45
45
  y_axis_min: 0,
46
46
  subtitle: 'Subtitle to replace',
47
47
  title: 'Bar Graph with Custom Overrides',
48
- custom_options: custom_options
49
- }) %>
48
+ custom_options: bar_graph_options
49
+ }) %>
@@ -0,0 +1,2 @@
1
+ The `custom_options` prop provides comprehensive access to additional [Highcharts options](https://api.highcharts.com/highcharts/) that are not explicitly defined as props.
2
+ It's important to note that certain options may require specific script imports to function properly.
@@ -8,7 +8,7 @@ examples:
8
8
  - bar_graph_height: Height
9
9
  - bar_graph_spline: Spline
10
10
  - bar_graph_colors: Color Overrides
11
- - bar_graph_custom: Custom Overrides
11
+ - bar_graph_custom_rails: Custom Overrides
12
12
  - bar_graph_stacked: Stacked
13
13
  - bar_graph_negative_numbers: Negative Numbers
14
14
  - bar_graph_secondary_y_axis: Secondary Y-Axis
@@ -0,0 +1,53 @@
1
+ import React, { useState } from "react";
2
+ import { SelectableList, Draggable, DraggableProvider } from "../../";
3
+
4
+ // Initial items to be dragged
5
+ const data = [
6
+ {
7
+ id: "1",
8
+ text: "Task 1",
9
+ },
10
+ {
11
+ id: "2",
12
+ text: "Task 2",
13
+ },
14
+ {
15
+ id: "3",
16
+ text: "Task 3",
17
+ },
18
+ {
19
+ id: "4",
20
+ text: "Task 4",
21
+ },
22
+ ];
23
+
24
+ const DraggableDefault = (props) => {
25
+ const [initialState, setInitialState] = useState(data);
26
+
27
+ return (
28
+ <DraggableProvider initialItems={data}
29
+ onChange={(items) => setInitialState(items)}
30
+ >
31
+ <Draggable
32
+ {...props}
33
+ >
34
+ <Draggable.Container>
35
+ <SelectableList variant="checkbox">
36
+ {initialState.map(({ id, text }) => (
37
+ <Draggable.Item id={id}
38
+ key={id}
39
+ >
40
+ <SelectableList.Item label={text}
41
+ name={id}
42
+ value={id}
43
+ />
44
+ </Draggable.Item>
45
+ ))}
46
+ </SelectableList>
47
+ </Draggable.Container>
48
+ </Draggable>
49
+ </DraggableProvider>
50
+ );
51
+ };
52
+
53
+ export default DraggableDefault;
@@ -0,0 +1,159 @@
1
+ import React, { useState } from "react";
2
+ import {
3
+ Flex,
4
+ Caption,
5
+ Card,
6
+ FlexItem,
7
+ Badge,
8
+ Avatar,
9
+ Title,
10
+ Body,
11
+ Draggable,
12
+ DraggableProvider,
13
+ } from "../../";
14
+
15
+ // Initial groups to drag between
16
+ const containers = ["To Do", "In Progress", "Done"];
17
+
18
+ // Initial items to be dragged
19
+ const data = [
20
+ {
21
+ id: "1",
22
+ container: "To Do",
23
+ title: "Task 1",
24
+ description: "Bug fixes",
25
+ assignee_name: "Terry Miles",
26
+ assignee_img: "https://randomuser.me/api/portraits/men/44.jpg",
27
+ },
28
+ {
29
+ id: "2",
30
+ container: "To Do",
31
+ title: "Task 2",
32
+ description: "Documentation",
33
+ assignee_name: "Sophia Miles",
34
+ assignee_img: "https://randomuser.me/api/portraits/women/8.jpg",
35
+ },
36
+ {
37
+ id: "3",
38
+ container: "In Progress",
39
+ title: "Task 3",
40
+ description: "Add a variant",
41
+ assignee_name: "Alice Jones",
42
+ assignee_img: "https://randomuser.me/api/portraits/women/10.jpg",
43
+ },
44
+ {
45
+ id: "4",
46
+ container: "To Do",
47
+ title: "Task 4",
48
+ description: "Add jest tests",
49
+ assignee_name: "Mike James",
50
+ assignee_img: "https://randomuser.me/api/portraits/men/8.jpg",
51
+ },
52
+ {
53
+ id: "5",
54
+ container: "Done",
55
+ title: "Task 5",
56
+ description: "Alpha testing",
57
+ assignee_name: "James Guy",
58
+ assignee_img: "https://randomuser.me/api/portraits/men/18.jpg",
59
+ },
60
+ {
61
+ id: "6",
62
+ container: "In Progress",
63
+ title: "Task 6",
64
+ description: "Release",
65
+ assignee_name: "Sally Jones",
66
+ assignee_img: "https://randomuser.me/api/portraits/women/28.jpg",
67
+ },
68
+ ];
69
+
70
+ const DraggableMultipleContainer = (props) => {
71
+ const [initialState, setInitialState] = useState(data);
72
+
73
+ const badgeProperties = (container) => {
74
+ switch (container) {
75
+ case "To Do":
76
+ return { text: "queue", color: "warning" };
77
+ case "In Progress":
78
+ return { text: "progress", color: "primary" };
79
+ default:
80
+ return { text: "done", color: "success" };
81
+ }
82
+ };
83
+
84
+ return (
85
+ <DraggableProvider initialItems={data}
86
+ onChange={(items) => setInitialState(items)}
87
+ >
88
+ <Draggable
89
+ display="flex"
90
+ justifyContent="center"
91
+ {...props}
92
+ >
93
+ {containers?.map((container) => (
94
+ <Draggable.Container
95
+ container={container}
96
+ key={container}
97
+ padding="sm"
98
+ >
99
+ <Caption textAlign="center">{container}</Caption>
100
+ <Flex
101
+ alignItems="stretch"
102
+ orientation="column"
103
+ >
104
+ {initialState
105
+ .filter((item) => item.container === container)
106
+ .map(
107
+ ({
108
+ assignee_img,
109
+ assignee_name,
110
+ description,
111
+ id,
112
+ title,
113
+ }) => (
114
+ <Draggable.Item
115
+ container={container}
116
+ id={id}
117
+ key={id}
118
+ >
119
+ <Card
120
+ marginBottom="sm"
121
+ padding="sm"
122
+ >
123
+ <Flex justify="between">
124
+ <FlexItem>
125
+ <Flex>
126
+ <Avatar
127
+ imageUrl={assignee_img}
128
+ name={assignee_name}
129
+ size="xxs"
130
+ />
131
+ <Title paddingLeft="xs"
132
+ size={4}
133
+ text={title}
134
+ />
135
+ </Flex>
136
+ </FlexItem>
137
+ <Badge
138
+ marginLeft="sm"
139
+ rounded
140
+ text={badgeProperties(container).text}
141
+ variant={badgeProperties(container).color}
142
+ />
143
+ </Flex>
144
+ <Body paddingTop="xs"
145
+ text={description}
146
+ />
147
+ </Card>
148
+ </Draggable.Item>
149
+ )
150
+ )}
151
+ </Flex>
152
+ </Draggable.Container>
153
+ ))}
154
+ </Draggable>
155
+ </DraggableProvider>
156
+ );
157
+ };
158
+
159
+ export default DraggableMultipleContainer;
@@ -0,0 +1,121 @@
1
+ import React, { useState } from "react";
2
+ import {
3
+ Flex,
4
+ Badge,
5
+ Title,
6
+ Icon,
7
+ Draggable,
8
+ DraggableProvider,
9
+ Card,
10
+ Caption,
11
+ } from "../../";
12
+
13
+ // Initial items to be dragged
14
+ const data = [
15
+ {
16
+ id: "1",
17
+ text: "Joe Black",
18
+ },
19
+ {
20
+ id: "2",
21
+ text: "Nancy White",
22
+ },
23
+ {
24
+ id: "3",
25
+ text: "Bill Green",
26
+ },
27
+ ];
28
+
29
+ const DraggableWithCards = (props) => {
30
+ const [initialState, setInitialState] = useState(data);
31
+
32
+ return (
33
+ <DraggableProvider
34
+ initialItems={data}
35
+ onChange={(items) => setInitialState(items)}
36
+ >
37
+ <Draggable {...props}>
38
+ <Draggable.Container>
39
+ {initialState.map(({ id, text }) => (
40
+ <Draggable.Item id={id}
41
+ key={id}
42
+ >
43
+ <Card
44
+ highlight={{ position: "side", color: "primary" }}
45
+ marginBottom="xs"
46
+ >
47
+ <Flex alignItems="stretch"
48
+ flexDirection="column"
49
+ >
50
+ <Flex gap="xs">
51
+ <Title size={4}
52
+ text={text}
53
+ />
54
+ <Badge
55
+ text="35-12345"
56
+ variant="primary"
57
+ />
58
+ </Flex>
59
+
60
+ <Flex
61
+ gap="sm"
62
+ spacing="between"
63
+ >
64
+ <Caption
65
+ size="xs"
66
+ text="8:00A"
67
+ />
68
+ <Flex gap="xxs">
69
+ <Caption
70
+ size="xs"
71
+ text="Township Name"
72
+ />
73
+ <Caption size="xs"
74
+ text="•"
75
+ />
76
+ <Caption size="xs"
77
+ text="90210"
78
+ />
79
+ </Flex>
80
+ </Flex>
81
+
82
+ <Flex gap="xxs"
83
+ spacing="between"
84
+ >
85
+ <Flex gap="xxs">
86
+ <Caption color="error"
87
+ size="xs"
88
+ >
89
+ <Icon icon="house-circle-exclamation" />
90
+ </Caption>
91
+ <Caption color="success"
92
+ size="xs">
93
+ <Icon icon="file-circle-check" />
94
+ </Caption>
95
+ </Flex>
96
+ <Flex>
97
+ <Badge rounded
98
+ text="Schedule QA"
99
+ variant="warning"
100
+ />
101
+ <Badge rounded
102
+ text="Flex"
103
+ variant="primary"
104
+ />
105
+ <Badge rounded
106
+ text="R99"
107
+ variant="primary"
108
+ />
109
+ </Flex>
110
+ </Flex>
111
+ </Flex>
112
+ </Card>
113
+ </Draggable.Item>
114
+ ))}
115
+ </Draggable.Container>
116
+ </Draggable>
117
+ </DraggableProvider>
118
+ );
119
+ };
120
+
121
+ export default DraggableWithCards;
@@ -0,0 +1,9 @@
1
+ examples:
2
+
3
+
4
+ react:
5
+ - draggable_default: Default
6
+ - draggable_with_cards: Draggable with Cards
7
+ - draggable_multiple_containers: Dragging Across Multiple Containers
8
+
9
+
@@ -0,0 +1,3 @@
1
+ export { default as DraggableDefault } from './_draggable_default.jsx'
2
+ export { default as DraggableWithCards } from './_draggable_with_cards.jsx'
3
+ export { default as DraggableMultipleContainers } from './_draggable_multiple_containers.jsx'
@@ -0,0 +1,40 @@
1
+ import React from 'react'
2
+ import {
3
+ Overlay,
4
+ Table,
5
+ } from '../..'
6
+
7
+ const TableExample = () => {
8
+ return (
9
+ <Table size="sm">
10
+ <thead>
11
+ <tr>
12
+ <th>{'Column 1'}</th>
13
+ <th>{'Column 2'}</th>
14
+ <th>{'Column 3'}</th>
15
+ <th>{'Column 4'}</th>
16
+ <th>{'Column 5'}</th>
17
+ </tr>
18
+ </thead>
19
+ <tbody>
20
+ {Array.from({ length: 7 }, (_, index) => (
21
+ <tr key={index}>
22
+ {Array.from({ length: 5 }, (_, columnIndex) => (
23
+ <td key={columnIndex}>{`Value ${columnIndex + 1}`}</td>
24
+ ))}
25
+ </tr>
26
+ ))}
27
+ </tbody>
28
+ </Table>
29
+ )
30
+ }
31
+
32
+ const OverlayDefault = () => (
33
+ <>
34
+ <Overlay>
35
+ <TableExample />
36
+ </Overlay>
37
+ </>
38
+ )
39
+
40
+ export default OverlayDefault
@@ -0,0 +1,7 @@
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
+
3
+ The optional `layout` prop accepts a `position` and a `size` as a key:value pair object.
4
+
5
+ The `position` prop sets the side 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
+
7
+ The `size` prop accepts 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 `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.
@@ -0,0 +1,36 @@
1
+ import React from 'react'
2
+ import {
3
+ Overlay,
4
+ Card,
5
+ Flex,
6
+ FlexItem,
7
+ } from '../..'
8
+
9
+ const InlineCardsExample = () => {
10
+ return (
11
+ <Flex
12
+ columnGap="lg"
13
+ orientation="row"
14
+ overflowX="auto"
15
+ >
16
+ {Array.from({ length: 15 }, (_, index) => (
17
+ <FlexItem key={index}>
18
+ <Card>{"Card Content"}</Card>
19
+ </FlexItem>
20
+ ))}
21
+ </Flex>
22
+ )
23
+ }
24
+
25
+ const OverlayMultiDirectional = () => (
26
+ <>
27
+ <Overlay
28
+ color="white"
29
+ layout={{"left-right": "10%"}}
30
+ >
31
+ <InlineCardsExample />
32
+ </Overlay>
33
+ </>
34
+ )
35
+
36
+ export default OverlayMultiDirectional
@@ -0,0 +1,5 @@
1
+ Optionally, you can pass multi-directional options (`left-right` or `top-bottom`) to the `position` prop, which create multiple overlays.
2
+
3
+ Your `color` is still applied as the starting edge to both overlays, and each mask will fade to transparent moving toward its opposite edge, ending at the `size` percentage you set.
4
+
5
+ NOTE: Multi-directional overlays share the available container space, so passing a size greater than "50%" to a multi-directional overlay will cause your masks to overlap at the midline of your container. As a best practice, we do not recommend exceeding a size of 25% when using multi-directional overlays.
@@ -0,0 +1,4 @@
1
+ examples:
2
+ react:
3
+ - overlay_default: Default
4
+ - overlay_multi_directional: Multi-directional
@@ -0,0 +1,2 @@
1
+ export { default as OverlayDefault } from './_overlay_default.jsx'
2
+ export { default as OverlayMultiDirectional } from './_overlay_multi_directional.jsx'
@@ -1 +1 @@
1
- A pill uses both a keyword and a specific color to categorize an item. Each pill directly corresponds to a data color here: https://playbook.powerapp.cloud/utilities
1
+ A pill uses both a keyword and a specific color to categorize an item. Each pill directly corresponds to a data color <a href="https://playbook.powerapp.cloud/visual_guidelines/colors" target="_blank">here</a>.
@@ -7,39 +7,40 @@ const TableAlignmentColumn = (props) => {
7
7
  <Table
8
8
  {...props}
9
9
  >
10
- <thead>
11
- <tr>
12
- <th>{'Column 1'}</th>
13
- <th>{'Column 2'}</th>
14
- <th>{'Column 3'}</th>
15
- <th align="center">{'Rating'}</th>
16
- <th align="right">{'Money'}</th>
17
- </tr>
18
- </thead>
19
- <tbody>
20
- <tr>
21
- <td>{'Value 1'}</td>
22
- <td>{'Value 2'}</td>
23
- <td>{'Value 3'}</td>
24
- <td align="center">{'3'}</td>
25
- <td align="right">{'$57.32'}</td>
26
- </tr>
27
- <tr>
28
- <td>{'Value 1'}</td>
29
- <td>{'Value 2'}</td>
30
- <td>{'Value 3'}</td>
31
- <td align="center">{'2'}</td>
32
- <td align="right">{'$5,657.08'}</td>
33
- </tr>
34
- <tr>
35
- <td>{'Value 1'}</td>
36
- <td>{'Value 2'}</td>
37
- <td>{'Value 3'}</td>
38
- <td align="center">{'4'}</td>
39
- <td align="right">{'$358.77'}</td>
40
- </tr>
41
- </tbody>
10
+ <Table.Head>
11
+ <Table.Row>
12
+ <Table.Header>{'Column 1'}</Table.Header>
13
+ <Table.Header>{'Column 2'}</Table.Header>
14
+ <Table.Header>{'Column 3'}</Table.Header>
15
+ <Table.Header textAlign="center">{'Rating'}</Table.Header>
16
+ <Table.Header textAlign="right">{'Money'}</Table.Header>
17
+ </Table.Row>
18
+ </Table.Head>
19
+ <Table.Body>
20
+ <Table.Row>
21
+ <Table.Cell>{'Value 1'}</Table.Cell>
22
+ <Table.Cell>{'Value 2'}</Table.Cell>
23
+ <Table.Cell>{'Value 3'}</Table.Cell>
24
+ <Table.Cell textAlign="center">{'3'}</Table.Cell>
25
+ <Table.Cell textAlign="right">{'$57.32'}</Table.Cell>
26
+ </Table.Row>
27
+ <Table.Row>
28
+ <Table.Cell>{'Value 1'}</Table.Cell>
29
+ <Table.Cell>{'Value 2'}</Table.Cell>
30
+ <Table.Cell>{'Value 3'}</Table.Cell>
31
+ <Table.Cell textAlign="center">{'2'}</Table.Cell>
32
+ <Table.Cell textAlign="right">{'$5,657.08'}</Table.Cell>
33
+ </Table.Row>
34
+ <Table.Row>
35
+ <Table.Cell>{'Value 1'}</Table.Cell>
36
+ <Table.Cell>{'Value 2'}</Table.Cell>
37
+ <Table.Cell>{'Value 3'}</Table.Cell>
38
+ <Table.Cell textAlign="center">{'4'}</Table.Cell>
39
+ <Table.Cell textAlign="right">{'$358.77'}</Table.Cell>
40
+ </Table.Row>
41
+ </Table.Body>
42
42
  </Table>
43
+
43
44
  )
44
45
  }
45
46
 
@@ -1,2 +1,2 @@
1
- You can individually align a piece of table data, but a more practical use would be applied to align a column.
1
+ Pass our `textAlign` global prop to any `table.cell` subcomponent to change the text alignment of individual cells, or apply this prop persistently to align entire columns.
2
2
  In the table above the "Rating" column contents is centered and the "Money" column contents is right aligned.
@@ -0,0 +1,2 @@
1
+ Pass our `text_align` global prop to any `table/table_cell` subcomponent to change the text alignment of individual cells, or apply this prop persistently to align entire columns.
2
+ In the table above the "Rating" column contents is centered and the "Money" column contents is right aligned.