playbook_ui 13.27.0.pre.alpha.testingcollapsible2917 → 13.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_avatar/Utilities/GetPlacementPropsHelper.tsx +0 -16
  3. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -16
  4. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +1 -1
  5. data/app/pb_kits/playbook/pb_avatar/avatar.rb +0 -4
  6. data/app/pb_kits/playbook/pb_avatar/avatar.test.js +0 -47
  7. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.html.erb +66 -46
  8. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +29 -8
  9. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.html.erb +33 -13
  10. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +67 -48
  11. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_default.jsx +20 -0
  12. data/app/pb_kits/playbook/pb_avatar/docs/example.yml +2 -2
  13. data/app/pb_kits/playbook/pb_body/_body.scss +0 -3
  14. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +1 -1
  15. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +3 -3
  16. data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -1
  17. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +0 -5
  18. data/app/pb_kits/playbook/pb_card/card.rb +1 -1
  19. data/app/pb_kits/playbook/pb_card/docs/_card_background.html.erb +0 -20
  20. data/app/pb_kits/playbook/pb_card/docs/_card_background.jsx +1 -41
  21. data/app/pb_kits/playbook/pb_card/docs/_card_background.md +1 -1
  22. data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +1 -1
  23. data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
  24. data/app/pb_kits/playbook/pb_card/docs/_card_highlight.md +1 -1
  25. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +10 -21
  26. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +75 -3
  27. data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +0 -3
  28. data/app/pb_kits/playbook/pb_collapsible/docs/index.js +1 -2
  29. data/app/pb_kits/playbook/pb_collapsible/index.js +6 -16
  30. data/app/pb_kits/playbook/pb_detail/_detail_mixins.scss +1 -1
  31. data/app/pb_kits/playbook/pb_docs/kit_example.html.erb +3 -3
  32. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +1 -2
  33. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +2 -4
  34. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb +3 -3
  35. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md +1 -1
  36. data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_subcomponent_structure_rails.html.erb → _dropdown_subcomponent_structure.html.erb} +3 -3
  37. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md +6 -5
  38. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md +3 -3
  39. data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_options_rails.html.erb → _dropdown_with_custom_options.html.erb} +3 -3
  40. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.md +1 -1
  41. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.html.erb +3 -3
  42. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md +1 -1
  43. data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_trigger_rails.html.erb → _dropdown_with_custom_trigger.html.erb} +3 -3
  44. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.md +1 -1
  45. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb +3 -3
  46. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.md +1 -1
  47. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +6 -6
  48. data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +0 -1
  49. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +0 -1
  50. data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +1 -1
  51. data/app/pb_kits/playbook/pb_dropdown/dropdown_option.rb +1 -1
  52. data/app/pb_kits/playbook/pb_dropdown/index.js +1 -2
  53. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +2 -4
  54. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +0 -15
  55. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +0 -8
  56. data/app/pb_kits/playbook/pb_title/_title.scss +1 -5
  57. data/app/pb_kits/playbook/tokens/_titles.scss +1 -5
  58. data/dist/menu.yml +2 -2
  59. data/dist/playbook-rails.js +2 -2
  60. data/lib/playbook/version.rb +2 -2
  61. metadata +9 -22
  62. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.md +0 -3
  63. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.md +0 -3
  64. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleIcon.tsx +0 -92
  65. data/app/pb_kits/playbook/pb_collapsible/collapsible_icon.html.erb +0 -15
  66. data/app/pb_kits/playbook/pb_collapsible/collapsible_icon.rb +0 -37
  67. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx +0 -73
  68. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.md +0 -5
  69. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.html.erb +0 -20
  70. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.md +0 -5
  71. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.md +0 -6
  72. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md +0 -5
  73. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.md +0 -1
  74. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.md +0 -1
  75. /data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_display_rails.html.erb → _dropdown_with_custom_display.html.erb} +0 -0
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "13.27.0"
5
- VERSION = "13.27.0.pre.alpha.testingcollapsible2917"
4
+ PREVIOUS_VERSION = "13.26.0"
5
+ VERSION = "13.27.0"
6
6
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.27.0.pre.alpha.testingcollapsible2917
4
+ version: 13.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
8
8
  - Power Devs
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-05-16 00:00:00.000000000 Z
12
+ date: 2024-05-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -305,10 +305,8 @@ files:
305
305
  - app/pb_kits/playbook/pb_avatar/avatar.test.js
306
306
  - app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.html.erb
307
307
  - app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx
308
- - app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.md
309
308
  - app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.html.erb
310
309
  - app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx
311
- - app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.md
312
310
  - app/pb_kits/playbook/pb_avatar/docs/_avatar_default.html.erb
313
311
  - app/pb_kits/playbook/pb_avatar/docs/_avatar_default.jsx
