playbook_ui 14.11.1.pre.alpha.PBNTR440enableglobalpropspbformwith5624 → 14.11.1.pre.alpha.PBNTR573datepickerinvestigation5355

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -2
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +2 -18
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +5 -27
  5. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +2 -17
  6. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +1 -23
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -29
  8. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +4 -61
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +0 -1
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.md +2 -2
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -5
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -6
  14. data/app/pb_kits/playbook/pb_button/button.html.erb +3 -2
  15. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +6 -1
  16. data/app/pb_kits/playbook/pb_collapsible/collapsible.html.erb +1 -3
  17. data/app/pb_kits/playbook/pb_collapsible/collapsible.rb +0 -3
  18. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +26 -23
  19. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +2 -2
  20. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.html.erb +12 -1
  21. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +1 -1
  22. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -1
  23. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb +9 -3
  24. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -1
  25. data/app/pb_kits/playbook/pb_drawer/_drawer.scss +183 -145
  26. data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +268 -158
  27. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +45 -3
  28. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +1 -0
  29. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +16 -9
  30. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +19 -44
  31. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +3 -21
  32. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +21 -16
  33. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +19 -2
  34. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -2
  35. data/app/pb_kits/playbook/pb_drawer/docs/index.js +0 -1
  36. data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +5 -5
  37. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +1 -1
  38. data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +12 -7
  39. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +14 -9
  40. data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +11 -6
  41. data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb +14 -8
  42. data/app/pb_kits/playbook/pb_list/item.html.erb +8 -30
  43. data/app/pb_kits/playbook/pb_list/item.rb +0 -7
  44. data/app/pb_kits/playbook/pb_list/list.html.erb +11 -31
  45. data/app/pb_kits/playbook/pb_list/list.rb +0 -4
  46. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -6
  47. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +0 -4
  48. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +0 -1
  49. data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +1 -1
  50. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +12 -30
  51. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +1 -3
  52. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
  53. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -3
  54. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +1 -20
  55. data/app/pb_kits/playbook/pb_radio/_radio.scss +8 -12
  56. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.jsx +3 -8
  57. data/app/pb_kits/playbook/pb_select/_select.scss +5 -3
  58. data/app/pb_kits/playbook/pb_select/_select.tsx +1 -5
  59. data/app/pb_kits/playbook/pb_select/select.html.erb +2 -2
  60. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +1 -9
  61. data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx +1 -4
  62. data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx +1 -4
  63. data/app/pb_kits/playbook/pb_selectable_list/selectable_list.html.erb +3 -17
  64. data/app/pb_kits/playbook/pb_selectable_list/selectable_list.rb +0 -3
  65. data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +4 -11
  66. data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.rb +0 -3
  67. data/app/pb_kits/playbook/pb_table/_table.tsx +3 -2
  68. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +2 -2
  69. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -3
  70. data/app/pb_kits/playbook/pb_table/index.ts +88 -187
  71. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +0 -12
  72. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +5 -6
  73. data/app/pb_kits/playbook/pb_table/table.html.erb +1 -1
  74. data/app/pb_kits/playbook/pb_table/table.rb +2 -17
  75. data/app/pb_kits/playbook/pb_table/table_row.html.erb +1 -20
  76. data/app/pb_kits/playbook/pb_table/table_row.rb +0 -5
  77. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +1 -2
  78. data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +0 -4
  79. data/app/pb_kits/playbook/pb_text_input/text_input.rb +3 -33
  80. data/app/pb_kits/playbook/pb_timeline/_timeline.scss +30 -30
  81. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
  82. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
  83. data/dist/chunks/_typeahead-BNULwihE.js +36 -0
  84. data/dist/chunks/_weekday_stacked-BKWemDAe.js +45 -0
  85. data/dist/chunks/{lib-kMuhBuU7.js → lib-B7sgJtGS.js} +2 -2
  86. data/dist/chunks/{pb_form_validation-DBJ0wZuS.js → pb_form_validation-C5Cc0-1v.js} +1 -1
  87. data/dist/chunks/vendor.js +1 -1
  88. data/dist/menu.yml +0 -6
  89. data/dist/playbook-doc.js +1 -1
  90. data/dist/playbook-rails-react-bindings.js +1 -1
  91. data/dist/playbook-rails.js +1 -1
  92. data/dist/playbook.css +1 -1
  93. data/lib/playbook/pb_forms_helper.rb +4 -13
  94. data/lib/playbook/version.rb +1 -1
  95. metadata +7 -63
  96. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.jsx +0 -50
  97. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx +0 -60
  98. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.md +0 -5
  99. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx +0 -78
  100. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.md +0 -1
  101. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.jsx +0 -53
  102. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.md +0 -1
  103. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.jsx +0 -52
  104. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.md +0 -1
  105. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json +0 -42
  106. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_with_id.json +0 -299
  107. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames.html.erb +0 -13
  108. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames_rails.md +0 -3
  109. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md +0 -5
  110. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb +0 -38
  111. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md +0 -3
  112. data/app/pb_kits/playbook/pb_drawer/context.ts +0 -11
  113. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx +0 -38
  114. data/app/pb_kits/playbook/pb_drawer/hooks/useBreakpoint.tsx +0 -60
  115. data/app/pb_kits/playbook/pb_drawer/hooks/useDrawerAnimation.tsx +0 -21
  116. data/app/pb_kits/playbook/pb_icon_button/_icon_button.scss +0 -78
  117. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +0 -3
  118. data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +0 -7
  119. data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +0 -16
  120. data/app/pb_kits/playbook/pb_icon_button/icon_button.rb +0 -22
  121. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.html.erb +0 -15
  122. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx +0 -24
  123. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.md +0 -1
  124. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.html.erb +0 -74
  125. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_rails.md +0 -3
  126. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.html.erb +0 -74
  127. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_rails.md +0 -3
  128. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.html.erb +0 -47
  129. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_rails.md +0 -2
  130. data/app/pb_kits/playbook/pb_table/utilities/addDataTitle.ts +0 -22
  131. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +0 -46
  132. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask_rails.md +0 -3
  133. data/app/pb_kits/playbook/pb_text_input/index.js +0 -103
  134. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb +0 -19
  135. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.jsx +0 -27
  136. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md +0 -1
  137. data/dist/chunks/_typeahead-BWwaAo_0.js +0 -36
  138. data/dist/chunks/_weekday_stacked-zyBCd1s8.js +0 -45
  139. data/lib/playbook/pb_forms_global_props_helper.rb +0 -136
  140. /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible_react.md → _table_with_collapsible.md} +0 -0
