playbook_ui 14.12.0.pre.alpha.testingwithfas5689 → 14.12.0.pre.rc.0

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.
Files changed (179) 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/advanced_table.html.erb +8 -13
  10. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +1 -3
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -1
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +0 -1
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.md +2 -2
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -7
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -6
  16. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +3 -15
  17. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +11 -11
  18. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +3 -12
  19. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -1
  20. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +1 -7
  21. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +1 -1
  22. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +0 -9
  23. data/app/pb_kits/playbook/pb_button/button.html.erb +3 -2
  24. data/app/pb_kits/playbook/pb_button/button.rb +1 -1
  25. data/app/pb_kits/playbook/pb_card/card.html.erb +2 -21
  26. data/app/pb_kits/playbook/pb_card/card.rb +0 -7
  27. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +6 -1
  28. data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +1 -1
  29. data/app/pb_kits/playbook/pb_collapsible/collapsible.html.erb +1 -3
  30. data/app/pb_kits/playbook/pb_collapsible/collapsible.rb +0 -3
  31. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +16 -24
  32. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +0 -2
  33. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +2 -2
  34. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +1 -1
  35. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -1
  36. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb +3 -1
  37. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md +0 -7
  38. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb +9 -3
  39. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -1
  40. data/app/pb_kits/playbook/pb_drawer/_drawer.scss +183 -145
  41. data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +268 -158
  42. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +45 -3
  43. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +1 -0
  44. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +16 -9
  45. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +19 -44
  46. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +3 -21
  47. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +21 -16
  48. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +19 -2
  49. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -2
  50. data/app/pb_kits/playbook/pb_drawer/docs/index.js +0 -1
  51. data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +5 -5
  52. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +1 -1
  53. data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +12 -7
  54. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +14 -9
  55. data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +11 -6
  56. data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb +14 -8
  57. data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
  58. data/app/pb_kits/playbook/pb_icon/icon.rb +2 -2
  59. data/app/pb_kits/playbook/pb_icon/icon.test.js +8 -8
  60. data/app/pb_kits/playbook/pb_list/item.html.erb +8 -30
  61. data/app/pb_kits/playbook/pb_list/item.rb +0 -7
  62. data/app/pb_kits/playbook/pb_list/list.html.erb +11 -31
  63. data/app/pb_kits/playbook/pb_list/list.rb +0 -4
  64. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -6
  65. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +0 -4
  66. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +0 -1
  67. data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +1 -1
  68. data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +2 -2
  69. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +12 -30
  70. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +1 -3
  71. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
  72. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -3
  73. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +1 -20
  74. data/app/pb_kits/playbook/pb_radio/_radio.scss +8 -12
  75. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.jsx +3 -8
  76. data/app/pb_kits/playbook/pb_select/_select.scss +5 -3
  77. data/app/pb_kits/playbook/pb_select/_select.tsx +1 -5
  78. data/app/pb_kits/playbook/pb_select/select.html.erb +2 -2
  79. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +1 -9
  80. data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx +1 -4
  81. data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx +1 -4
  82. data/app/pb_kits/playbook/pb_selectable_list/selectable_list.html.erb +3 -17
  83. data/app/pb_kits/playbook/pb_selectable_list/selectable_list.rb +0 -3
  84. data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +4 -11
  85. data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.rb +0 -3
  86. data/app/pb_kits/playbook/pb_table/_table.tsx +3 -2
  87. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +2 -2
  88. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +8 -12
  89. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -6
  90. data/app/pb_kits/playbook/pb_table/index.ts +88 -187
  91. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +0 -12
  92. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +5 -6
  93. data/app/pb_kits/playbook/pb_table/table.html.erb +1 -1
  94. data/app/pb_kits/playbook/pb_table/table.rb +2 -17
  95. data/app/pb_kits/playbook/pb_table/table_row.html.erb +1 -20
  96. data/app/pb_kits/playbook/pb_table/table_row.rb +0 -5
  97. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +1 -2
  98. data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +0 -4
  99. data/app/pb_kits/playbook/pb_text_input/text_input.rb +3 -33
  100. data/app/pb_kits/playbook/pb_timeline/_timeline.scss +30 -30
  101. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +2 -3
  102. data/app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.tsx +4 -12
  103. data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +1 -5
  104. data/app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.tsx +3 -8
  105. data/app/pb_kits/playbook/pb_typeahead/components/MenuList.tsx +1 -6
  106. data/app/pb_kits/playbook/pb_typeahead/components/Option.tsx +6 -21
  107. data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.tsx +6 -13
  108. data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx +3 -7
  109. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +0 -2
  110. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +2 -4
  111. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_custom_options.jsx +5 -5
  112. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
  113. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
  114. data/dist/chunks/_typeahead-C2iCBqxQ.js +36 -0
  115. data/dist/chunks/_weekday_stacked-CWnbnW7m.js +45 -0
  116. data/dist/chunks/{lib-RmkltInK.js → lib-B7sgJtGS.js} +2 -2
  117. data/dist/chunks/{pb_form_validation-Bu-zi4X-.js → pb_form_validation-C5Cc0-1v.js} +1 -1
  118. data/dist/chunks/vendor.js +1 -1
  119. data/dist/menu.yml +0 -6
  120. data/dist/playbook-doc.js +1 -1
  121. data/dist/playbook-rails-react-bindings.js +1 -1
  122. data/dist/playbook-rails.js +1 -1
  123. data/dist/playbook.css +1 -1
  124. data/lib/playbook/version.rb +2 -2
  125. metadata +11 -75
  126. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.jsx +0 -50
  127. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb +0 -38
  128. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx +0 -60
  129. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.md +0 -5
  130. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx +0 -78
  131. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.md +0 -1
  132. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.jsx +0 -53
  133. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.md +0 -1
  134. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.jsx +0 -52
  135. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.md +0 -1
  136. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +0 -33
  137. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +0 -1
  138. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json +0 -42
  139. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_with_id.json +0 -299
  140. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames.html.erb +0 -13
  141. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames_rails.md +0 -3
  142. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md +0 -5
  143. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb +0 -38
  144. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md +0 -3
  145. data/app/pb_kits/playbook/pb_drawer/context.ts +0 -11
  146. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx +0 -38
  147. data/app/pb_kits/playbook/pb_drawer/hooks/useBreakpoint.tsx +0 -60
  148. data/app/pb_kits/playbook/pb_drawer/hooks/useDrawerAnimation.tsx +0 -21
  149. data/app/pb_kits/playbook/pb_icon_button/_icon_button.scss +0 -78
  150. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +0 -3
  151. data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +0 -7
  152. data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +0 -16
  153. data/app/pb_kits/playbook/pb_icon_button/icon_button.rb +0 -22
  154. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.html.erb +0 -15
  155. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx +0 -24
  156. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.md +0 -1
  157. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.html.erb +0 -74
  158. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_rails.md +0 -3
  159. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.html.erb +0 -74
  160. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_rails.md +0 -3
  161. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.html.erb +0 -47
  162. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_rails.md +0 -2
  163. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.html.erb +0 -52
  164. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.md +0 -0
  165. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.html.erb +0 -52
  166. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +0 -3
  167. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.html.erb +0 -80
  168. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +0 -1
  169. data/app/pb_kits/playbook/pb_table/utilities/addDataTitle.ts +0 -22
  170. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +0 -46
  171. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask_rails.md +0 -3
  172. data/app/pb_kits/playbook/pb_text_input/index.js +0 -103
  173. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb +0 -19
  174. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.jsx +0 -27
  175. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md +0 -1
  176. data/dist/chunks/_typeahead-BDhvNf6A.js +0 -36
  177. data/dist/chunks/_weekday_stacked-BhU_44Uo.js +0 -45
  178. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_table_props_react.md → _advanced_table_table_props.md} +0 -0
  179. /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
