playbook_ui 14.13.0.pre.alpha.PBNTR5596029 → 14.13.0.pre.alpha.play1753updatepbcontenttags6060

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 520a725d004f38fd119945b399c5e1dc6bcf5ca9929821965555ac8f72c3ffa1
4
- data.tar.gz: '0490ed67775bcb53cefe0bbedcaca9d2482cf47e899b5cd0e16fc382f0bb014c'
3
+ metadata.gz: be948d956effebe6bd723330f238c06683deb12734fb5c6c51fb55a3cdae412c
4
+ data.tar.gz: a150187785493cd22293f7930cb57b9c79ac6d79394b98eda99c03f93be4416d
5
5
  SHA512:
6
- metadata.gz: 479d29aca4903e65fbaff26957ab48561ebd5a1d59e032c299a83cff41aae40e20ff195eb6d70e1fada990b7a79611ebfe19ec6984fc38e90fb058bc545ab05a
7
- data.tar.gz: 17394761a8b8756c5bbb557c7245d28f597514f5e301a5857e56bb860f233a4b23224d58f122c64c6488a0ab766e97c7e0936958f36e20236942b2e5f00585c4
6
+ metadata.gz: 731ddadd00c5dbd2ca6924ee913507defa5da15a6ed0b30f9d2d639cd6ea1a3c72b3bab94fb2b40211a1329b7fae4a2259e566f11b24f622e8ab5fad279aaa6a
7
+ data.tar.gz: 430c8a15af6fef2bc5c879612fa9ab7a3c5b5ff6aebb71e7c1381619155769a667ef4b67a5f999af8e954f3cad6a60d96c0e9346a9ae0cafe1084ae3576a6f48
@@ -5,8 +5,6 @@ examples:
5
5
  - draggable_with_selectable_list: Draggable with SelectableList Kit
6
6
  - draggable_with_cards: Draggable with Cards
7
7
  - draggable_multiple_containers: Dragging Across Multiple Containers
8
- - draggable_with_table_react: Draggable with Table
9
-
10
8
  rails:
11
9
  - draggable_default_rails: Default
12
10
  - draggable_with_list_rails: Draggable with List Kit
@@ -2,5 +2,4 @@ export { default as DraggableDefault } from './_draggable_default.jsx'
2
2
  export { default as DraggableWithCards } from './_draggable_with_cards.jsx'
3
3
  export { default as DraggableWithList } from './_draggable_with_list.jsx'
4
4
  export { default as DraggableWithSelectableList } from './_draggable_with_selectable_list.jsx'
5
- export { default as DraggableMultipleContainers } from './_draggable_multiple_containers.jsx'
6
- export { default as DraggableWithTableReact } from './_draggable_with_table_react.jsx'
5
+ export { default as DraggableMultipleContainers } from './_draggable_multiple_containers.jsx'
@@ -17,11 +17,10 @@ type DraggableContainerProps = {
17
17
  data?: { [key: string]: string };
18
18
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
19
19
  id?: string;
20
- tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div' | 'tr' | 'th' | 'td' | 'thead' | 'col' | 'tbody',
21
20
  };
22
21
 
