@spark-ui/components 10.9.0 → 10.10.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [10.10.0](https://github.com/leboncoin/spark-web/compare/v10.9.0...v10.10.0) (2025-07-03)
7
+
8
+ ### Features
9
+
10
+ - **components:** migrated accordion from ZagJS to BaseUI ([1607bf5](https://github.com/leboncoin/spark-web/commit/1607bf512a22e9bf482ede8c6bfb56e0cee8926e))
11
+
6
12
  # [10.9.0](https://github.com/leboncoin/spark-web/compare/v10.8.2...v10.9.0) (2025-07-01)
7
13
 
8
14
  ### Features
@@ -1,54 +1,41 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as accordion from '@zag-js/accordion';
3
- import { ComponentPropsWithoutRef, Ref, ComponentProps } from 'react';
2
+ import { Accordion as Accordion$2 } from '@base-ui-components/react/accordion';
3
+ import { ComponentProps, Ref } from 'react';
4
4
 
5
- type ExtentedZagInterface = Omit<accordion.Props, 'id' | 'ids' | 'orientation' | 'getRootNode' | 'onValueChange'> & Omit<ComponentPropsWithoutRef<'div'>, 'defaultChecked'>;
6
- interface AccordionProps extends ExtentedZagInterface {
5
+ type ExtentedZagInterface$3 = Omit<ComponentProps<typeof Accordion$2.Root>, 'openMultiple' | 'render'>;
6
+ interface AccordionProps extends ExtentedZagInterface$3 {
7
7
  /**
8
8
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
9
9
  */
10
10
  asChild?: boolean;
11
- /**
12
- * Whether an accordion item can be closed after it has been expanded.
13
- */
14
- collapsible?: boolean;
15
- defaultValue?: accordion.Props['value'];
16
11
  /**
17
12
  * Whether the accordion items are disabled
18
13
  */
19
14
  disabled?: boolean;
20
15
  /**
21
- * Whether multiple accordion items can be expanded at the same time.
16
+ * Whether multiple items can be open at the same time.
22
17
  */
23
18
  multiple?: boolean;
24
- /**
25
- * The `value` of the accordion items that are currently being expanded.
26
- */
27
- value?: string[];
28
- /**
29
- * The callback fired when the state of expanded/collapsed accordion items changes.
30
- */
31
- onValueChange?: (value: string[]) => void;
32
19
  design?: 'filled' | 'outlined';
33
20
  ref?: Ref<HTMLDivElement>;
34
21
  }
35
22
  declare const Accordion$1: {
36
- ({ asChild, children, collapsible, className, defaultValue, design, disabled, multiple, value, onValueChange, ref, ...props }: AccordionProps): react_jsx_runtime.JSX.Element;
23
+ ({ asChild, children, design, hiddenUntilFound, multiple, className, ref, ...props }: AccordionProps): react_jsx_runtime.JSX.Element;
37
24
  displayName: string;
38
25
  };
39
26
 
40
- interface AccordionItemProps extends ComponentPropsWithoutRef<'div'> {
41
- value: string;
27
+ type ExtentedZagInterface$2 = Omit<ComponentProps<typeof Accordion$2.Item>, 'render'>;
28
+ interface AccordionItemProps extends ExtentedZagInterface$2 {
42
29
  asChild?: boolean;
43
- disabled?: boolean;
44
30
  ref?: Ref<HTMLDivElement>;
45
31
  }
46
32
  declare const Item: {
47
- ({ asChild, className, children, disabled, value, ref, ...props }: AccordionItemProps): react_jsx_runtime.JSX.Element;
33
+ ({ asChild, className, children, ref, ...props }: AccordionItemProps): react_jsx_runtime.JSX.Element;
48
34
  displayName: string;
49
35
  };
50
36
 
51
- interface AccordionItemContentProps extends ComponentPropsWithoutRef<'div'> {
37
+ type ExtentedZagInterface$1 = Omit<ComponentProps<typeof Accordion$2.Panel>, 'render'>;
38
+ interface AccordionItemContentProps extends ExtentedZagInterface$1 {
52
39
  asChild?: boolean;
53
40
  ref?: Ref<HTMLDivElement>;
54
41
  }
@@ -66,7 +53,8 @@ declare const ItemHeader: {
66
53
  displayName: string;
67
54
  };
68
55
 
69
- interface AccordionItemTriggerProps extends ComponentPropsWithoutRef<'button'> {
56
+ type ExtentedZagInterface = Omit<ComponentProps<typeof Accordion$2.Trigger>, 'render'>;
57
+ interface AccordionItemTriggerProps extends ExtentedZagInterface {
70
58
  asChild?: boolean;
71
59
  ref?: Ref<HTMLButtonElement>;
72
60
  }
@@ -1,54 +1,41 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as accordion from '@zag-js/accordion';
3
- import { ComponentPropsWithoutRef, Ref, ComponentProps } from 'react';
2
+ import { Accordion as Accordion$2 } from '@base-ui-components/react/accordion';
3
+ import { ComponentProps, Ref } from 'react';
4
4
 
5
- type ExtentedZagInterface = Omit<accordion.Props, 'id' | 'ids' | 'orientation' | 'getRootNode' | 'onValueChange'> & Omit<ComponentPropsWithoutRef<'div'>, 'defaultChecked'>;
6
- interface AccordionProps extends ExtentedZagInterface {
5
+ type ExtentedZagInterface$3 = Omit<ComponentProps<typeof Accordion$2.Root>, 'openMultiple' | 'render'>;
6
+ interface AccordionProps extends ExtentedZagInterface$3 {
7
7
  /**
8
8
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
9
9
  */
10
10
  asChild?: boolean;
11
- /**
12
- * Whether an accordion item can be closed after it has been expanded.
13
- */
14
- collapsible?: boolean;
15
- defaultValue?: accordion.Props['value'];
16
11
  /**
17
12
  * Whether the accordion items are disabled
18
13
  */
19
14
  disabled?: boolean;
20
15
  /**
21
- * Whether multiple accordion items can be expanded at the same time.
16
+ * Whether multiple items can be open at the same time.
22
17
  */
23
18
  multiple?: boolean;
24
- /**
25
- * The `value` of the accordion items that are currently being expanded.
26
- */
27
- value?: string[];
28
- /**
29
- * The callback fired when the state of expanded/collapsed accordion items changes.
30
- */
31
- onValueChange?: (value: string[]) => void;
32
19
  design?: 'filled' | 'outlined';
33
20
  ref?: Ref<HTMLDivElement>;
34
21
  }
35
22
  declare const Accordion$1: {
36
- ({ asChild, children, collapsible, className, defaultValue, design, disabled, multiple, value, onValueChange, ref, ...props }: AccordionProps): react_jsx_runtime.JSX.Element;
23
+ ({ asChild, children, design, hiddenUntilFound, multiple, className, ref, ...props }: AccordionProps): react_jsx_runtime.JSX.Element;
37
24
  displayName: string;
38
25
  };
39
26
 
40
- interface AccordionItemProps extends ComponentPropsWithoutRef<'div'> {
41
- value: string;
27
+ type ExtentedZagInterface$2 = Omit<ComponentProps<typeof Accordion$2.Item>, 'render'>;
28
+ interface AccordionItemProps extends ExtentedZagInterface$2 {
42
29
  asChild?: boolean;
43
- disabled?: boolean;
44
30
  ref?: Ref<HTMLDivElement>;
45
31
  }
46
32
  declare const Item: {
47
- ({ asChild, className, children, disabled, value, ref, ...props }: AccordionItemProps): react_jsx_runtime.JSX.Element;
33
+ ({ asChild, className, children, ref, ...props }: AccordionItemProps): react_jsx_runtime.JSX.Element;
48
34
  displayName: string;
49
35
  };
50
36
 
51
- interface AccordionItemContentProps extends ComponentPropsWithoutRef<'div'> {
37
+ type ExtentedZagInterface$1 = Omit<ComponentProps<typeof Accordion$2.Panel>, 'render'>;
38
+ interface AccordionItemContentProps extends ExtentedZagInterface$1 {
52
39
  asChild?: boolean;
53
40
  ref?: Ref<HTMLDivElement>;
54
41
  }
@@ -66,7 +53,8 @@ declare const ItemHeader: {
66
53
  displayName: string;
67
54
  };
68
55
 
69
- interface AccordionItemTriggerProps extends ComponentPropsWithoutRef<'button'> {
56
+ type ExtentedZagInterface = Omit<ComponentProps<typeof Accordion$2.Trigger>, 'render'>;
57
+ interface AccordionItemTriggerProps extends ExtentedZagInterface {
70
58
  asChild?: boolean;
71
59
  ref?: Ref<HTMLButtonElement>;
72
60
  }