playbook_ui 12.6.0.pre.alpha.collapsible1 → 12.6.0.pre.alpha.cssphone1

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: 605be9613bb09fd58884e033677ec9bb2d87872b384d0ea087c715c5f53d451c
4
+ data.tar.gz: e37094c320262d4ebd8c5da72a6a36773718c62944ed6ed203953e3cbe017f89
5
5
  SHA512:
6
- metadata.gz: 0a9f9c24caba0d438ef30f406b1dddce897c59797f5fca036aa334fac978a644e5373f60a585ec81107c2e1fa68b17881e1a018a860b8dc71bfce789e12f3067
7
- data.tar.gz: 6488b6637e9ccf87d52393b9d8ea1e95be985089f1e85e79035d54f01e0b4a94e6fcf4c7ceda312a0975b0a68298e9cd4a053a2e6030c27b8a7ee7a30e75794b
6
+ metadata.gz: be6f1cecdfe0783360be888c294a56c6936279fc04c8394cacb208a1d2915ae7e1eb66251a5bfa0d77e341cbb1c334154bd201ba5cfb432f6cfb8dae6d781e65
7
+ data.tar.gz: a4021982214cf9b87f14415e3de00e4d0fa781a62fc1049c72d0c25a91d5f13cf593c7a9084b8334b10111b53b69aaa24d2110acdae6b7de135ca0a3f688e52b
@@ -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'
@@ -1,16 +1,46 @@
1
1
  @import "../tokens/colors";
2
2
 