23
22
  const DraggableContainer = (props: DraggableContainerProps) => {
24
- const { aria = {}, children, className, container, data = {}, htmlOptions = {}, id, tag="div" } = props;
23
+ const { aria = {}, children, className, container, data = {}, htmlOptions = {}, id } = props;
25
24
 
26
25
  const { handleDragOver, handleDrop, activeContainer } = DraggableContext();
27
26
 
@@ -29,8 +28,6 @@ const DraggableContainer = (props: DraggableContainerProps) => {
29
28
  const dataProps = buildDataProps(data);
30
29
  const htmlProps = buildHtmlProps(htmlOptions);
31
30
 
32
- const Tag: React.ReactElement | any = `${tag}`;
33
-
34
31
  const classes = classnames(
35
32
  buildCss("pb_draggable_container"),
36
33
  `${activeContainer === container ? "active" : ""}`,
@@ -39,18 +36,18 @@ const DraggableContainer = (props: DraggableContainerProps) => {
39
36
  );
40
37
 
41
38
  return (
42
- <Tag
39
+ <div
43
40
  {...ariaProps}
44
41
  {...dataProps}
45
42
  {...htmlProps}
46
43
  className={classes}
47
44
  id={id}
48
45
  key={container}
49
- onDragOver={(e: Event) => handleDragOver(e, container)}
46
+ onDragOver={(e) => handleDragOver(e, container)}
50
47
  onDrop={() => handleDrop(container)}
51
48
  >
52
49
  {children}
53
- </Tag>
50
+ </div>
54
51
  );
55
52
  };
56
53
 
@@ -18,11 +18,10 @@ type DraggableItemProps = {
18
18
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
19
19
  id?: string;
20
20
  dragId?: string;
21
- tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div' | 'tr' | 'th' | 'td' | 'thead' | 'col' | 'tbody',
22
21
  };
23
22
 
24
23
  const DraggableItem = (props: DraggableItemProps) => {
25
- const { aria = {}, children, className, container, data = {}, htmlOptions = {}, id, dragId, tag="div" } = props;
24
+ const { aria = {}, children, className, container, data = {}, htmlOptions = {}, id, dragId } = props;
26
25
 
27
26
  const { isDragging, handleDragStart, handleDragEnter, handleDragEnd } =
28
27
  DraggableContext();
@@ -31,8 +30,6 @@ const DraggableItem = (props: DraggableItemProps) => {
31
30
  const dataProps = buildDataProps(data);
32
31
  const htmlProps = buildHtmlProps(htmlOptions);
33
32
 
34
- const Tag: React.ReactElement | any = `${tag}`;
35
-
36
33
  const classes = classnames(
37
34
  buildCss("pb_draggable_item"),
38
35
  `${isDragging === dragId ? "is_dragging" : ""}`,
@@ -41,7 +38,7 @@ const DraggableItem = (props: DraggableItemProps) => {
41
38
  );
42
39
 
43
40
  return (
44
- <Tag
41
+ <div
45
42
  {...ariaProps}
46
43
  {...dataProps}
47
44
  {...htmlProps}
@@ -54,7 +51,7 @@ const DraggableItem = (props: DraggableItemProps) => {
54
51
  onDragStart={() => handleDragStart(dragId, container)}
55
52
  >
56
53
  {children}
57
- </Tag>
54
+ </div>
58
55
  );
59
56
  };
60
57
 
@@ -1,8 +1,3 @@
1
- <%= content_tag(:div,
2
- aria: object.aria,
3
- data: object.data,
4
- id: object.id,
5
- class: object.classname,
6
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
7
2
  <%= react_component("MultiLevelSelect", object.multi_level_select_options) %>
8
3
  <% end %>
@@ -1,15 +1,9 @@
1
1
  <% if object.collapsible %>
2
2
  <%= pb_rails("collapsible", props: { name: "collapsible-nav-example", classname: object.collapsible_nav_classname }) do %>
3
3
  <%= pb_rails("collapsible/collapsible_main", props: { name: "default-collapsible-nav", icon: object.collapsible_icons, size: "xs", dark: object.dark, classname:object.margin_classes }) do %>
4
- <%= content_tag(object.tag,
5
- aria: object.aria,
6
- class: object.classname,
7
- data: object.data,
8
- dark: object.dark,
9
- id: object.id,
10
- href: object.link && object.link,
11
- target: object.link && object.target,
12
- **combined_html_options
4
+ <%= pb_content_tag( object.tag,
5
+ href: object.link && object.link,
6
+ target: object.link && object.target
13
7
  ) do %>
14
8
  <% if object.image_url %>
15
9
  <%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper_collapsible" }) %>
@@ -20,22 +14,16 @@
20
14
  <span class="pb_nav_list_item_text_collapsible">
21
15
  <%= object.text %>
22
16
  </span>
23
- <% end %>
17
+ <% end %>
24
18
  <% end %>
25
19
  <%= pb_rails("collapsible/collapsible_content", props: {collapsed: object.collapsed}) do %>
26
20
  <%= content.presence %>
27
21
  <% end %>
28
22
  <% end %>
29
23
  <% else %>
30
- <%= content_tag(object.tag,
31
- aria: object.aria,
32
- class: object.classname,
33
- **combined_html_options,
34
- data: object.data,
35
- dark: object.dark,
36
- id: object.id,
37
- href: object.link && object.link,
38
- target: object.link && object.target
24
+ <%= pb_content_tag( object.tag,
25
+ href: object.link && object.link,
26
+ target: object.link && object.target
39
27
  ) do %>
40
28
  <% if object.image_url %>
41
29
  <%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper" }) %>
@@ -1,12 +1,7 @@
1
- <%= content_tag(:nav,
2
- aria: object.aria,
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id,
6
- **combined_html_options) do %>
1
+ <%= pb_content_tag(:nav) do %>
7
2
  <% if object.title %>
8
- <%= content_tag(:div, class: "pb_nav_list_title") do %>
9
- <%= content_tag(:a, class: "pb_nav_list_item_link_text", href: object.link) do %>
3
+ <%= pb_content_tag do %>
4
+ <%= pb_content_tag(:a) do %>
10
5
  <%= pb_rails("caption", props: { text: object.title, dark: dark }) %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,7 +1,2 @@
1
- <%= content_tag(:div,
2
- aria: object.aria.merge!(label: object.status),
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id,
6
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
7
2
  <% end %>
@@ -1,9 +1,4 @@
1
- <%= content_tag(:div,
2
- aria: object.aria,
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id,
6
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
7
2
  <div class="pb_popover_tooltip hide" id="<%= object.tooltip_id %>" role="tooltip" style="<%= object.z_index_helper %>">
8
3
  <div class="pb_popover_body <%= object.width_height_class_helper %> <%= object.popover_spacing_helper %>" style="<%= object.width_height_helper %>">
9
4
  <%= content.presence %>
@@ -7,14 +7,11 @@ import {
7
7
  } from "../../utilities/props";
8
8
  import { globalProps } from "../../utilities/globalProps";
9
9
 
10
- import Draggable from "../../pb_draggable/_draggable"
11
-
12
10
  type TableBodyPropTypes = {
13
11
  aria?: { [key: string]: string };
14
12
  children: React.ReactNode[] | React.ReactNode;
15
13
  className: string;
16
14
  data?: { [key: string]: string };
17
- draggableContainer?: boolean;
18
15
  htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
19
16
  id?: string;
20
17
  tag?: "table" | "div";
@@ -26,7 +23,6 @@ const TableBody = (props: TableBodyPropTypes): React.ReactElement => {
26
23
  children,
27
24
  className,
28
25
  data = {},
29
- draggableContainer = false,
30
26
  htmlOptions = {},
31
27
  id,
32
28
  tag = "table",
@@ -41,30 +37,7 @@ const TableBody = (props: TableBodyPropTypes): React.ReactElement => {
41
37
  return (
42
38
  <>
43
39
  {isTableTag ? (
44
- draggableContainer ? (
45
- <Draggable.Container
46
- {...ariaProps}
47
- {...dataProps}
48
- {...htmlProps}
49
- className={classes}
50
- id={id}
51
- tag="tbody"
52
- >
53
- {children}
54
- </Draggable.Container>
55
- ) : (
56
- <tbody
57
- {...ariaProps}
58
- {...dataProps}
59
- {...htmlProps}
60
- className={classes}
61
- id={id}
62
- >
63
- {children}
64
- </tbody>
65
- )
66
- ) : draggableContainer ? (
67
- <Draggable.Container
40
+ <tbody
68
41
  {...ariaProps}
69
42
  {...dataProps}
70
43
  {...htmlProps}
@@ -72,7 +45,7 @@ const TableBody = (props: TableBodyPropTypes): React.ReactElement => {
72
45
  id={id}
73
46
  >
74
47
  {children}
75
- </Draggable.Container>
48
+ </tbody>
76
49
  ) : (
77
50
  <div
78
51
  {...ariaProps}
@@ -9,7 +9,6 @@ import {
9
9
  import { globalProps } from "../../utilities/globalProps";
10
10
  import Collapsible from "../../pb_collapsible/_collapsible";
11
11
  import useCollapsible from "../../pb_collapsible/useCollapsible";
12
- import Draggable from "../../pb_draggable/_draggable";
13
12
 
14
13
  type TableRowPropTypes = {
15
14
  aria?: { [key: string]: string };
@@ -20,8 +19,6 @@ type TableRowPropTypes = {
20
19
  collapsibleSideHighlight?: boolean;
21
20
  data?: { [key: string]: string };
22
21
  dark?: boolean;
23
- dragId?: string;
24
- draggableItem?: boolean;
25
22
  htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
26
23
  id?: string;
27
24
  toggleCellId?: string;
@@ -39,8 +36,6 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
39
36
  className,
40
37
  data = {},
41
38
  dark = false,
42
- dragId,
43
- draggableItem = false,
44
39
  htmlOptions = {},
45
40
  id,
46
41
  toggleCellId,
@@ -157,38 +152,15 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
157
152
  </>
158
153
  )
159
154
  ) : isTableTag ? (
160
- draggableItem ? (
161
- <Draggable.Item
162
- {...ariaProps}
163
- {...dataProps}
164
- {...htmlProps}
165
- className={classes}
166
- dragId={dragId}
167
- tag="tr"
168
- >
169
- {children}
170
- </Draggable.Item>
171
- ) : (
172
- <tr
173
- {...ariaProps}
174
- {...dataProps}
175
- {...htmlProps}
176
- className={classes}
177
- id={id}
178
- >
179
- {children}
180
- </tr>
181
- )
182
- ) : draggableItem ? (
183
- <Draggable.Item
155
+ <tr
184
156
  {...ariaProps}
185
157
  {...dataProps}
186
158
  {...htmlProps}
187
159
  className={classes}
188
- dragId={dragId}
160
+ id={id}
189
161
  >
190
162
  {children}
191
- </Draggable.Item>
163
+ </tr>
192
164
  ) : (
193
165
  <div
194
166
  {...ariaProps}