+
@@ -137,7 +137,7 @@ const Icon = (props: IconProps) => {
137
137
  pulse = false,
138
138
  rotation,
139
139
  size,
140
- fontStyle = 'fas',
140
+ fontStyle = 'far',
141
141
  spin = false,
142
142
  tabIndex,
143
143
  } = props
@@ -33,7 +33,7 @@ module Playbook
33
33
  default: nil
34
34
  prop :font_style, type: Playbook::Props::Enum,
35
35
  values: %w[far fas fab fak],
36
- default: "fas"
36
+ default: "far"
37
37
  prop :spin, type: Playbook::Props::Boolean,
38
38
  default: false
39
39
  prop :color, type: Playbook::Props::String
@@ -207,7 +207,7 @@ module Playbook
207
207
  end
208
208
 
209
209
  def font_style_class
210
- font_style ? font_style.to_s : "fas"
210
+ font_style ? font_style.to_s : "far"
211
211
  end
212
212
 
213
213
  def spin_class
@@ -16,7 +16,7 @@ describe("Icon Kit", () => {
16
16
  )
17
17
 
18
18
  const kit = screen.getByTestId(testId)
19
- expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw fas")
19
+ expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw far")
20
20
  })
21
21
 
22
22
  test("renders rotate prop", () => {[
@@ -31,7 +31,7 @@ describe("Icon Kit", () => {
31
31
  )
32
32
 
33
33
  const kit = screen.getByTestId(testId)
34
- expect(kit).toHaveClass(`fa-user pb_icon_kit fa-fw fa-rotate-${rotateProp} fas`)
34
+ expect(kit).toHaveClass(`fa-user pb_icon_kit fa-fw fa-rotate-${rotateProp} far`)
35
35
 
36
36
  cleanup()
37
37
  })
@@ -48,7 +48,7 @@ describe("Icon Kit", () => {
48
48
  )
49
49
 
50
50
  const kit = screen.getByTestId(testId)
51
- expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw fa-flip-horizontal fas")
51
+ expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw fa-flip-horizontal far")
52
52
  })
53
53
 
54
54
 
@@ -63,7 +63,7 @@ describe("Icon Kit", () => {
63
63
  )
64
64
 
65
65
  const kit = screen.getByTestId(testId)
66
- expect(kit).toHaveClass("fa-spinner pb_icon_kit fa-fw fa-spin fas")
66
+ expect(kit).toHaveClass("fa-spinner pb_icon_kit fa-fw fa-spin far")
67
67
  })