@@ -1,56 +1,31 @@
1
- import React, { useState, useEffect } from "react"
2
- import { Button, Drawer, Icon, Nav, NavItem } from "playbook-ui"
1
+ import React from "react";
2
+ import { Button, Drawer, Icon, Title } from "playbook-ui";
3
3
 
4
4
  const DrawerMenu = () => {
5
- const [isSmallScreen, setIsSmallScreen] = useState(false)
6
-
7
- useEffect(() => {
8
- const mediaQuery = window.matchMedia("(max-width: 600px)")
9
- setIsSmallScreen(mediaQuery.matches)
10
- const handler = (e) => setIsSmallScreen(e.matches)
11
- mediaQuery.addEventListener('change', handler)
12
- return () => mediaQuery.removeEventListener('change', handler)
13
- }, [])
14
5
 
15
6
  return (
16
- <div>
17
- <Button id='menuButton'
18
- padding='xs'
7
+ <>
8
+ <Button id="menuButton"
9
+ padding="sm"
19
10
  >
20
- <Icon icon='bars'
21
- size='2x'
11
+ <Icon icon="bars"
12
+ size="3x"
22
13
  />
23
14
  </Button>
24
15
  <Drawer
25
- breakpoint="md"
26
- placement='bottom'
27
- size='full'
28
- triggerId='menuButton'
16
+ behavior="push"
17
+ closeBreakpoint="md"
18
+ menuButtonID="menuButton"
19
+ overlay={false}
20
+ placement="left"
21
+ size="lg"
29
22
  withinElement
30
23
  >
31
- <Nav
32
- highlight={false}
33
- link='#'
34
- orientation={isSmallScreen ? 'vertical' : 'horizontal'}
35
- padding={isSmallScreen ? 'none' : 'sm'}
36
- >
37
- <NavItem link='#'
38
- text='About'
39
- />
40
- <NavItem active
41
- link='#'
42
- text='Case Studies'
43
- />
44
- <NavItem link='#'
45
- text='Service'
46
- />
47
- <NavItem link='#'
48
- text='Contacts'
49
- />
50
- </Nav>
24
+ <Title paddingBottom="md">A really neat menu</Title>
25
+ <Button text="This Button does nothing" />
51
26
  </Drawer>
52
- </div>
53
- )
54
- }
27
+ </>
28
+ );
29
+ };
55
30
 
