@spark-ui/components 10.8.2 → 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.
Files changed (45) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{DialogTrigger-5SI4dvpK.d.mts → DialogTrigger-woU7vsJi.d.mts} +9 -9
  3. package/dist/{DialogTrigger-5SI4dvpK.d.ts → DialogTrigger-woU7vsJi.d.ts} +9 -9
  4. package/dist/accordion/index.d.mts +13 -25
  5. package/dist/accordion/index.d.ts +13 -25
  6. package/dist/accordion/index.js +114 -250
  7. package/dist/accordion/index.js.map +1 -1
  8. package/dist/accordion/index.mjs +92 -134
  9. package/dist/accordion/index.mjs.map +1 -1
  10. package/dist/alert-dialog/index.d.mts +1 -1
  11. package/dist/alert-dialog/index.d.ts +1 -1
  12. package/dist/alert-dialog/index.js +60 -46
  13. package/dist/alert-dialog/index.js.map +1 -1
  14. package/dist/alert-dialog/index.mjs +1 -1
  15. package/dist/{chunk-T26TYEWV.mjs → chunk-I7UIKCZK.mjs} +56 -42
  16. package/dist/chunk-I7UIKCZK.mjs.map +1 -0
  17. package/dist/collapsible/index.d.mts +18 -35
  18. package/dist/collapsible/index.d.ts +18 -35
  19. package/dist/collapsible/index.js +47 -78
  20. package/dist/collapsible/index.js.map +1 -1
  21. package/dist/collapsible/index.mjs +73 -4
  22. package/dist/collapsible/index.mjs.map +1 -1
  23. package/dist/dialog/index.d.mts +2 -2
  24. package/dist/dialog/index.d.ts +2 -2
  25. package/dist/dialog/index.js +52 -38
  26. package/dist/dialog/index.js.map +1 -1
  27. package/dist/dialog/index.mjs +1 -1
  28. package/dist/drawer/index.d.mts +6 -2
  29. package/dist/drawer/index.d.ts +6 -2
  30. package/dist/drawer/index.js +105 -59
  31. package/dist/drawer/index.js.map +1 -1
  32. package/dist/drawer/index.mjs +81 -35
  33. package/dist/drawer/index.mjs.map +1 -1
  34. package/dist/scrolling-list/index.d.mts +2 -2
  35. package/dist/scrolling-list/index.d.ts +2 -2
  36. package/dist/scrolling-list/index.js +32 -68
  37. package/dist/scrolling-list/index.js.map +1 -1
  38. package/dist/scrolling-list/index.mjs +7 -43
  39. package/dist/scrolling-list/index.mjs.map +1 -1
  40. package/dist/spinner/index.d.mts +1 -1
  41. package/dist/spinner/index.d.ts +1 -1
  42. package/package.json +6 -7
  43. package/dist/chunk-3LEFXZNI.mjs +0 -97
  44. package/dist/chunk-3LEFXZNI.mjs.map +0 -1
  45. package/dist/chunk-T26TYEWV.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,19 @@
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
+
12
+ # [10.9.0](https://github.com/leboncoin/spark-web/compare/v10.8.2...v10.9.0) (2025-07-01)
13
+
14
+ ### Features
15
+
16
+ - **components:** added fade scroll indicator on Drawer ([4bc8f20](https://github.com/leboncoin/spark-web/commit/4bc8f2008a4daa12c13060b91929b5dc73eaaf2c))
17
+ - **components:** fade scroll effect on Dialog ([4b5d171](https://github.com/leboncoin/spark-web/commit/4b5d171a20e6433a61bbd6ccf7b680aa1e74c0ed))
18
+
6
19
  ## [10.8.2](https://github.com/leboncoin/spark-web/compare/v10.8.1...v10.8.2) (2025-07-01)
7
20
 
8
21
  **Note:** Version bump only for package @spark-ui/components
@@ -1,8 +1,8 @@
1
1
  import { Dialog as Dialog$1 } from 'radix-ui';
2
2
  import { ReactElement, ReactNode, Ref } from 'react';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
5
  import { VariantProps } from 'class-variance-authority';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
 
7
7
  interface DialogProps {
8
8
  /**
@@ -25,25 +25,25 @@ interface DialogProps {
25
25
  * Specifies if the dialog is a modal.
26
26
  */
27
27
  modal?: Dialog$1.DialogProps['modal'];
28
+ /**
29
+ * Specifies if the dialog should have a fade animation on its body (in case it is scrollable).
30
+ */
31
+ withFade?: boolean;
28
32
  }
29
33
  declare const Dialog: {
30
- ({ children, ...rest }: DialogProps): ReactElement;
34
+ ({ children, withFade, ...rest }: DialogProps): ReactElement;
31
35
  displayName: string;
32
36
  };
33
37
 
34
- declare const dialogBodyStyles: (props?: ({
35
- inset?: boolean | null | undefined;
36
- } & class_variance_authority_types.ClassProp) | undefined) => string;
37
- type DialogBodyStylesProps = VariantProps<typeof dialogBodyStyles>;
38
-
39
- interface BodyProps extends DialogBodyStylesProps {
38
+ interface BodyProps {
40
39
  children: ReactNode;
41
40
  className?: string;
42
41
  tabIndex?: number;
43
42
  ref?: Ref<HTMLDivElement>;
43
+ inset?: boolean;
44
44
  }
45
45
  declare const Body: {
46
- ({ children, className, inset, ref, ...rest }: BodyProps): ReactElement;
46
+ ({ children, className, inset, ref: forwardedRef, ...rest }: BodyProps): ReactElement;
47
47
  displayName: string;
48
48
  };
49
49
 
@@ -1,8 +1,8 @@
1
1
  import { Dialog as Dialog$1 } from 'radix-ui';
2
2
  import { ReactElement, ReactNode, Ref } from 'react';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
5
  import { VariantProps } from 'class-variance-authority';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
 
7
7
  interface DialogProps {
8
8
  /**
@@ -25,25 +25,25 @@ interface DialogProps {
25
25
  * Specifies if the dialog is a modal.
26
26
  */
27
27
  modal?: Dialog$1.DialogProps['modal'];
28
+ /**
29
+ * Specifies if the dialog should have a fade animation on its body (in case it is scrollable).
30
+ */
31
+ withFade?: boolean;
28
32
  }
29
33
  declare const Dialog: {
30
- ({ children, ...rest }: DialogProps): ReactElement;
34
+ ({ children, withFade, ...rest }: DialogProps): ReactElement;
31
35
  displayName: string;
32
36
  };
33
37
 
34
- declare const dialogBodyStyles: (props?: ({
35
- inset?: boolean | null | undefined;
36
- } & class_variance_authority_types.ClassProp) | undefined) => string;
37
- type DialogBodyStylesProps = VariantProps<typeof dialogBodyStyles>;
38
-
39
- interface BodyProps extends DialogBodyStylesProps {
38
+ interface BodyProps {
40
39
  children: ReactNode;
41
40
  className?: string;
42
41
  tabIndex?: number;
43
42
  ref?: Ref<HTMLDivElement>;
43
+ inset?: boolean;
44
44
  }
45
45
  declare const Body: {
46
- ({ children, className, inset, ref, ...rest }: BodyProps): ReactElement;
46
+ ({ children, className, inset, ref: forwardedRef, ...rest }: BodyProps): ReactElement;
47
47
  displayName: string;
48
48
  };
49
49
 
@@ -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
  }