68
68
 
69
69
  test("renders pull icon", () => {
@@ -77,7 +77,7 @@ describe("Icon Kit", () => {
77
77
  )
78
78
 
79
79
  const kit = screen.getByTestId(testId)
80
- expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left fas")
80
+ expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left far")
81
81
  })
82
82
 
83
83
  test("renders pull icon", () => {
@@ -91,7 +91,7 @@ describe("Icon Kit", () => {
91
91
  )
92
92
 
93
93
  const kit = screen.getByTestId(testId)
94
- expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left fas")
94
+ expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left far")
95
95
  })
96
96
 
97
97
  test("renders border around icon", () => {
@@ -105,7 +105,7 @@ describe("Icon Kit", () => {
105
105
  )
106
106
 
107
107
  const kit = screen.getByTestId(testId)
108
- expect(kit).toHaveClass("fa-user pb_icon_kit fa-border fa-fw fas")
108
+ expect(kit).toHaveClass("fa-user pb_icon_kit fa-border fa-fw far")
109
109
  })
110
110
 
111
111
  test("renders size prop", () => {
@@ -132,7 +132,7 @@ describe("Icon Kit", () => {
132
132
  )
133
133
 
134
134
  const kit = screen.getByTestId(testId)
135
- expect(kit).toHaveClass(`pb_icon_kit fa-user fa-fw fa-${sizeProp} fas`)
135
+ expect(kit).toHaveClass(`pb_icon_kit fa-user fa-fw fa-${sizeProp} far`)
136
136
 
137
137
  cleanup()
138
138
  })
@@ -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: ""