56
- export default DrawerMenu
31
+ export default DrawerMenu;
@@ -1,24 +1,6 @@
1
- The Drawer component can be used to create responsive navigation menus and sidebars. It provides flexible options for controlling when and how the drawer appears based on screen size.
2
-
3
- ### Within Element
4
- The `withinElement` prop allows you to render the drawer within its parent container:
5
- - The drawer will be positioned relative to its parent element
6
- - Useful for creating nested navigation structures
7
- - This must be used in conjunction with the `triggerId` prop
8
-
9
- This provides a clean way to create responsive navigation patterns that adapt to different screen sizes while maintaining a consistent user experience.
10
-
11
- ### Trigger Id
12
- The `triggerId` prop allows you to connect an element to control the drawer:
13
- - The specified element will toggle the drawer open/closed
14
- - The element is automatically hidden when the drawer is opened via breakpoint
15
- - The element reappears when the drawer is closed via breakpoint
16
-
17
- ### Breakpoint
18
- Use the `breakpoint` prop to control when the drawer automatically opens or closes based on screen size. For example, setting `breakpoint="md"` will:
19
- - Close the drawer on screens smaller than the medium breakpoint (992px)
20
- - Automatically open the drawer on screens larger than or equal to the medium breakpoint
21
-
1
+ Our drawer kit can fulfill your responsive menu needs! Using the `closeBreakpoint` prop you can have the menu close on smaller screens like phones/tablets.
22
2
 
3
+ Set a menu button with the `menuButtonID` props. When the Drawer is open, the menu button will be hidden. But when your Brakpoint closes the drawer, you can toggle the Drawer open/close with your menu butotn.
23
4
 
5
+ Also use the `withinElement` props to have the Drawer open within a specific element, instead of the default behavior of it taking up the entire screen size.
24
6
 
@@ -1,25 +1,24 @@
1
- import React, { useState } from "react"
2
- import { Button, Drawer, Flex } from "playbook-ui"
1
+ import React, { useState } from "react";
2
+ import { Button, Drawer, Flex } from "playbook-ui";
3
3
 
4
4
  const DrawerSizes = () => {
5
5
  // Individual state variables for each drawer size
6
- const [openedNoOverlayDrawer, setOpenedNoOverlayDrawer] = useState(false)
7
- const [openedOverlayDrawer, setOpenedOverlayDrawer] = useState(false)
6
+ const [openedNoOverlayDrawer, setOpenedNoOverlayDrawer] = useState(false);
7
+ const [openedOverlayDrawer, setOpenedOverlayDrawer] = useState(false);
8
8
 
9
9
  // Toggle functions for each drawer
10
- const toggleNoOverlayDrawer = () =>
11
- setOpenedNoOverlayDrawer(!openedNoOverlayDrawer)
12
- const toggleOverlayDrawer = () => setOpenedOverlayDrawer(!openedOverlayDrawer)
10
+ const toggleNoOverlayDrawer = () => setOpenedNoOverlayDrawer(!openedNoOverlayDrawer);
11
+ const toggleOverlayDrawer = () => setOpenedOverlayDrawer(!openedOverlayDrawer);
13
12
 
14
13
  return (
15
14
  <>
16
15
  <Flex wrap>
17
- <Button marginRight='md'
16
+ <Button marginRight="md"
18
17
  onClick={toggleNoOverlayDrawer}
19
18
  >
20
19
  No Overlay Drawer
21
20
  </Button>
22
- <Button marginRight='md'
21
+ <Button marginRight="md"
23
22
  onClick={toggleOverlayDrawer}
24
23
  >
25
24
  Overlay Drawer
@@ -28,23 +27,29 @@ const DrawerSizes = () => {
28
27
 
29
28
  {/* Drawers for each size */}
30
29
  <Drawer
30
+ behavior="push"
31
+ fullHeight
31
32
  onClose={toggleNoOverlayDrawer}
32
33
  opened={openedNoOverlayDrawer}
33
34
  overlay={false}
34
- size='lg'
35
+ placement="right"
36
+ size="lg"
35
37
  >
36
38
  This is a Drawer with no overlay
37
39
  </Drawer>
38
40
  <Drawer
41
+ behavior="push"
42
+ fullHeight
39
43
  onClose={toggleOverlayDrawer}
40
44
  opened={openedOverlayDrawer}
41
- placement='right'
42
- size='lg'
45
+ overlay
46
+ placement="right"
47
+ size="lg"
43
48
  >
44
- This is a Drawer with an overlay
49
+ This is a Drawer with an overlay
45
50
  </Drawer>
46
51
  </>
47
- )
48
- }
52
+ );
53
+ };
49
54
 
