playbook_ui 12.6.0.pre.alpha.collapsible1 → 12.6.0.pre.alpha.menuyml1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55e72b83e3d53687568964faa9a5283ed8d916b77b704a9fd211cc0293abe056
4
- data.tar.gz: 5bed51e081fddba422e24266f7e7604ded4acaa483fd0c65bbf583540e844d3e
3
+ metadata.gz: 7dc9d2cb8ac952c33f7ef2c586e30977c004e1ff2431291b063bd7c72b4df5b4
4
+ data.tar.gz: ca6d879c13d19a9bc8ac01b662cfd5cca2d5d534d467dadf7e552c5e21fa9ff8
5
5
  SHA512:
6
- metadata.gz: 0a9f9c24caba0d438ef30f406b1dddce897c59797f5fca036aa334fac978a644e5373f60a585ec81107c2e1fa68b17881e1a018a860b8dc71bfce789e12f3067
7
- data.tar.gz: 6488b6637e9ccf87d52393b9d8ea1e95be985089f1e85e79035d54f01e0b4a94e6fcf4c7ceda312a0975b0a68298e9cd4a053a2e6030c27b8a7ee7a30e75794b
6
+ metadata.gz: bb1c152743ea0f67492a860445e1f4fa0679bc09547633c141a2a56c9c9f97c708084102ba9ca46526cba35ec5b6ae20e7e6a08b03a117bd062ea7dd421851fe
7
+ data.tar.gz: 2e3aeee302b7f6c8b7746bd414a47c4c82b0538ed56a047b9ced38d63faf2ff536b63615d741395f0c0ed97cfbc7304cb144bfc6df75428fbd14ed4092176f7a
@@ -19,8 +19,6 @@ type CollapsibleProps = {
19
19
  iconColor?: 'default' | 'light' | 'lighter' | 'link' | 'error' | 'success',
20
20
  iconSize?: typeof IconSizes
21
21
  id?: string,
22
- mainFlex?: "around" | "between" | "evenly" | "none",
23
- mainFlexItem?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'none',
24
22
  padding?: string,
25
23
  }
26
24
 