3
+ $transform-rotate-deg: 135deg;
4
+ $input-max-width: 284px;
5
+ $dropdown-min-width: 340px;
6
+ $flag-min-resolution: 192dpi;
7
+
3
8
  .pb_phone_number_input {
4
9
  input::placeholder {
5
10
  color: $focus_input_light;
6
11
  }
7
12
 
13
+ .text_input {
14
+ max-width: $input-max-width;
15
+ }
16
+
17
+ .dropdown_open {
18
+ .text_input {
19
+ border-color: $primary !important;
20
+ }
21
+
22
+ .iti__selected-flag:focus-visible {
23
+ outline-style: none;
24
+ }
25
+ }
26
+
8
27
  .iti__country {
9
28
  padding: 5px 10px 5px 16px;
29
+ transition: $transition_default;
10
30
  }
11
31
 
12
32
  .iti__selected-flag {
13
- padding: 0 6px 0 16px;
33
+ padding: 0 $space_xxs 0 $space_sm;
34
+
35
+ &[aria-expanded="true"] {
36
+ color: $primary_action;
37
+ }
38
+
39
+ &:focus-visible {
40
+ outline-style: solid;
41
+ border-radius: $space_xxs 0px 0px $space_xxs;
42
+ outline-color: $primary;
43
+ }
14
44
  }
15
45
 
16
46
  .iti__country.iti__highlight {
@@ -31,6 +61,11 @@
31
61
 
32
62
  .iti__flag {
33
63
  background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.19/img/flags.png");
64
+ border-radius: 1px;
65
+ }
66
+
67
+ .iti--separate-dial-code {
68
+ width: 100%;
34
69
  }
35
70
 
36
71
  .iti--separate-dial-code .iti__selected-flag {
@@ -52,49 +87,50 @@
52
87
 
53
88
  .iti__arrow::before {
54
89
  border-style: solid;
55
- border-width: 0.1em 0.1em 0 0;
90
+ border-width: 1px 1px 0 0;
56
91
  content: '';
57
92
  display: inline-block;
58
- height: 0.6em;
59
- left: 0.1em;
93
+ height: $space_xxs + 1px;
94
+ left: 1px;
60
95
  position: relative;
61
96
  vertical-align: top;
62
- width: 0.6em;
63
- top: 10px;
64
- transform: rotate(135deg);
65
- font-size: 0.5em;
97
+ width: $space_xxs + 1px;
98
+ top: $space_xs + 2px;
99
+ transform: rotate($transform-rotate-deg);
66
100
  color: $slate;
67
101
  }
68
102
 
69
103
  .iti__arrow.iti__arrow--up::before {
70
- transform: rotate(-45deg);
71
- top: 12px;
104
+ transform: rotate(-($transform-rotate-deg/3));
105
+ top: $space_xs + 4px;
106
+ color: $primary_action;
72
107
  }
73
108
 
74
109
  .iti__active::after {
75
110
  float: right;
76
111
  content: "";
77
- margin-top: 5px;
78
- transform: rotate(45deg);
79
- height: 12px;
80
- width: 6px;
112
+ margin-top: $space_xxs + 1px;
113
+ transform: rotate($transform-rotate-deg/3);
114
+ height: $space_xs + 4px;
115
+ width: $space_xxs + 2px;
81
116
  border-bottom: 2px solid;
82
117
  border-right: 2px solid;
83
118
  border-radius: 1px;
84
119
  }
85
120
 
86
121
  .iti__country-list {
87
- min-width: 340px;
122
+ min-width: $dropdown-min-width;
88
123
  border-radius: $border_radius_md;
89
124
  border: 1px solid $border_light;
90
125
  box-shadow: $shadow_deep;
126
+ margin-top: 1px;
91
127
  }
92
128
 
93
129
  .iti__divider {
94
130
  border-bottom: 1px solid $border_light;
95
131
  }
96
132
 
97
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
133
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: $flag-min-resolution) {
98
134
  .iti__flag {
99
135
  background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.19/img/flags@2x.png");
100
136
  }
@@ -1,11 +1,11 @@
1
1
  /* @flow */
2
- import React, { useEffect, useRef, useState } from "react"
3
- import classnames from "classnames"
4
- import { buildAriaProps, buildCss, buildDataProps } from "../utilities/props"
5
- import { globalProps } from "../utilities/globalProps"
6
- import intlTelInput from "intl-tel-input"
7
- import "intl-tel-input/build/css/intlTelInput.css"
8
- import TextInput from "../pb_text_input/_text_input"
2
+ import React, { useEffect, useRef, useState } from 'react'
3
+ import classnames from 'classnames'
4
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
5
+ import { globalProps } from '../utilities/globalProps'
6
+ import intlTelInput from 'intl-tel-input'
7
+ import TextInput from '../pb_text_input/_text_input'
8
+ import 'intl-tel-input/build/js/utils.js'
9
9
 
10
10
  declare global {
11
11
  interface Window {
@@ -50,7 +50,7 @@ const formatAllCountries = () => {
50
50
  formatAllCountries()
51
51
 
52
52
  const containOnlyNumbers = (value: string) => {
53
- return /^(\++)*(\d+)$/.test(value)
53
+ return /^[()+\-\ .\d]*$/g.test(value)
54
54
  }
55
55
 
56
56
  const PhoneNumberInput = (props: PhoneNumberInputProps) => {
@@ -85,7 +85,8 @@ const PhoneNumberInput = (props: PhoneNumberInputProps) => {
85
85
  const inputRef = useRef<HTMLInputElement>()
86
86
  const [inputValue, setInputValue] = useState(value)
87
87
  const [itiInit, setItiInit] = useState<any>()
88
- const [error, setError] = useState("")
88
+ const [error, setError] = useState('')
89
+ const [dropDownIsOpen, setDropDownIsOpen] = useState(false)
89
90
 
90
91
  const validateTooLongNumber = (itiInit: any) => {
91
92
  const error = itiInit.getValidationError()
@@ -133,18 +134,17 @@ const PhoneNumberInput = (props: PhoneNumberInputProps) => {
133
134
 
134
135
  useEffect(() => {
135
136
  const telInputInit = new intlTelInput(inputRef.current, {
136
- utilsScript:
137
- "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.19/js/utils.js",
138
- separateDialCode: true,
139
- preferredCountries,
140
- allowDropdown: !disabled,
141
- initialCountry,
142
- onlyCountries,
143
- })
144
-
145
- inputRef.current.addEventListener("countrychange", () =>
146
- validateTooLongNumber(telInputInit)
137
+ separateDialCode: true,
138
+ preferredCountries,
139
+ allowDropdown: !disabled,
140
+ initialCountry,
141
+ onlyCountries,
142
+ }
147
143
  )
144
+
145
+ inputRef.current.addEventListener("countrychange", () => validateTooLongNumber(telInputInit))
146
+ inputRef.current.addEventListener("open:countrydropdown", () => setDropDownIsOpen(true))
147
+ inputRef.current.addEventListener("close:countrydropdown", () => setDropDownIsOpen(false))
148
148
 
149
149
  setItiInit(telInputInit)
150
150
  }, [])
@@ -152,6 +152,7 @@ const PhoneNumberInput = (props: PhoneNumberInputProps) => {
152
152
  return (
153
153
  <div {...ariaProps} {...dataProps} className={classes}>
154
154
  <TextInput
155
+ className={dropDownIsOpen ? 'dropdown_open' : ''}
155
156
  disabled={disabled}
156
157
  error={error}
157
158
  id={id}
@@ -1,5 +1,6 @@
1
1
  import React from 'react'
2
2
  import { PhoneNumberInput } from '../../'
3
+ import "intl-tel-input/build/css/intlTelInput.min.css"
3
4
 
4
5
  const PhoneNumberInputDefault = () => (
5
6
  <>
@@ -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.cssphone1"
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.cssphone1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-03-07 00:00:00.000000000 Z
12
+ date: 2023-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -616,12 +616,6 @@ files:
616
616
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_color.md
617
617
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default.html.erb
618
618
  - 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
619
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.html.erb
626
620
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.jsx
627
621
  - app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.md
@@ -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'.