50
- export default DrawerSizes
55
+ export default DrawerSizes;
@@ -19,8 +19,7 @@ const DrawerSizes = () => {
19
19
  return (
20
20
  <>
21
21
  <Flex wrap>
22
- <Button
23
- marginRight="md"
22
+ <Button marginRight="md"
24
23
  onClick={toggleXsDrawer}
25
24
  >
26
25
  XS Drawer
@@ -49,8 +48,11 @@ const DrawerSizes = () => {
49
48
 
50
49
  {/* Drawers for each size */}
51
50
  <Drawer
51
+ behavior="push"
52
+ fullHeight
52
53
  onClose={toggleXsDrawer}
53
54
  opened={openedXsDrawer}
55
+ overlay
54
56
  placement="right"
55
57
  size="xs"
56
58
  >
@@ -58,32 +60,47 @@ const DrawerSizes = () => {
58
60
  </Drawer>
59
61
 
60
62
  <Drawer
63
+ behavior="push"
64
+ fullHeight
61
65
  onClose={toggleSmDrawer}
62
66
  opened={openedSmDrawer}
67
+ overlay
68
+ placement="right"
63
69
  size="sm"
64
70
  >
65
71
  This is an SM Drawer
66
72
  </Drawer>
67
73
 
68
74
  <Drawer
75
+ behavior="push"
76
+ fullHeight
69
77
  onClose={toggleMdDrawer}
70
78
  opened={openedMdDrawer}
79
+ overlay
71
80
  placement="right"
81
+ size="md"
72
82
  >
73
83
  This is an MD Drawer
74
84
  </Drawer>
75
85
 
76
86
  <Drawer
87
+ behavior="push"
88
+ fullHeight
77
89
  onClose={toggleLgDrawer}
78
90
  opened={openedLgDrawer}
91
+ overlay
92
+ placement="right"
79
93
  size="lg"
80
94
  >
81
95
  This is an LG Drawer
82
96
  </Drawer>
83
97
 
84
98
  <Drawer
99
+ behavior="push"
100
+ fullHeight
85
101
  onClose={toggleXlDrawer}
86
102
  opened={openedXlDrawer}
103
+ overlay
87
104
  placement="right"
88
105
  size="xl"
89
106
  >
@@ -6,8 +6,7 @@ examples:
6
6
 
7
7
  react:
8
8
  - drawer_default: Default
9
- - drawer_behavior: Push Behavior
10
- - drawer_menu: Within Element
9
+ - drawer_menu: Menu Behavior
11
10
  - drawer_sizes: Sizes
12
11
  - drawer_overlay: Overlay
13
12
  - drawer_borders: Borders
@@ -4,4 +4,3 @@ export { default as DrawerOverlay } from './_drawer_overlay.jsx'
4
4
  export { default as DrawerBorders } from './_drawer_borders.jsx'
5
5
  export { default as DrawerBreakpoints } from './_drawer_breakpoints.jsx'
6
6
  export { default as DrawerMenu } from './_drawer_menu.jsx'
7
- export { default as DrawerBehavior } from './_drawer_behavior.jsx'
@@ -39,7 +39,7 @@ test('renders with the right border class when border prop is right', async () =
39
39
  const container = document.getElementById('drawer-id');
40
40
  const drawer = container.querySelector('#drawer-id .pb_drawer');
41
41
 
42
- expect(drawer).toHaveClass('drawer_border-right');
42
+ expect(drawer).toHaveClass('drawer_border_right');
43
43
  });
44
44
 
45
45
  test('renders with the full border class when border prop is full', async () => {
@@ -51,7 +51,7 @@ test('renders with the full border class when border prop is full', async () =>
51
51
 
52
52
  const container = document.getElementById('drawer-id');
53
53
  const drawer = container.querySelector('#drawer-id .pb_drawer');
54
- expect(drawer).toHaveClass('drawer_border-full');
54
+ expect(drawer).toHaveClass('drawer_border_full');
55
55
  });
56
56
 
57
57
  test('does not have a border class when border prop is none', async () => {
@@ -63,9 +63,9 @@ test('does not have a border class when border prop is none', async () => {
63
63
 
64
64
  const container = document.getElementById('drawer-id');
65
65
  const drawer = container.querySelector('#drawer-id .pb_drawer');
66
- expect(drawer).not.toHaveClass('drawer_border-right');
67
- expect(drawer).not.toHaveClass('drawer_border-left');
68
- expect(drawer).not.toHaveClass('drawer_border-full');
66
+ expect(drawer).not.toHaveClass('drawer_border_right');
67
+ expect(drawer).not.toHaveClass('drawer_border_left');
68
+ expect(drawer).not.toHaveClass('drawer_border_full');
69
69
  });
70
70
 
71
71
  test('renders the correct size class for a large drawer', async () => {
@@ -1 +1 @@
1
- For the `subtle` variant, it is recommended that you set the `Separators` prop to `false` to remove the separator lines between the options for a cleaner look.
1
+ For the `subtle` variant, it is recommended that you set the `Separators` prop to `false` to remove the separator lines between the options for a more cleaner look.
@@ -1,14 +1,19 @@
1
- <%= pb_content_tag do %>
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 %>
2
7
  <% if object.label.present? %>
3
8
  <%= pb_rails("caption", props: {text: object.label, margin_bottom:"xs"}) %>
4
9
  <% end %>
5
10
  <div class="dropdown_wrapper<%= error_class %>" style="position: relative">
6
- <input
7
- data-default-value="<%= input_default_value %>"
8
- id="dropdown-selected-option"
9
- name="<%= object.name %>"
10
- style="display: none"
11
- <%= object.required ? "required" : ""%>
11
+ <input
12
+ data-default-value="<%= input_default_value %>"
13
+ id="dropdown-selected-option"
14
+ name="<%= object.name %>"
15
+ style="display: none"
16
+ <%= object.required ? "required" : ""%>
12
17
  />
13
18
  <% if content.present? %>
14
19
  <%= content.presence %>
@@ -1,15 +1,20 @@
1
- <%= pb_content_tag do %>
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 %>
2
7
  <%= pb_rails("list", props: {ordered: false, borderless: false}) do %>
3
- <% if content.present? %>
8
+ <% if content.present? %>
4
9
  <%= content.presence %>
5
- <% else %>
10
+ <% else %>
6
11
  <%= pb_rails("list/item", props: {
7
- display: "flex",
8
- justify_content: "center",
9
- padding:"xs",
10
- }) do %>
12
+ display: "flex",
13
+ justify_content: "center",
14
+ padding:"xs",
15
+ }) do %>
11
16
  <%= pb_rails("body", props: {text: "No option"}) %>
12
17
  <% end %>
13
18
  <% end %>
14
- <% end %>
15
- <% end %>
19
+ <% end %>
20
+ <% end %>
@@ -1,10 +1,15 @@
1
- <%= pb_content_tag(:div, id: object.option[:id]) do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.option[:id],
6
+ **combined_html_options) do %>
2
7
  <%= pb_rails("list/item", props: {
3
- display: "flex",
4
- justify_content: "center",
5
- padding:"none",
8
+ display: "flex",
9
+ justify_content: "center",
10
+ padding:"none",
6
11
  cursor: "pointer"
7
- }) do %>
12
+ }) do %>
8
13
  <div class="dropdown_option_wrapper">
9
14
  <% if content.present? %>
10
15
  <%= content.presence %>
@@ -13,4 +18,4 @@
13
18
  <% end %>
14
19
  </div>
15
20
  <% end %>
16
- <% end %>
21
+ <% end %>
@@ -1,16 +1,21 @@
1
- <%= pb_content_tag do %>
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 %>
2
7
  <% if content.present? %>
3
8
  <div style="display: inline-block" tabindex="0" data-dropdown-custom-trigger>
4
9
  <%= content.presence %>
5
10
  </div>
6
11
  <% else %>
7
12
  <%= pb_rails("flex", props: {
8
- align: "center",
9
- border_radius:"lg",
10
- classname: object.trigger_wrapper_classes,
11
- cursor: "pointer",
12
- justify: "between",
13
- padding_x:"sm",
13
+ align: "center",
14
+ border_radius:"lg",
15
+ classname: object.trigger_wrapper_classes,
16
+ cursor: "pointer",
17
+ justify: "between",
18
+ padding_x:"sm",
14
19
  padding_y:"xs",
15
20
  html_options: {tabindex:"0"}
16
21
  }) do %>
@@ -18,7 +23,7 @@
18
23
  <%= pb_rails("flex", props: {align: "center"}) do %>
19
24
  <% if object.custom_display.present? %>
20
25
  <%= pb_rails("flex", props: {align: "center"}) do %>
21
- <div id="dropdown_trigger_custom_display" style="display: none;">
26
+ <div id="dropdown_trigger_custom_display" style="display: none;">
22
27
  <%= object.custom_display %>
23
28
  </div>
24
29
  <%= pb_rails("body", props: {text: object.default_display_placeholder, id: "dropdown_trigger_display"}) %>
@@ -35,3 +40,4 @@
35
40
  <% end %>
36
41
  <% end %>
37
42
  <% end %>
43
+
@@ -1,32 +1,10 @@
1
- <% if object.draggable? %>
2
- <%= pb_rails("draggable/draggable_item", props:{drag_id: object.drag_id}) do %>
3
- <%= content_tag(:li,
4
- aria: object.aria,
5
- class: object.classname,
6
- data: object.data,
7
- id: object.id,
8
- tabindex: object.tabindex,
9
- **combined_html_options
10
- ) do %>
11
- <% if object.drag_handle %>
12
- <span style="vertical-align: middle;">
13
- <%= pb_rails("body") do %>
14
- <svg width="auto" height="auto" viewBox="0 0 31 25" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="pb_custom_icon svg-inline--fa vertical_align_middle svg_fw"><path d="M12.904 6.355a1.48 1.48 0 01-1.5-1.5c0-.796.656-1.5 1.5-1.5.797 0 1.5.704 1.5 1.5 0 .844-.703 1.5-1.5 1.5zm0 7.5a1.48 1.48 0 01-1.5-1.5c0-.796.656-1.5 1.5-1.5.797 0 1.5.704 1.5 1.5 0 .844-.703 1.5-1.5 1.5zm1.5 6c0 .844-.703 1.5-1.5 1.5a1.48 1.48 0 01-1.5-1.5c0-.796.656-1.5 1.5-1.5.797 0 1.5.704 1.5 1.5zm4.5-13.5a1.48 1.48 0 01-1.5-1.5c0-.796.657-1.5 1.5-1.5.797 0 1.5.704 1.5 1.5 0 .844-.703 1.5-1.5 1.5zm1.5 6c0 .844-.703 1.5-1.5 1.5a1.48 1.48 0 01-1.5-1.5c0-.796.657-1.5 1.5-1.5.797 0 1.5.704 1.5 1.5zm-1.5 9a1.48 1.48 0 01-1.5-1.5c0-.796.657-1.5 1.5-1.5.797 0 1.5.704 1.5 1.5 0 .844-.703 1.5-1.5 1.5z" fill="#242B42"></path></svg>
15
- <% end %>
16
- </span>
17
- <% end %>
18
- <%= content.presence %>
19
- <% end %>
20
- <% end %>
21
- <% else %>
22
- <%= content_tag(:li,
23
- aria: object.aria,
24
- class: object.classname,
25
- data: object.data,
26
- id: object.id,
27
- tabindex: object.tabindex,
28
- **combined_html_options
29
- ) do %>
1
+ <%= content_tag(:li,
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id,
6
+ tabindex: object.tabindex,
7
+ **combined_html_options
8
+ ) do %>
30
9
  <%= content.presence %>
31
- <% end %>
32
10
  <% end %>
@@ -3,18 +3,11 @@
3
3
  module Playbook
4
4
  module PbList
5
5
  class Item < Playbook::KitBase
6
- prop :drag_handle, type: Playbook::Props::Boolean,
7
- default: true
8
- prop :drag_id, type: Playbook::Props::String
9
6
  prop :tabindex
10
7
 
11
8
  def classname
12
9
  generate_classname("pb_item_kit")
13
10
  end
14
-
15
- def draggable?
16
- drag_id.present?
17
- end
18
11
  end
19
12
  end
20
13
  end
@@ -1,33 +1,13 @@
1
- <% if object.enable_drag %>
2
- <%= pb_rails("draggable", props: {initial_items: object.items}) do %>
3
- <%= pb_rails("draggable/draggable_container") do %>
4
- <%= content_tag(:div, class: object.list_classname) do %>
5
- <%= content_tag(:"#{object.ordered_class}",
6
- aria: object.aria,
7
- class: object.classname,
8
- data: object.data,
9
- id: object.id,
10
- role: object.role,
11
- tabindex: object.tabindex,
12
- **combined_html_options
13
- ) do %>
14
- <%= content.presence %>
15
- <% end %>
16
- <% end %>
17
- <% end %>
18
- <% end %>
19
- <% else %>
20
- <%= content_tag(:div, class: object.list_classname) do %>
21
- <%= content_tag(:"#{object.ordered_class}",
22
- aria: object.aria,
23
- class: object.classname,
24
- data: object.data,
25
- id: object.id,
26
- role: object.role,
27
- tabindex: object.tabindex,
28
- **combined_html_options
29
- ) do %>
30
- <%= content.presence %>
31
- <% end %>
1
+ <%= content_tag(:div, class: object.list_classname) do %>
2
+ <%= content_tag(:"#{object.ordered_class}",
3
+ aria: object.aria,
4
+ class: object.classname,
5
+ data: object.data,
6
+ id: object.id,
7
+ role: object.role,
8
+ tabindex: object.tabindex,
9
+ **combined_html_options
10
+ ) do %>
11
+ <%= content.presence %>
32
12
  <% end %>
33
13
  <% end %>
@@ -7,10 +7,6 @@ module Playbook
7
7
  default: false
8
8
  prop :dark, type: Playbook::Props::Boolean,
9
9
  default: false
10
- prop :enable_drag, type: Playbook::Props::Boolean,
11
- default: false
12
- prop :items, type: Playbook::Props::Array,
13
- default: []
14
10
  prop :layout, type: Playbook::Props::Enum,
15
11
  values: ["left", "right", ""],
16
12
  default: ""
@@ -12,7 +12,6 @@ type LoadingInlineProps = {
12
12
  aria?: { [key: string]: string },
13
13
  className?: string,
14
14
  data?: { [key: string]: string },
15
- dark?: boolean,
16
15
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
17
16
  id?: string,
18
17
  text?: string,
@@ -24,7 +23,6 @@ const LoadingInline = (props: LoadingInlineProps) => {
24
23
  aria = {},
25
24
  className,
26
25
  data = {},
27
- dark = false,
28
26
  htmlOptions = {},
29
27
  id,
30
28
  text = ' Loading',
@@ -47,10 +45,7 @@ const LoadingInline = (props: LoadingInlineProps) => {
47
45
  className={classes}
48
46
  id={id}
49
47
  >
50
- <Body
51
- color="light"
52
- dark={dark}
53
- >
48
+ <Body color="light">
54
49
  <Icon
55
50
  aria={{ label: 'loading icon' }}
56
51
  fixedWidth
@@ -24,10 +24,6 @@ $pb_multiple_users_size_xxs: map-get($avatar-sizes, "xxs");
24
24
  color: $primary;
25
25
  font-weight: $bold;
26
26
  font-size: $font_smallest - 1;
27
-
28
- &.dark {
29
- border: $pb_multiple_users_border_size solid $bg_dark;
30
- }
31
27
  }
32
28
 
33
29
  .multiple_users_badge_xxs {
@@ -50,7 +50,6 @@ const MultipleUsers = (props: MultipleUsersProps): React.ReactElement => {
50
50
 
51
51
  const itemClasses = classnames(
52
52
  'pb_multiple_users_item',
53
- dark && 'dark',
54
53
  buildCss('multiple_users_badge', avatarSizeClass)
55
54
  )
56
55
 
@@ -4,7 +4,7 @@
4
4
  <% end %>
5
5
 
6
6
  <% if object.more_than_four %>
7
- <div class="pb_multiple_users_item multiple_users_badge_<%= object.size %><%= object.dark ? " dark" : "" %>">
7
+ <div class="pb_multiple_users_item multiple_users_badge_<%= object.size %>">
8
8
  <%= "+#{object.users.count - object.display_count}" %>
9
9
  </div>
10
10
  <% end %>