agroptima-design-system 0.26.5 → 0.26.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agroptima-design-system",
3
- "version": "0.26.5",
3
+ "version": "0.26.6",
4
4
  "scripts": {
5
5
  "dev": "npm run storybook",
6
6
  "storybook": "storybook dev -p 6006 --ci",
@@ -10,6 +10,7 @@ export interface CollapsibleProps
10
10
  variant?: Variant
11
11
  name?: string
12
12
  disabled?: boolean
13
+ form?: boolean
13
14
  noHorizontalPadding?: boolean
14
15
  }
15
16
 
@@ -20,6 +21,7 @@ export function Collapsible({
20
21
  children,
21
22
  disabled,
22
23
  name,
24
+ form = false,
23
25
  noHorizontalPadding = false,
24
26
  ...props
25
27
  }: CollapsibleProps): React.JSX.Element {
@@ -29,6 +31,7 @@ export function Collapsible({
29
31
  })
30
32
  const contentCssClasses = classNames('content', {
31
33
  'no-horizontal-padding': noHorizontalPadding,
34
+ form: form,
32
35
  })
33
36
 
34
37
  return (
@@ -2,11 +2,13 @@
2
2
  @use '../../settings/breakpoints';
3
3
  @use '../../settings/color_alias';
4
4
 
5
+ $gap: config.$space-4x;
6
+
5
7
  .form {
6
8
  display: flex;
7
9
  flex-direction: column;
8
10
  margin: 0 auto;
9
- gap: config.$space-4x;
11
+ gap: $gap;
10
12
  padding: 0;
11
13
 
12
14
  width: breakpoints.$medium;
@@ -25,7 +27,7 @@
25
27
  .footer-actions {
26
28
  display: flex;
27
29
  justify-content: flex-end;
28
- gap: config.$space-4x;
30
+ gap: $gap;
29
31
 
30
32
  flex-direction: row;
31
33
  padding: config.$space-3x config.$space-5x;
@@ -4,6 +4,10 @@ import { Meta } from "@storybook/blocks";
4
4
 
5
5
  # Changelog
6
6
 
7
+ # 0.26.6
8
+
9
+ * Add property `form` to Collapsible component.
10
+
7
11
  # 0.26.5
8
12
 
9
13
  * New Delivery icon
@@ -1,9 +1,10 @@
1
1
  import React from 'react'
2
-
3
- import { Collapsible } from '../atoms/Collapsible'
4
- import { Input } from '../atoms/Input'
5
- import { Select } from '../atoms/Select'
6
- import { Card } from '../atoms/Card'
2
+ import { Collapsible } from '@/atoms/Collapsible'
3
+ import { Input } from '@/atoms/Input'
4
+ import { Select } from '@/atoms/Select'
5
+ import { Card } from '@/atoms/Card'
6
+ import { Form as FormComponent, Actions } from '@/atoms/Form'
7
+ import { Button } from '@/atoms/Button'
7
8
 
8
9
  const figmaPrimaryDesign = {
9
10
  design: {
@@ -219,3 +220,18 @@ export const PrimaryDisabled = {
219
220
  </Collapsible>
220
221
  ),
221
222
  }
223
+
224
+ export const Form = {
225
+ render: () => (
226
+ <FormComponent>
227
+ <Collapsible open form title="User">
228
+ <Input label="First Name" placeholder="First Name" name="firstName" />
229
+ <Input label="Last Name" placeholder="Last Name" name="lastName" />
230
+ <Actions>
231
+ <Button type="button" label="Cancel" variant="primary-outlined" />
232
+ <Button type="submit" label="Sign in" variant="primary" />
233
+ </Actions>
234
+ </Collapsible>
235
+ </FormComponent>
236
+ ),
237
+ }
@@ -1,6 +1,5 @@
1
1
  import React from 'react'
2
-
3
- import { Modal } from '../atoms/Modal'
2
+ import { Modal } from '@/atoms/Modal'
4
3
  import { DetailItem } from '@/atoms/DetailItem'
5
4
  import { Collapsible } from '@/atoms/Collapsible'
6
5
  import { Card } from '@/atoms/Card'