@validationcloud/fractal-ui 1.54.0 → 1.55.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.
@@ -0,0 +1,14 @@
1
+ import { Collapsible as CollapsiblePrimitive } from 'radix-ui';
2
+ import { default as React } from 'react';
3
+ export declare const Collapsible: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const CollapsibleTrigger: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ /**
6
+ * CollapsibleContent is a wrapper around Radix's Collapsible.Content component.
7
+ * It applies project-specific animations to the content based on the orientation.
8
+ * @param orientation - The orientation of the collapsible content.
9
+ */
10
+ type CollapsibleContentProps = {
11
+ orientation?: 'horizontal' | 'vertical';
12
+ } & React.ComponentProps<typeof CollapsiblePrimitive.Content>;
13
+ export declare const CollapsibleContent: React.ForwardRefExoticComponent<Omit<CollapsibleContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ export {};
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export { useChartInstance, type UseChartInstanceProps, type UseChartInstanceRetu
9
9
  export { MavrikChart, type MavrikChartProps } from './components/echarts-renderer/mavrik-chart';
10
10
  export { MAVRIK_THEME, MAVRIK_THEME_HORIZONTAL } from './components/echarts-renderer/mavrik-theme';
11
11
  export { ClientModal } from './components/client-modal/client-modal';
12
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './components/collapsible/collapsible';
12
13
  export { CopyButton } from './components/copy-button/copy-button';
13
14
  export { DecoratedIcon } from './components/decorated-icon/decorated-icon';
14
15
  export { DropdownMenu, DropdownMenuItem } from './components/dropdown-menu/dropdown-menu';
package/dist/index.js CHANGED
@@ -2,74 +2,78 @@ import { AnimatedLoader as t } from "./src/components/animated-loader/animated-l
2
2
  import { Badge as p } from "./src/components/badge/badge.js";
3
3
  import { Box as x } from "./src/components/box/box.js";
4
4
  import { Button as n } from "./src/components/button/button.js";
5
- import { EChartsRenderer as i } from "./src/components/echarts-renderer/echarts-renderer.js";
6
- import { EChartsThemeOption as u, isEChartsThemeOption as h } from "./src/components/echarts-renderer/echarts-theme-option.js";
7
- import { EChartsChartOption as c, isEChartsChartOption as s } from "./src/components/echarts-renderer/echarts-chart-option.js";
8
- import { useChartInstance as I } from "./src/components/echarts-renderer/use-chart-instance.js";
9
- import { MavrikChart as T } from "./src/components/echarts-renderer/mavrik-chart.js";
10
- import { MAVRIK_THEME as B, MAVRIK_THEME_HORIZONTAL as S } from "./src/components/echarts-renderer/mavrik-theme.js";
5
+ import { EChartsRenderer as l } from "./src/components/echarts-renderer/echarts-renderer.js";
6
+ import { EChartsThemeOption as C, isEChartsThemeOption as d } from "./src/components/echarts-renderer/echarts-theme-option.js";
7
+ import { EChartsChartOption as u, isEChartsChartOption as h } from "./src/components/echarts-renderer/echarts-chart-option.js";
8
+ import { useChartInstance as T } from "./src/components/echarts-renderer/use-chart-instance.js";
9
+ import { MavrikChart as M } from "./src/components/echarts-renderer/mavrik-chart.js";
10
+ import { MAVRIK_THEME as g, MAVRIK_THEME_HORIZONTAL as B } from "./src/components/echarts-renderer/mavrik-theme.js";
11
11
  import { ClientModal as w } from "./src/components/client-modal/client-modal.js";
12
- import { CopyButton as A } from "./src/components/copy-button/copy-button.js";
13
- import { DecoratedIcon as P } from "./src/components/decorated-icon/decorated-icon.js";
14
- import { DropdownMenu as v, DropdownMenuItem as H } from "./src/components/dropdown-menu/dropdown-menu.js";
15
- import { ErrorBoundary as _ } from "./src/components/error-boundary/error-boundary.js";
16
- import { ScrollArea as y } from "./src/components/scroll-area/index.js";
17
- import { Icon as N } from "./src/components/icon/icon.js";
18
- import { IconButton as V } from "./src/components/icon-button/icon-button.js";
19
- import { InputButton as F } from "./src/components/input-button/input-button.js";
20
- import { MountSvgSprite as j } from "./src/components/mount-svg-sprite/mount-svg-sprite.js";
21
- import { NotFoundComponent as z } from "./src/components/not-found-component/not-found-component.js";
22
- import { PagePadding as J } from "./src/components/page-padding/page-padding.js";
23
- import { ProtocolLogo as W } from "./src/components/protocol-logo/protocol-logo.js";
24
- import { Select as Y, SelectItem as $ } from "./src/components/select/select.js";
25
- import { Skeleton as ro } from "./src/components/skeleton/skeleton.js";
26
- import { Switch as eo } from "./src/components/switch/switch.js";
27
- import { TextInput as mo } from "./src/components/text-input/text-input.js";
28
- import { Tooltip as fo } from "./src/components/tooltip/tooltip.js";
29
- import { TooltipProvider as ao } from "./src/components/tooltip-provider/tooltip-provider.js";
30
- import { TouchTarget as uo } from "./src/components/touch-target/touch-target.js";
31
- import { twMerge as lo } from "./src/lib/tailwind-merge.js";
32
- import { UserDropdown as so } from "./src/components/user-dropdown/user-dropdown.js";
33
- import { UserDropdownMobile as Io } from "./src/components/user-dropdown-mobile/user-dropdown-mobile.js";
34
- import { useScrollToBottom as To } from "./src/hooks/use-scroll-to-bottom.js";
12
+ import { Collapsible as A, CollapsibleContent as D, CollapsibleTrigger as b } from "./src/components/collapsible/collapsible.js";
13
+ import { CopyButton as R } from "./src/components/copy-button/copy-button.js";
14
+ import { DecoratedIcon as H } from "./src/components/decorated-icon/decorated-icon.js";
15
+ import { DropdownMenu as _, DropdownMenuItem as k } from "./src/components/dropdown-menu/dropdown-menu.js";
16
+ import { ErrorBoundary as K } from "./src/components/error-boundary/error-boundary.js";
17
+ import { ScrollArea as U } from "./src/components/scroll-area/index.js";
18
+ import { Icon as F } from "./src/components/icon/icon.js";
19
+ import { IconButton as j } from "./src/components/icon-button/icon-button.js";
20
+ import { InputButton as z } from "./src/components/input-button/input-button.js";
21
+ import { MountSvgSprite as J } from "./src/components/mount-svg-sprite/mount-svg-sprite.js";
22
+ import { NotFoundComponent as W } from "./src/components/not-found-component/not-found-component.js";
23
+ import { PagePadding as Y } from "./src/components/page-padding/page-padding.js";
24
+ import { ProtocolLogo as oo } from "./src/components/protocol-logo/protocol-logo.js";
25
+ import { Select as to, SelectItem as eo } from "./src/components/select/select.js";
26
+ import { Skeleton as mo } from "./src/components/skeleton/skeleton.js";
27
+ import { Switch as fo } from "./src/components/switch/switch.js";
28
+ import { TextInput as ao } from "./src/components/text-input/text-input.js";
29
+ import { Tooltip as io } from "./src/components/tooltip/tooltip.js";
30
+ import { TooltipProvider as so } from "./src/components/tooltip-provider/tooltip-provider.js";
31
+ import { TouchTarget as ho } from "./src/components/touch-target/touch-target.js";
32
+ import { twMerge as To } from "./src/lib/tailwind-merge.js";
33
+ import { UserDropdown as Mo } from "./src/components/user-dropdown/user-dropdown.js";
34
+ import { UserDropdownMobile as go } from "./src/components/user-dropdown-mobile/user-dropdown-mobile.js";
35
+ import { useScrollToBottom as So } from "./src/hooks/use-scroll-to-bottom.js";
35
36
  export {
36
37
  t as AnimatedLoader,
37
38
  p as Badge,
38
39
  x as Box,
39
40
  n as Button,
40
41
  w as ClientModal,
41
- A as CopyButton,
42
- P as DecoratedIcon,
43
- v as DropdownMenu,
44
- H as DropdownMenuItem,
45
- c as EChartsChartOption,
46
- i as EChartsRenderer,
47
- u as EChartsThemeOption,
48
- _ as ErrorBoundary,
49
- N as Icon,
50
- V as IconButton,
51
- F as InputButton,
52
- B as MAVRIK_THEME,
53
- S as MAVRIK_THEME_HORIZONTAL,
54
- T as MavrikChart,
55
- j as MountSvgSprite,
56
- z as NotFoundComponent,
57
- J as PagePadding,
58
- W as ProtocolLogo,
59
- y as ScrollArea,
60
- Y as Select,
61
- $ as SelectItem,
62
- ro as Skeleton,
63
- eo as Switch,
64
- mo as TextInput,
65
- fo as Tooltip,
66
- ao as TooltipProvider,
67
- uo as TouchTarget,
68
- so as UserDropdown,
69
- Io as UserDropdownMobile,
70
- s as isEChartsChartOption,
71
- h as isEChartsThemeOption,
72
- lo as twMerge,
73
- I as useChartInstance,
74
- To as useScrollToBottom
42
+ A as Collapsible,
43
+ D as CollapsibleContent,
44
+ b as CollapsibleTrigger,
45
+ R as CopyButton,
46
+ H as DecoratedIcon,
47
+ _ as DropdownMenu,
48
+ k as DropdownMenuItem,
49
+ u as EChartsChartOption,
50
+ l as EChartsRenderer,
51
+ C as EChartsThemeOption,
52
+ K as ErrorBoundary,
53
+ F as Icon,
54
+ j as IconButton,
55
+ z as InputButton,
56
+ g as MAVRIK_THEME,
57
+ B as MAVRIK_THEME_HORIZONTAL,
58
+ M as MavrikChart,
59
+ J as MountSvgSprite,
60
+ W as NotFoundComponent,
61
+ Y as PagePadding,
62
+ oo as ProtocolLogo,
63
+ U as ScrollArea,
64
+ to as Select,
65
+ eo as SelectItem,
66
+ mo as Skeleton,
67
+ fo as Switch,
68
+ ao as TextInput,
69
+ io as Tooltip,
70
+ so as TooltipProvider,
71
+ ho as TouchTarget,
72
+ Mo as UserDropdown,
73
+ go as UserDropdownMobile,
74
+ h as isEChartsChartOption,
75
+ d as isEChartsThemeOption,
76
+ To as twMerge,
77
+ T as useChartInstance,
78
+ So as useScrollToBottom
75
79
  };
@@ -0,0 +1,29 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Collapsible as t } from "radix-ui";
3
+ import { forwardRef as s } from "react";
4
+ import { twMerge as r } from "../../lib/tailwind-merge.js";
5
+ const p = s(
6
+ ({ className: a, ...e }, l) => /* @__PURE__ */ o(t.Root, { ref: l, className: r(a), ...e })
7
+ );
8
+ p.displayName = "Collapsible";
9
+ const n = s(({ className: a, ...e }, l) => /* @__PURE__ */ o(t.Trigger, { ref: l, className: r(a), ...e }));
10
+ n.displayName = "CollapsibleTrigger";
11
+ const m = s(({ className: a, orientation: e = "vertical", ...l }, i) => /* @__PURE__ */ o(
12
+ t.Content,
13
+ {
14
+ ref: i,
15
+ className: r(
16
+ "overflow-hidden",
17
+ e === "vertical" && "data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
18
+ e === "horizontal" && "data-[state=closed]:animate-collapsible-in data-[state=open]:animate-collapsible-out",
19
+ a
20
+ ),
21
+ ...l
22
+ }
23
+ ));
24
+ m.displayName = "CollapsibleContent";
25
+ export {
26
+ p as Collapsible,
27
+ m as CollapsibleContent,
28
+ n as CollapsibleTrigger
29
+ };
@@ -8,6 +8,10 @@
8
8
  --animate-tooltip-enter: fade-in 150ms ease-out, scale-up-50 100ms cubic-bezier(0.16, 1, 0.3, 1);