314
312
  - app/pb_kits/playbook/pb_avatar/docs/_avatar_default_swift.md
@@ -673,15 +671,12 @@ files:
673
671
  - app/pb_kits/playbook/pb_collapsible/_collapsible.tsx
674
672
  - app/pb_kits/playbook/pb_collapsible/_helper_functions.ts
675
673
  - app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx
676
- - app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleIcon.tsx
677
674
  - app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx
678
675
  - app/pb_kits/playbook/pb_collapsible/collapsible.html.erb
679
676
  - app/pb_kits/playbook/pb_collapsible/collapsible.rb
680
677
  - app/pb_kits/playbook/pb_collapsible/collapsible.test.js
681
678
  - app/pb_kits/playbook/pb_collapsible/collapsible_content.html.erb
682
679
  - app/pb_kits/playbook/pb_collapsible/collapsible_content.rb
683
- - app/pb_kits/playbook/pb_collapsible/collapsible_icon.html.erb
684
- - app/pb_kits/playbook/pb_collapsible/collapsible_icon.rb
685
680
  - app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb
686
681
  - app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
687
682
  - app/pb_kits/playbook/pb_collapsible/context.ts
@@ -689,10 +684,6 @@ files:
689
684
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_color.jsx
690
685
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_color.md
691
686
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_colors_swift.md
692
- - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
693
- - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.md
694
- - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.html.erb
695
- - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.md
696
687
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default.html.erb
697
688
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default.jsx
698
689
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default_swift.md
@@ -1056,29 +1047,25 @@ files:
1056
1047
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb
1057
1048
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
1058
1049
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
1050
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.html.erb
1059
1051
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
1060
1052
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md
1061
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.html.erb
1062
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.md
1063
1053
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx
1064
1054
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.md
1065
1055
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx
1066
1056
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.md
1057
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.html.erb
1067
1058
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx
1068
1059
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
1069
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
1070
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md
1060
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.html.erb
1071
1061
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx
1072
1062
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.md
1073
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.html.erb
1074
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.md
1075
1063
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.html.erb
1076
1064
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.jsx
1077
1065
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md
1066
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.html.erb
1078
1067
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx
1079
1068
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.md
1080
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.html.erb
1081
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.md
1082
1069
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_external_control.jsx
1083
1070
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_hook.jsx
1084
1071
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb
@@ -2957,7 +2944,7 @@ homepage: https://playbook.powerapp.cloud/
2957
2944
  licenses:
2958
2945
  - ISC
2959
2946
  metadata: {}
2960
- post_install_message:
2947
+ post_install_message:
2961
2948
  rdoc_options: []
2962
2949
  require_paths:
2963
2950
  - lib
@@ -2973,7 +2960,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2973
2960
  version: '0'
2974
2961
  requirements: []
2975
2962
  rubygems_version: 3.5.3
2976
- signing_key:
2963
+ signing_key:
2977
2964
  specification_version: 4
2978
2965
  summary: Playbook Design System
2979
2966
  test_files: []