@@ -42,8 +40,6 @@ const Collapsible = ({
42
40
  iconColor = 'default',
43
41
  iconSize,
44
42
  id,
45
- mainFlex = "between",
46
- mainFlexItem = "none",
47
43
  padding = 'md',
48
44
  ...props
49
45
  }: CollapsibleProps) => {
@@ -68,7 +64,7 @@ const Collapsible = ({
68
64
  )
69
65
 
70
66
  return (
71
- <CollapsibleContext.Provider value={{ collapsed: isCollapsed, collapse, iconSize, iconColor, mainFlex, mainFlexItem }}>
67
+ <CollapsibleContext.Provider value={{ collapsed: isCollapsed, collapse, iconSize, iconColor }}>
72
68
  <div
73
69
  {...ariaProps}
74
70
  {...dataProps}
@@ -3,7 +3,7 @@
3
3
  import classnames from 'classnames'
4
4
  import React, { useContext } from 'react'
5
5
  import { buildCss } from '../../utilities/props'
6
- import { GlobalProps, globalProps } from '../../utilities/globalProps'
6
+ import { globalProps } from '../../utilities/globalProps'
7
7
 
8
8
  import Flex from '../../pb_flex/_flex'
9
9
  import FlexItem from '../../pb_flex/_flex_item'
@@ -37,8 +37,6 @@ type CollapsibleMainProps = {
37
37
  }
38
38
  type IconColors = "default" | "light" | "lighter" | "link" | "error" | "success"
39
39
 
40
- type flexMainTypes = "around" | "between" | "evenly" | "none"
41
-
42
40
  type IconProps = {
43
41
  collapsed: boolean | (()=> void)
44
42
  iconColor?: IconColors
@@ -68,7 +66,7 @@ const CollapsibleMain = ({
68
66
  padding = 'md',
69
67
  ...props
70
68
  }: CollapsibleMainProps): React.ReactElement=> {
71
- const context: {[key: string]: IconColors | (() => void)} | boolean | GlobalProps | flexMainTypes = useContext(CollapsibleContext)
69
+ const context: {[key: string]: IconColors | (() => void)} | boolean = useContext(CollapsibleContext)
72
70
  const mainCSS = buildCss('pb_collapsible_main_kit')
73
71
  const mainSpacing = globalProps(props, { cursor, padding })
74
72
 
@@ -76,14 +74,10 @@ const CollapsibleMain = ({
76
74
  <div className={classnames(mainCSS, className, mainSpacing)}>
77
75
  <div onClick={context.collapse as (() => void)}>
78
76
  <Flex
79
- spacing={context.mainFlex}
77
+ spacing="between"
80
78
  vertical="center"
81
79
  >
82
- <FlexItem
83
- flex={context.mainFlexItem}
84
- >
85
- {children}
86
- </FlexItem>
80
+ <FlexItem>{children}</FlexItem>
87
81
  <FlexItem>
88
82
  <Icon
89
83
  collapsed={context.collapsed as () => void}
@@ -4,8 +4,8 @@
4
4
  class: object.classname,
5
5
  aria: object.aria) do %>
6
6
 
7
- <%= pb_rails("flex", props: {vertical: "center", spacing:object.main_flex , cursor: "pointer"}) do %>
8
- <%= pb_rails("flex/flex_item", props: {flex:object.main_flex_item}) do %>
7
+ <%= pb_rails("flex", props: {vertical: "center", spacing: "between", cursor: "pointer"}) do %>
8
+ <%= pb_rails("flex/flex_item") do %>
9
9
  <%= content.presence %>
10
10
  <% end %>
11
11
  <%= pb_rails("flex/flex_item") do %>
@@ -6,13 +6,6 @@ module Playbook
6
6
  prop :color, type: Playbook::Props::Enum,
7
7
  values: %w[default light lighter link success error],
8
8
  default: "default"
9
- prop :main_flex, type: Playbook::Props::Enum,
10
- values: %w[around between evenly none],
11
- default: "between",
12
- deprecated: true
13
- prop :main_flex_item, type: Playbook::Props::Enum,
14
- values: %w[auto initial 0 1 2 3 4 5 6 7 8 9 10 11 12 none],
15
- default: "none"
16
9
  prop :size, type: Playbook::Props::Enum,
17
10
  values: ["lg", "xs", "sm", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x", nil],
18
11
  default: nil
@@ -4,13 +4,8 @@ examples:
4
4
  - collapsible_default: Default
5
5
  - collapsible_size: Size
6
6
  - collapsible_color: Color
7
- - collapsible_main_flex: Main Flex Spacing
8
- - collapsible_main_flex_item: Main Flex Item
9
-
10
7
 
11
8
  react:
12
9
  - collapsible_default: Default
13
10
  - collapsible_size: Size
14
- - collapsible_color: Color
15
- - collapsible_main_flex: Main Flex Spacing
16
- - collapsible_main_flex_item: Main Flex Item
11
+ - collapsible_color: Color
@@ -1,5 +1,3 @@
1
1
  export { default as CollapsibleDefault } from './_collapsible_default.jsx'
2
2
  export { default as CollapsibleSize } from './_collapsible_size.jsx'
3
3
  export { default as CollapsibleColor } from './_collapsible_color.jsx'
4
- export {default as CollapsibleMainFlex } from './_collapsible_main_flex.jsx'
5
- export {default as CollapsibleMainFlexItem } from './_collapsible_main_flex_item.jsx'
@@ -45,7 +45,7 @@ module Playbook
45
45
 
46
46
  # rubocop:disable Naming/AccessorMethodName
47
47
  def get_kits
48
- menu = YAML.load_file(Playbook::Engine.root.join("app/pb_kits/playbook/data/menu.yml"))
48
+ menu = YAML.load_file(Rails.root.join("config/menu.yml"))
49
49
  menu["kits"]
50
50
  end
51
51
  # rubocop:enable Naming/AccessorMethodName
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "12.6.0"
5
- VERSION = "12.6.0.pre.alpha.collapsible1"
5
+ VERSION = "12.6.0.pre.alpha.menuyml1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.6.0.pre.alpha.collapsible1
4
+ version: 12.6.0.pre.alpha.menuyml1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -294,7 +294,6 @@ files:
294
294
  - Rakefile
295
295
  - app/pb_kits/playbook/_playbook.scss
296
296
  - app/pb_kits/playbook/_reset.scss
297
- - app/pb_kits/playbook/data/menu.yml
298
297
  - app/pb_kits/playbook/index.js
299
298
  - app/pb_kits/playbook/pb_avatar/_avatar.scss
300
299
  - app/pb_kits/playbook/pb_avatar/_avatar.tsx
@@ -616,12 +615,6 @@ files:
616
615
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_color.md
617
616
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default.html.erb
618
617
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default.jsx
619
- - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_main_flex.html.erb
620
- - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_main_flex.jsx
621
- - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_main_flex.md
622
- - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_main_flex_item.html.erb
623
- - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_main_flex_item.jsx
624
- - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_main_flex_item.md
625
618
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.html.erb
626
619
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.jsx
627
620
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.md
@@ -1,110 +0,0 @@
1
- kits:
2
- - avatars:
3
- - avatar
4
- - avatar_action_button
5
- - multiple_users
6
- - multiple_users_stacked
7
- - user
8
- - background
9
- - bread_crumbs
10
- - buttons:
11
- - button
12
- - button_toolbar
13
- - circle_icon_button
14
- - card
15
- - collapsible
16
- - charts_and_graphs:
17
- - bar_graph
18
- - circle_chart
19
- - distribution_bar
20
- - gauge
21
- - legend
22
- - line_graph
23
- - treemap_chart
24
- - dialog
25
- - filter
26
- - fixed_confirmation_toast
27
- - forms:
28
- - checkbox
29
- - date_picker
30
- - file_upload
31
- - form
32
- - form_group
33
- - form_pill
34
- - passphrase
35
- - phone_number_input
36
- - radio
37
- - rich_text_editor
38
- - select
39
- - selectable_card
40
- - selectable_card_icon
41
- - selectable_icon
42
- - selectable_list
43
- - text_input
44
- - textarea
45
- - toggle
46
- - typeahead
47
- - highlight
48
- - icon
49
- - icon_circle
50
- - icon_stat_value
51
- - icon_value
52
- - image
53
- - layouts:
54
- - flex
55
- - layout
56
- - lightbox
57
- - list
58
- - loading_inline
59
- - map
60
- - multi_level_select
61
- - nav
62
- - tags:
63
- - badge
64
- - hashtag
65
- - pill
66
- - pagination
67
- - popover
68
- - progress:
69
- - progress_pills
70
- - progress_simple
71
- - progress_step
72
- - section_separator
73
- - star_rating
74
- - table
75
- - timeline
76
- - time_and_date:
77
- - date
78
- - date_range_inline
79
- - date_range_stacked
80
- - date_stacked
81
- - date_time
82
- - date_time_stacked
83
- - date_year_stacked
84
- - time
85
- - time_range_inline
86
- - time_stacked
87
- - timestamp
88
- - weekday_stacked
89
- - tooltip
90
- - typography:
91
- - body
92
- - caption
93
- - title
94
- - typography_patterns:
95
- - contact
96
- - currency
97
- - dashboard_value
98
- - home_address_street
99
- - label_pill
100
- - label_value
101
- - message
102
- - person
103
- - person_contact
104
- - source
105
- - stat_change
106
- - stat_value
107
- - title_count
108
- - title_detail
109
- - user_badge
110
- - walkthrough
@@ -1,10 +0,0 @@
1
- <%= pb_rails("collapsible", props: { name: "default-example" }) do %>
2
- <%= pb_rails("collapsible/collapsible_main", props: { padding: "md", name: "default-main", main_flex: "none" }) do %>
3
- <%= pb_rails("body", props: { text: "Main Section"}) %>
4
- <% end %>
5
- <%= pb_rails("collapsible/collapsible_content", props: { padding: "md" }) do %>
6
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis, risus a fringilla luctus, sapien eros sodales ex, quis molestie est nulla non turpis. Vestibulum aliquet at ipsum eget posuere. Morbi sed laoreet erat. Sed commodo posuere lectus, at porta nulla ornare a. Suspendisse quam est, sollicitudin ut enim sit amet, commodo placerat enim. Donec laoreet metus ac mauris pellentesque mattis. Pellentesque luctus vel mauris non aliquam. Mauris hendrerit mattis porttitor. Curabitur vehicula justo non ex consectetur commodo. Quisque posuere aliquet quam. Maecenas malesuada magna mauris, ac tempor metus euismod at.
7
- <br><br>
8
- Cras ornare fermentum magna mollis efficitur. Sed vitae nulla vel purus ultrices mollis. Maecenas id nulla id libero faucibus feugiat quis sit amet turpis. In commodo pellentesque risus at fringilla. Integer non interdum leo, non commodo ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut mi augue, dignissim at orci vel, egestas aliquam mi. Proin finibus aliquet tempor. Integer cursus, ex quis gravida rhoncus, nisi elit viverra ipsum, non efficitur est ex ac tortor. Praesent vitae odio massa.
9
- <% end %>
10
- <% end %>
@@ -1,23 +0,0 @@
1
- import React from "react";
2
- import { Collapsible } from "../..";
3
-
4
-
5
- const CollapsibleMainFlex = () => (
6
-
7
- <Collapsible
8
- mainFlex="none"
9
- >
10
- <Collapsible.Main>
11
- <div>{'Main Section'}</div>
12
- </Collapsible.Main>
13
- <Collapsible.Content>
14
- <div>
15
- {
16
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In vel erat sed purus hendrerit viverra. Duis et vestibulum metus. Sed consequat ut ante non vehicula. Etiam nunc massa, pharetra vel quam id, posuere rhoncus quam. Quisque imperdiet arcu enim, nec aliquet justo auctor eget. Curabitur in metus nec nunc rhoncus faucibus vitae ac elit. Nulla facilisi. Vestibulum quis pretium nulla. Nulla ut accumsan velit. Duis varius urna sed sem tempor, sit amet fermentum nibh auctor. Praesent lorem arcu, egestas non ante quis, placerat pellentesque lectus.Vestibulum lacinia ipsum quis venenatis tristique. Vivamus suscipit, libero eu fringilla egestas, orci urna commodo arcu, vel gravida turpis ipsum molestie nibh. Donec cursus eu ante sagittis ultrices. Phasellus id sagittis risus. Mauris dapibus neque faucibus, tempor ligula vel, cursus ante. Donec faucibus gravida porta. Nullam egestas est quis aliquam feugiat. Sed eget metus diam. Cras eget placerat libero.'
17
- }
18
- </div>
19
- </Collapsible.Content>
20
- </Collapsible>
21
- );
22
-
23
- export default CollapsibleMainFlex;
@@ -1 +0,0 @@
1
- By default, the Collapisible.Main has the globalProp of 'spacing' set to 'between'. The `mainFlex` prop allows you to change this to 'none', 'around' or 'evenly'. The second example above sets `mainFlex` to 'none'.
@@ -1,23 +0,0 @@
1
- <%= pb_rails("collapsible", props: { name: "default-example" }) do %>
2
- <%= pb_rails("collapsible/collapsible_main", props: { padding: "md", name: "default-main", main_flex_item: "1"}) do %>
3
- <%= pb_rails("flex", props: {gap:"lg", justify:"center", wrap:true}) do %>
4
- <%= pb_rails("flex/flex_item", props: {orientation:"column"}) do %>
5
- <%= pb_rails("caption", props: { text: "Number"}) %>
6
- <%= pb_rails("body", props: { text: "12345"}) %>
7
- <% end %>
8
- <%= pb_rails("flex/flex_item", props: {orientation:"column"}) do %>
9
- <%= pb_rails("caption", props: { text: "Title"}) %>
10
- <%= pb_rails("body", props: { text: "Title"}) %>
11
- <% end %>
12
- <%= pb_rails("flex/flex_item", props: {orientation:"column"}) do %>
13
- <%= pb_rails("caption", props: { text: "Description"}) %>
14
- <%= pb_rails("body", props: { text: "Description"}) %>
15
- <% end %>
16
- <% end %>
17
- <% end %>
18
- <%= pb_rails("collapsible/collapsible_content", props: { padding: "md" }) do %>
19
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis, risus a fringilla luctus, sapien eros sodales ex, quis molestie est nulla non turpis. Vestibulum aliquet at ipsum eget posuere. Morbi sed laoreet erat. Sed commodo posuere lectus, at porta nulla ornare a. Suspendisse quam est, sollicitudin ut enim sit amet, commodo placerat enim. Donec laoreet metus ac mauris pellentesque mattis. Pellentesque luctus vel mauris non aliquam. Mauris hendrerit mattis porttitor. Curabitur vehicula justo non ex consectetur commodo. Quisque posuere aliquet quam. Maecenas malesuada magna mauris, ac tempor metus euismod at.
20
- <br><br>
21
- Cras ornare fermentum magna mollis efficitur. Sed vitae nulla vel purus ultrices mollis. Maecenas id nulla id libero faucibus feugiat quis sit amet turpis. In commodo pellentesque risus at fringilla. Integer non interdum leo, non commodo ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut mi augue, dignissim at orci vel, egestas aliquam mi. Proin finibus aliquet tempor. Integer cursus, ex quis gravida rhoncus, nisi elit viverra ipsum, non efficitur est ex ac tortor. Praesent vitae odio massa.
22
- <% end %>
23
- <% end %>
@@ -1,48 +0,0 @@
1
- import React from "react";
2
- import { Collapsible } from "../..";
3
- import { Flex, FlexItem, Caption, Body } from "../..";
4
- const CollapsibleMainFlexItem = () => (
5
- <>
6
- <Collapsible
7
- mainFlexItem="1"
8
- >
9
- <Collapsible.Main>
10
- <Flex
11
- gap="lg"
12
- justify="center"
13
- wrap
14
- >
15
- <FlexItem
16
- orientation="column"
17
- >
18
- <Caption text="Number" />
19
- <Body text="12345" />
20
- </FlexItem>
21
-
22
- <FlexItem
23
- orientation="column"
24
- >
25
- <Caption text="Title" />
26
- <Body text="Title" />
27
- </FlexItem>
28
-
29
- <FlexItem
30
- orientation="column"
31
- >
32
- <Caption text="Description" />
33
- <Body text="Description" />
34
- </FlexItem>
35
- </Flex>
36
- </Collapsible.Main>
37
- <Collapsible.Content>
38
- <div>
39
- {
40
- "Lorem ipsum dolor sit amet, consectetur adipiscing elit. In vel erat sed purus hendrerit viverra. Duis et vestibulum metus. Sed consequat ut ante non vehicula. Etiam nunc massa, pharetra vel quam id, posuere rhoncus quam. Quisque imperdiet arcu enim, nec aliquet justo auctor eget. Curabitur in metus nec nunc rhoncus faucibus vitae ac elit. Nulla facilisi. Vestibulum quis pretium nulla. Nulla ut accumsan velit. Duis varius urna sed sem tempor, sit amet fermentum nibh auctor. Praesent lorem arcu, egestas non ante quis, placerat pellentesque lectus.Vestibulum lacinia ipsum quis venenatis tristique. Vivamus suscipit, libero eu fringilla egestas, orci urna commodo arcu, vel gravida turpis ipsum molestie nibh. Donec cursus eu ante sagittis ultrices. Phasellus id sagittis risus. Mauris dapibus neque faucibus, tempor ligula vel, cursus ante. Donec faucibus gravida porta. Nullam egestas est quis aliquam feugiat. Sed eget metus diam. Cras eget placerat libero."
41
- }
42
- </div>
43
- </Collapsible.Content>
44
- </Collapsible>
45
- </>
46
- );
47
-
48
- export default CollapsibleMainFlexItem;
@@ -1 +0,0 @@
1
- The `mainFlexItem` prop allows you to pass any of the 'flex' values to the Collapsible which will allow the Collapsible.Main to fill the entire space of the containing div instead of being restricted by the size of it's contents. The default value is 'none'. The first example above sets `mainFlexItem` to '1'.