9
9
  --animate-tooltip-delayed-enter: fade-in 150ms ease-out, scale-up-50 400ms cubic-bezier(0.16, 1, 0.3, 1);
10
10
  --animate-tooltip-exit: fade-out 100ms ease-in, scale-down-50 100ms ease-in;
11
+ --animate-collapsible-down: collapsible-slide-down 150ms ease-out;
12
+ --animate-collapsible-up: collapsible-slide-up 150ms ease-out;
13
+ --animate-collapsible-in: collapsible-slide-in 150ms ease-out;
14
+ --animate-collapsible-out: collapsible-slide-out 150ms ease-out;
11
15
  }
12
16
 
13
17
  @keyframes fade-in {
@@ -81,3 +85,39 @@
81
85
  transform: translateX(100%);
82
86
  }
83
87
  }
88
+
89
+ @keyframes collapsible-slide-down {
90
+ from {
91
+ height: 0;
92
+ }
93
+ to {
94
+ height: var(--radix-collapsible-content-height);
95
+ }
96
+ }
97
+
98
+ @keyframes collapsible-slide-up {
99
+ from {
100
+ height: var(--radix-collapsible-content-height);
101
+ }
102
+ to {
103
+ height: 0;
104
+ }
105
+ }
106
+
107
+ @keyframes collapsible-slide-in {
108
+ from {
109
+ width: var(--radix-collapsible-content-width);
110
+ }
111
+ to {
112
+ width: 0;
113
+ }
114
+ }
115
+
116
+ @keyframes collapsible-slide-out {
117
+ from {
118
+ width: 0;
119
+ }
120
+ to {
121
+ width: var(--radix-collapsible-content-width);
122
+ }
123
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@validationcloud/fractal-ui",
3
3
  "private": false,
4
- "version": "1.54.0",
4
+ "version": "1.55.0",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",
7
7
  "files": [