@@ -1,3 +0,0 @@
1
- NOTE: All `componentOverlay` implementations require a `placement` prop, that accepts any of the following values: `top-right`, `top-left`, `bottom-right`, `bottom-left`, `top-center`, `bottom-center`, `left-center`, and `right-center`.
2
-
3
- When passing the `badge` component as an overlay, you must also specify its text content,and you may optionally control the color by passing an [approved value](https://playbook.powerapp.cloud/kits/badge#colors) as a `variant`.
@@ -1,3 +0,0 @@
1
- NOTE: All `componentOverlay` implementations require a `placement` prop, that accepts any of the following values: `top-right`, `top-left`, `bottom-right`, `bottom-left`, `top-center`, `bottom-center`, `left-center`, and `right-center`.
2
-
3
- When passing the `iconCircle` component as an overlay, you must also specify an `icon`, and you may optionally control the color by passing an [approved value](https://playbook.powerapp.cloud/kits/icon_circle/rails#color) as a `variant`.
@@ -1,92 +0,0 @@
1
- import React from "react";
2
- import Icon, { IconSizes } from "../../pb_icon/_icon";
3
-
4
- type IconColors =
5
- | "default"
6
- | "light"
7
- | "lighter"
8
- | "link"
9
- | "error"
10
- | "success";
11
-
12
- type IconProps = {
13
- collapsed: boolean | (() => void);
14
- icon?: string[] | string;
15
- iconColor?: IconColors;
16
- iconSize?: IconSizes;
17
- onIconClick?: () => void;
18
- };
19
-
20
- type colorMap = {
21
- default: string;
22
- light: string;
23
- lighter: string;
24
- link: string;
25
- error: string;
26
- success: string;
27
- };
28
-
29
- const colorMap = {
30
- default: "#242B42",
31
- light: "#687887",
32
- lighter: "#C1CDD6",
33
- link: "#0056CF",
34
- error: "#FF2229",
35
- success: "#00CA74",
36
- };
37
-
38
- const CollapsibleIcon = ({
39
- collapsed,
40
- icon,
41
- iconSize,
42
- iconColor,
43
- onIconClick,
44
- }: IconProps) => {
45
- const color = colorMap[iconColor];
46
-
47
- const showIcon = (icon: string | string[]) => {
48
- if (typeof icon === "string") {
49
- return [icon, icon];
50
- }
51
- return icon;
52
- };
53
-
54
- const handleIconClick = (e: React.MouseEvent<HTMLElement>) => {
55
- if (onIconClick) {
56
- e.stopPropagation();
57
- onIconClick();
58
- }
59
- };
60
-
61
- return (
62
- <>
63
- {collapsed ? (
64
- <div
65
- className="icon_wrapper"
66
- key={icon ? showIcon(icon)[0] : "chevron-down"}
67
- onClick={(e) => handleIconClick(e)}
68
- style={{ verticalAlign: "middle", color: color }}
69
- >
70
- <Icon
71
- icon={icon ? showIcon(icon)[0] : "chevron-down"}
72
- size={iconSize}
73
- />
74
- </div>
75
- ) : (
76
- <div
77
- className="icon_wrapper"
78
- key={icon ? showIcon(icon)[1] : "chevron-up"}
79
- onClick={(e) => handleIconClick(e)}
80
- style={{ verticalAlign: "middle", color: color }}
81
- >
82
- <Icon
83
- icon={icon ? showIcon(icon)[1] : "chevron-up"}
84
- size={iconSize}
85
- />
86
- </div>
87
- )}
88
- </>
89
- );
90
- };
91
-
92
- export default CollapsibleIcon;
@@ -1,15 +0,0 @@
1
- <%= content_tag(:div,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname,
5
- aria: object.aria,
6
- style: "color: #{object.icon_color};",
7
- **combined_html_options) do %>
8
- <% if object.icon.present? %>
9
- <%= pb_rails("icon", props: { icon: object.show_icon(object.icon)[0], id:"collapsible_open_icon", size: object.size }) %>
10
- <%= pb_rails("icon", props: { icon: object.show_icon(object.icon)[1], id:"collapsible_close_icon", size: object.size }) %>
11
- <% else %>
12
- <%= pb_rails("icon", props: { icon: "chevron-down", id:"collapsible_open_icon", size: object.size }) %>
13
- <%= pb_rails("icon", props: { icon: "chevron-up", id:"collapsible_close_icon", size: object.size }) %>
14
- <% end %>
15
- <% end %>
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Playbook
4
- module PbCollapsible
5
- class CollapsibleIcon < Playbook::KitBase
6
- prop :collapsed, type: Playbook::Props::Boolean,
7
- default: true
8
- prop :color, type: Playbook::Props::Enum,
9
- values: %w[default light lighter link success error],
10
- default: "default"
11
- prop :icon
12
- prop :size, type: Playbook::Props::Enum,
13
- values: ["lg", "xs", "sm", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x", nil],
14
- default: nil
15
-
16
- def classname
17
- generate_classname("pb_collapsible_icon_kit", separator: " ")
18
- end
19
-
20
- def show_icon(icon)
21
- case icon
22
- when ::String
23
- [icon, icon]
24
- when ::Array
25
- icon
26
- end
27
- end
28
-
29
- def icon_color
30
- return "" if color.nil?
31
-
32
- color_object = { light: "#687887", lighter: "#C1CDD6", link: "#0056CF", success: "#00CA74", error: "#FF2229", default: "#242B42" }
33
- color_object[color.to_sym]
34
- end
35
- end
36
- end
37
- end
@@ -1,73 +0,0 @@
1
- import React from 'react'
2
- import { Collapsible, useCollapsible, Background, Flex, Title, List, ListItem } from '../..'
3
-
4
- const CollapsibleCustomMain = () => {
5
- const [isCollapsed, setIsCollapsed] = useCollapsible(true)
6
-
7
- return (
8
- <>
9
- <Collapsible
10
- collapsed={isCollapsed}
11
- >
12
- <Background
13
- backgroundColor="white"
14
- cursor="pointer"
15
- htmlOptions={{onClick:() => setIsCollapsed(!isCollapsed)}}
16
- position="sticky"
17
- top="0"
18
- >
19
- <Flex
20
- align="center"
21
- gap="sm"
22
- justify="between"
23
- >
24
- <Title
25
- size={4}
26
- text="Custom Main Section"
27
- />
28
- <Collapsible.Icon collapsed={isCollapsed}/>
29
- </Flex>
30
- </Background>
31
- <Collapsible.Content padding="none">
32
- <div>
33
- <List>
34
- <ListItem
35
- align="stretch"
36
- flexDirection="column"
37
- >
38
- Checklist item
39
- </ListItem>
40
- <ListItem
41
- align="stretch"
42
- flexDirection="column"
43
- >
44
- Checklist item
45
- </ListItem>
46
- <ListItem
47
- align="stretch"
48
- flexDirection="column"
49
- >
50
- Checklist item
51
- </ListItem>
52
- <ListItem
53
- align="stretch"
54
- flexDirection="column"
55
- >
56
- Checklist item
57
- </ListItem>
58
- <ListItem
59
- align="stretch"
60
- flexDirection="column"
61
- >
62
- Checklist item
63
- </ListItem>
64
- </List>
65
- </div>
66
- </Collapsible.Content>
67
- </Collapsible>
68
-
69
- </>
70
- )
71
- }
72
-
73
- export default CollapsibleCustomMain
@@ -1,5 +0,0 @@
1
- A custom Main section can also be used in place of the provided `Collapsible.Main`. This gives devs full control over that subcomponent. For example, here we are using global props to make that custom Main 'sticky' on scroll.
2
-
3
- If a custom component is used in place of the default, devs must handle collapsible toggling themselves via the useCollapsible hook as seen in this example.
4
-
5
- The default Collapsible icon can also be used as part of the custom Main as shown, you will need to pass the Collapsible state to the `collapsed` prop on the optional `Collapsible.Icon`.
@@ -1,20 +0,0 @@
1
- <%= pb_rails("collapsible", props: { name: "default-example" }) do %>
2
- <%= pb_rails("background", props: { background_color: "white", position: "sticky", top: "0", cursor:"pointer", data: {"collapsible-main": "true"} }) do %>
3
- <%= pb_rails("flex", props: {align:"center", gap:"sm", justify:"between"}) do %>
4
- <%= pb_rails("title", props: { text: "Custom Main Section", tag: "h4", size: 4 }) %>
5
- <%= pb_rails("collapsible/collapsible_icon") %>
6
- <% end %>
7
- <% end %>
8
- <%= pb_rails("flex", props: { align: "center", justify: "between" }) do %>
9
- <% end %>
10
- <%= pb_rails("collapsible/collapsible_content", props: { padding: "none" }) do %>
11
- <%= pb_rails("list", props: {ordered: false, dark: false, borderless: false}) do %>
12
- <%= pb_rails("list/item") do %> Checklist Item <% end %>
13
- <%= pb_rails("list/item") do %> Checklist Item <% end %>
14
- <%= pb_rails("list/item") do %> Checklist Item <% end %>
15
- <%= pb_rails("list/item") do %> Checklist Item <% end %>
16
- <%= pb_rails("list/item") do %> Checklist Item <% end %>
17
- <% end %>
18
- <% end %>
19
- <% end %>
20
-
@@ -1,5 +0,0 @@
1
- A custom Main section can also be used in place of the provided `collapsible/collapsible_main`. This gives devs full control over that subcomponent. For example, here we are using global props to make that custom Main 'sticky' on scroll.
2
-
3
- If a custom component is used in place of the default, devs must add `data: {"collapsible-main": "true"}` to the custom Main for toggling of the collapsible to work correctly.
4
-
5
- The default Collapsible icon can also be used as part of the custom Main as shown with the optional `collapsible/collapsible_icon`. This optional subcomponent accepts all icon related props `color`, `icon` and `size`.
@@ -1,6 +0,0 @@
1
- The dropdown is built using all of the following required subcomponents:
2
-
3
- `dropdown/dropdown_trigger` is the UI component that users interact with to toggle the dropdown.
4
- `dropdown/dropdown_container` is the floating container that wraps the list of dropdown options.
5
- `dropdown/dropdown_option` renders options that are passed to the container.
6
- Each of these subcomponents can be altered using global props and/or their respective props. See doc examples below for more information on each.
@@ -1,5 +0,0 @@
1
- Optionally utilize `custom_display` on the `dropdown/dropdown_trigger` subcomponent to customize its content after an option is selected. The component passed to custom_display will be rendered to the left of the default text-based display. In this example the Avatar kit is being used.
2
-
3
- The `placeholder` prop can also be used to customize the placeholder text for the default `dropdown/dropdown_trigger`.
4
-
5
- The dropdown follows the typical rails pattern of utilizing hidden inputs for form submission. The hidden input value is the selected options' id.
@@ -1 +0,0 @@
1
- `dropdown/dropdown_option` subcomponent accepts any child components to customize the options' contents and display. By default, options are Body kit text that is set by the `label` value from the `option` object.
@@ -1 +0,0 @@
1
- Optionally replace the default trigger's select element by passing child components directly to the `dropdown/dropdown_trigger`.