@simpli-route/apollo-ds 0.1.4 → 0.1.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.
Files changed (139) hide show
  1. package/dist/components/Accordion/types.d.ts +1 -0
  2. package/dist/components/Chips/AssistChip.d.ts +3 -0
  3. package/dist/components/Chips/Chips.test.d.ts +1 -0
  4. package/dist/components/Chips/index.d.ts +2 -0
  5. package/dist/components/Chips/types.d.ts +44 -0
  6. package/dist/components/Chips/variants.d.ts +9 -0
  7. package/dist/components/IconButton/types.d.ts +1 -1
  8. package/dist/components/IconButton/variants.d.ts +1 -1
  9. package/dist/components/LoadingOverlay/LoadingOverlay.d.ts +4 -0
  10. package/dist/components/LoadingOverlay/LoadingOverlay.test.d.ts +1 -0
  11. package/dist/components/LoadingOverlay/Overlay.d.ts +4 -0
  12. package/dist/components/LoadingOverlay/index.d.ts +2 -0
  13. package/dist/components/LoadingOverlay/types.d.ts +47 -0
  14. package/dist/components/LoadingOverlay/variants.d.ts +6 -0
  15. package/dist/components/ProgressBar/ProgressBar.d.ts +12 -0
  16. package/dist/components/ProgressBar/ProgressBar.test.d.ts +1 -0
  17. package/dist/components/ProgressBar/index.d.ts +2 -0
  18. package/dist/components/ProgressBar/types.d.ts +59 -0
  19. package/dist/components/ProgressBar/variants.d.ts +6 -0
  20. package/dist/components/Tabs/types.d.ts +8 -2
  21. package/dist/components/Tooltip/types.d.ts +1 -0
  22. package/dist/components/Typography/types.d.ts +1 -0
  23. package/dist/components/index.d.ts +3 -0
  24. package/dist/index.cjs.js +1 -1
  25. package/dist/index.cjs10.js +1 -1
  26. package/dist/index.cjs11.js +1 -1
  27. package/dist/index.cjs12.js +1 -1
  28. package/dist/index.cjs13.js +1 -1
  29. package/dist/index.cjs14.js +1 -1
  30. package/dist/index.cjs15.js +1 -1
  31. package/dist/index.cjs16.js +1 -1
  32. package/dist/index.cjs17.js +1 -1
  33. package/dist/index.cjs18.js +1 -1
  34. package/dist/index.cjs19.js +1 -1
  35. package/dist/index.cjs2.js +1 -1
  36. package/dist/index.cjs20.js +1 -1
  37. package/dist/index.cjs21.js +1 -1
  38. package/dist/index.cjs22.js +1 -1
  39. package/dist/index.cjs23.js +1 -1
  40. package/dist/index.cjs24.js +1 -1
  41. package/dist/index.cjs25.js +1 -1
  42. package/dist/index.cjs26.js +1 -1
  43. package/dist/index.cjs27.js +1 -1
  44. package/dist/index.cjs28.js +1 -1
  45. package/dist/index.cjs29.js +1 -1
  46. package/dist/index.cjs3.js +1 -1
  47. package/dist/index.cjs30.js +1 -1
  48. package/dist/index.cjs31.js +1 -1
  49. package/dist/index.cjs32.js +1 -1
  50. package/dist/index.cjs33.js +1 -1
  51. package/dist/index.cjs34.js +1 -1
  52. package/dist/index.cjs35.js +1 -1
  53. package/dist/index.cjs37.js +1 -1
  54. package/dist/index.cjs38.js +1 -1
  55. package/dist/index.cjs39.js +1 -9
  56. package/dist/index.cjs4.js +1 -1
  57. package/dist/index.cjs40.js +1 -19
  58. package/dist/index.cjs41.js +1 -1
  59. package/dist/index.cjs42.js +1 -1
  60. package/dist/index.cjs43.js +1 -1
  61. package/dist/index.cjs44.js +1 -1
  62. package/dist/index.cjs45.js +9 -1
  63. package/dist/index.cjs46.js +19 -1
  64. package/dist/index.cjs47.js +1 -1
  65. package/dist/index.cjs48.js +1 -1
  66. package/dist/index.cjs49.js +1 -0
  67. package/dist/index.cjs5.js +1 -1
  68. package/dist/index.cjs50.js +1 -0
  69. package/dist/index.cjs51.js +1 -0
  70. package/dist/index.cjs52.js +1 -0
  71. package/dist/index.cjs53.js +1 -0
  72. package/dist/index.cjs54.js +1 -0
  73. package/dist/index.cjs55.js +1 -0
  74. package/dist/index.cjs6.js +1 -1
  75. package/dist/index.cjs7.js +1 -1
  76. package/dist/index.cjs8.js +1 -1
  77. package/dist/index.cjs9.js +1 -1
  78. package/dist/index.es.js +27 -21
  79. package/dist/index.es10.js +78 -66
  80. package/dist/index.es11.js +68 -30
  81. package/dist/index.es12.js +77 -23
  82. package/dist/index.es13.js +28 -23
  83. package/dist/index.es14.js +24 -8
  84. package/dist/index.es15.js +28 -8
  85. package/dist/index.es16.js +8 -6
  86. package/dist/index.es17.js +7 -5
  87. package/dist/index.es18.js +87 -21
  88. package/dist/index.es19.js +6 -173
  89. package/dist/index.es2.js +3 -3
  90. package/dist/index.es20.js +6 -43
  91. package/dist/index.es21.js +22 -59
  92. package/dist/index.es22.js +173 -3
  93. package/dist/index.es23.js +27 -76
  94. package/dist/index.es24.js +29 -17
  95. package/dist/index.es25.js +59 -30
  96. package/dist/index.es26.js +3 -11
  97. package/dist/index.es27.js +92 -10
  98. package/dist/index.es28.js +22 -12
  99. package/dist/index.es29.js +32 -129
  100. package/dist/index.es3.js +31 -27
  101. package/dist/index.es30.js +30 -19
  102. package/dist/index.es31.js +161 -18
  103. package/dist/index.es32.js +10 -96
  104. package/dist/index.es33.js +11 -13
  105. package/dist/index.es34.js +2 -2
  106. package/dist/index.es35.js +2 -2
  107. package/dist/index.es37.js +10 -45
  108. package/dist/index.es38.js +12 -2
  109. package/dist/index.es39.js +96 -30
  110. package/dist/index.es4.js +4 -4
  111. package/dist/index.es40.js +13 -599
  112. package/dist/index.es41.js +19 -19
  113. package/dist/index.es42.js +20 -19
  114. package/dist/index.es43.js +45 -21
  115. package/dist/index.es44.js +2 -21
  116. package/dist/index.es45.js +30 -19
  117. package/dist/index.es46.js +599 -56
  118. package/dist/index.es47.js +30 -2
  119. package/dist/index.es48.js +19 -2
  120. package/dist/index.es49.js +21 -0
  121. package/dist/index.es5.js +42 -38
  122. package/dist/index.es50.js +23 -0
  123. package/dist/index.es51.js +23 -0
  124. package/dist/index.es52.js +21 -0
  125. package/dist/index.es53.js +58 -0
  126. package/dist/index.es54.js +4 -0
  127. package/dist/index.es55.js +4 -0
  128. package/dist/index.es6.js +38 -31
  129. package/dist/index.es7.js +31 -49
  130. package/dist/index.es8.js +46 -86
  131. package/dist/index.es9.js +36 -69
  132. package/dist/stories/Chips.stories.d.ts +22 -0
  133. package/dist/stories/IconButton.stories.d.ts +1 -0
  134. package/dist/stories/LoadingOverlay.stories.d.ts +17 -0
  135. package/dist/stories/ProgressBar.stories.d.ts +29 -0
  136. package/dist/style.css +225 -0
  137. package/dist/testing/tests/itRendersChildren.d.ts +1 -0
  138. package/dist/testing/tests/itSupportsClassName.d.ts +1 -0
  139. package/package.json +4 -3
@@ -1,35 +1,73 @@
1
- import { j as s } from "./index.es16.js";
2
- import { useRef as x } from "react";
3
- import { useTabList as b } from "react-aria";
4
- import { useTabListState as d, Item as N } from "react-stately";
5
- import { cn as e } from "./index.es17.js";
6
- import { Tab as j } from "./index.es34.js";
7
- import { TabPanel as u } from "./index.es35.js";
8
- import { tabsVariants as h } from "./index.es36.js";
9
- const T = (a) => {
10
- var m;
11
- const { rootClassName: i, tabClassName: n, tabPanelClassName: c, orientation: o = "horizontal", id: f = void 0 } = a, t = d(a), r = x(null), { tabListProps: p } = b(a, t, r);
12
- return /* @__PURE__ */ s.jsxs("div", { className: e(h({ orientation: o }), i), children: [
13
- /* @__PURE__ */ s.jsx(
14
- "div",
15
- {
16
- ...p,
17
- ref: r,
18
- className: e("flex", o === "horizontal" ? "flex-row flex-wrap" : "flex-col"),
19
- children: [...t.collection].map((l) => /* @__PURE__ */ s.jsx(j, { item: l, state: t, orientation: o, className: n, id: f }, l.key))
1
+ import { j as m } from "./index.es19.js";
2
+ import { useState as $, useEffect as x } from "react";
3
+ import { Slider as b, SliderTrack as q } from "react-aria-components";
4
+ import { cn as z } from "./index.es20.js";
5
+ import { SliderContainerTrack as B } from "./index.es39.js";
6
+ import { validateMinDistance as F } from "./index.es40.js";
7
+ const O = ({
8
+ type: r = "single",
9
+ showTypeValue: A = "default",
10
+ positionTooltip: S = "top",
11
+ modeTooltip: j = "dark",
12
+ maxValue: w = 100,
13
+ minValue: T = 0,
14
+ value: f = r === "range" ? [0, 5] : 0,
15
+ onChangeValue: i,
16
+ className: k,
17
+ classNameFilled: p,
18
+ classNameUnfilled: v,
19
+ classNameThumb: N,
20
+ suffix: E = "%",
21
+ step: M = 1,
22
+ minDistance: d = 2,
23
+ ...P
24
+ }) => {
25
+ const [l, R] = $(r);
26
+ return x(() => {
27
+ if (r === "range" && Array.isArray(f)) {
28
+ const [s, c] = f;
29
+ if (c - s < d) {
30
+ const t = [s, s + d];
31
+ (t[0] !== f[0] || t[1] !== f[1]) && (i == null || i(t));
20
32
  }
21
- ),
22
- /* @__PURE__ */ s.jsx(
23
- u,
24
- {
25
- state: t,
26
- className: e("p-2", o === "horizontal" ? "pl-2" : "pt-2", c)
33
+ }
34
+ }, [r, f, i, d]), x(() => {
35
+ l !== r && (R(r), i == null || i(r === "range" ? [0, 5] : 0));
36
+ }, [r, i, l]), /* @__PURE__ */ m.jsx("div", { className: "flex w-full flex-col py-4", children: /* @__PURE__ */ m.jsx(
37
+ b,
38
+ {
39
+ value: f,
40
+ step: M,
41
+ maxValue: w,
42
+ minValue: T,
43
+ className: z("w-full", k),
44
+ onChange: (s) => {
45
+ const c = s;
46
+ if (c !== void 0) {
47
+ const t = Array.isArray(c), o = r === "range" && t ? F(c, r, d) : c;
48
+ i == null || i(
49
+ r === "range" ? o : Array.isArray(o) ? o[0] || 0 : o
50
+ );
51
+ }
27
52
  },
28
- (m = t.selectedItem) == null ? void 0 : m.key
29
- )
30
- ] });
53
+ ...P,
54
+ children: /* @__PURE__ */ m.jsx(q, { className: "relative h-3 w-full cursor-pointer", children: ({ state: s }) => /* @__PURE__ */ m.jsx(
55
+ B,
56
+ {
57
+ state: s,
58
+ type: r,
59
+ showTypeValue: A,
60
+ suffix: E,
61
+ classNameFilled: p,
62
+ classNameUnfilled: v,
63
+ modeTooltip: j,
64
+ positionTooltip: S,
65
+ classNameThumb: N
66
+ }
67
+ ) })
68
+ }
69
+ ) });
31
70
  };
32
- T.Item = N;
33
71
  export {
34
- T as Tabs
72
+ O as Slider
35
73
  };
@@ -1,26 +1,80 @@
1
- import { j as s } from "./index.es16.js";
2
- import { forwardRef as u, useContext as T } from "react";
3
- import { useTooltip as h, mergeProps as j } from "react-aria";
4
- import { cn as e } from "./index.es17.js";
5
- import { TooltipContext as N } from "./index.es22.js";
6
- import { tooltipVariants as P } from "./index.es37.js";
7
- const C = u((p, i) => {
8
- const { placement: m = "bottom", size: l = "md", className: a, mode: o = "dark", supportText: t, children: n, ...r } = p, { state: c, ...x } = T(N), { tooltipProps: d } = h(r, c), f = e(P({ placement: m, size: l, mode: o, hasSupportText: !!t }), a);
9
- return /* @__PURE__ */ s.jsxs("span", { className: f, ...j(r, d, x), ref: i, children: [
10
- n,
11
- t ? /* @__PURE__ */ s.jsx(
12
- "div",
13
- {
14
- className: e(
15
- "!text-sm !font-normal !leading-[19.07px]",
16
- o === "dark" ? "!text-blue-50" : "!text-neutral-700"
1
+ import { j as o } from "./index.es19.js";
2
+ import { Switch as u } from "react-aria-components";
3
+ import { cn as c } from "./index.es20.js";
4
+ import { ContentSwitch as L } from "./index.es41.js";
5
+ import { SwitchIndicator as v } from "./index.es42.js";
6
+ import { switchVariants as b } from "./index.es27.js";
7
+ const E = ({
8
+ children: f,
9
+ label: m,
10
+ description: n,
11
+ errorMessage: s,
12
+ validationState: e,
13
+ size: a = "md",
14
+ isDisabled: r = !1,
15
+ isSelected: t = !1,
16
+ onChange: h,
17
+ renderLabelIcon: x = null,
18
+ "aria-label": p,
19
+ "aria-describedby": l
20
+ }) => {
21
+ const j = e === "invalid" && !r, w = a === "sm" ? { offLeft: 3, onLeft: 19 } : { offLeft: 4, onLeft: 28 };
22
+ return /* @__PURE__ */ o.jsxs(
23
+ "label",
24
+ {
25
+ className: c("group flex flex-row gap-2", (m || f) && n ? "items-start" : "items-center"),
26
+ children: [
27
+ /* @__PURE__ */ o.jsx(
28
+ u,
29
+ {
30
+ isDisabled: r,
31
+ isSelected: t,
32
+ "aria-checked": t,
33
+ "aria-label": p,
34
+ "aria-describedby": l,
35
+ onChange: h,
36
+ children: ({ isFocusVisible: d, isHovered: i }) => /* @__PURE__ */ o.jsx(
37
+ "div",
38
+ {
39
+ className: c(
40
+ b({
41
+ isSelected: t,
42
+ isDisabled: r,
43
+ isFocusVisible: d,
44
+ size: a,
45
+ isHoveredWhenOff: i && !t
46
+ })
47
+ ),
48
+ children: /* @__PURE__ */ o.jsx(
49
+ v,
50
+ {
51
+ isSelected: t,
52
+ isDisabled: r,
53
+ isHovered: i,
54
+ size: a,
55
+ dimensions: w
56
+ }
57
+ )
58
+ }
59
+ )
60
+ }
17
61
  ),
18
- children: t
19
- }
20
- ) : null
21
- ] });
22
- });
23
- C.displayName = "Tooltip";
62
+ /* @__PURE__ */ o.jsx(
63
+ L,
64
+ {
65
+ label: m,
66
+ description: n,
67
+ errorMessage: s,
68
+ isDisabled: r,
69
+ isInvalid: j,
70
+ renderLabelIcon: x,
71
+ children: f
72
+ }
73
+ )
74
+ ]
75
+ }
76
+ );
77
+ };
24
78
  export {
25
- C as Tooltip
79
+ E as Switch
26
80
  };
@@ -1,30 +1,35 @@
1
- import { j as i } from "./index.es16.js";
2
- import { useRef as a, Children as f, cloneElement as u } from "react";
3
- import { useTooltipTrigger as T } from "react-aria";
4
- import { useTooltipTriggerState as h } from "react-stately";
5
- import { cn as x } from "./index.es17.js";
6
- import { TooltipContext as d } from "./index.es22.js";
7
- const w = (e) => {
8
- const { children: r, isDisabled: s, trigger: l, className: n } = e, t = h(e), o = a(null), { triggerProps: g, tooltipProps: m } = T({ isDisabled: s, trigger: l }, t, o), [c, p] = f.toArray(r);
9
- if (!Array.isArray(r) || r.length > 2)
10
- throw new Error("TooltipTrigger must have exactly 2 children");
11
- return /* @__PURE__ */ i.jsxs("span", { className: x("relative inline-flex items-center", n), children: [
12
- u(c, {
13
- ...g,
14
- ref: o
15
- }),
16
- /* @__PURE__ */ i.jsx(
17
- d.Provider,
1
+ import { j as s } from "./index.es19.js";
2
+ import { useRef as x } from "react";
3
+ import { useTabList as b } from "react-aria";
4
+ import { useTabListState as d, Item as N } from "react-stately";
5
+ import { cn as e } from "./index.es20.js";
6
+ import { Tab as j } from "./index.es34.js";
7
+ import { TabPanel as u } from "./index.es35.js";
8
+ import { tabsVariants as h } from "./index.es36.js";
9
+ const T = (a) => {
10
+ var m;
11
+ const { rootClassName: i, tabClassName: n, tabPanelClassName: c, orientation: o = "horizontal", id: f = void 0 } = a, t = d(a), r = x(null), { tabListProps: p } = b(a, t, r);
12
+ return /* @__PURE__ */ s.jsxs("div", { className: e(h({ orientation: o }), i), children: [
13
+ /* @__PURE__ */ s.jsx(
14
+ "div",
18
15
  {
19
- value: {
20
- state: t,
21
- ...m
22
- },
23
- children: t.isOpen ? p : null
16
+ ...p,
17
+ ref: r,
18
+ className: e("flex", o === "horizontal" ? "flex-row flex-wrap" : "flex-col"),
19
+ children: [...t.collection].map((l) => /* @__PURE__ */ s.jsx(j, { item: l, state: t, orientation: o, className: n, id: f }, l.key))
24
20
  }
21
+ ),
22
+ /* @__PURE__ */ s.jsx(
23
+ u,
24
+ {
25
+ state: t,
26
+ className: e("p-2", o === "horizontal" ? "pl-2" : "pt-2", c)
27
+ },
28
+ (m = t.selectedItem) == null ? void 0 : m.key
25
29
  )
26
30
  ] });
27
31
  };
32
+ T.Item = N;
28
33
  export {
29
- w as TooltipTrigger
34
+ T as Tabs
30
35
  };
@@ -1,10 +1,26 @@
1
- import { j as m } from "./index.es16.js";
2
- import { cn as n } from "./index.es17.js";
3
- import { textVariants as a } from "./index.es24.js";
4
- function x(t) {
5
- const { children: s, type: o = "body", className: r } = t, e = n(a({ type: o }), r);
6
- return /* @__PURE__ */ m.jsx("p", { className: e, children: s });
7
- }
1
+ import { j as s } from "./index.es19.js";
2
+ import { forwardRef as u, useContext as T } from "react";
3
+ import { useTooltip as h, mergeProps as j } from "react-aria";
4
+ import { cn as e } from "./index.es20.js";
5
+ import { TooltipContext as N } from "./index.es26.js";
6
+ import { tooltipVariants as P } from "./index.es43.js";
7
+ const C = u((p, i) => {
8
+ const { placement: m = "bottom", size: l = "md", className: a, mode: o = "dark", supportText: t, children: n, ...r } = p, { state: c, ...x } = T(N), { tooltipProps: d } = h(r, c), f = e(P({ placement: m, size: l, mode: o, hasSupportText: !!t }), a);
9
+ return /* @__PURE__ */ s.jsxs("span", { className: f, ...j(r, d, x), ref: i, children: [
10
+ n,
11
+ t ? /* @__PURE__ */ s.jsx(
12
+ "div",
13
+ {
14
+ className: e(
15
+ "!text-sm !font-normal !leading-[19.07px]",
16
+ o === "dark" ? "!text-blue-50" : "!text-neutral-700"
17
+ ),
18
+ children: t
19
+ }
20
+ ) : null
21
+ ] });
22
+ });
23
+ C.displayName = "Tooltip";
8
24
  export {
9
- x as Text
25
+ C as Tooltip
10
26
  };
@@ -1,10 +1,30 @@
1
- import { j as m } from "./index.es16.js";
2
- import { cn as c } from "./index.es17.js";
3
- import { titleVariants as l } from "./index.es24.js";
4
- function j(s) {
5
- const { children: e, type: t = "h1", size: r = t, className: i, ...o } = s, n = t, a = c(l({ size: r }), i);
6
- return /* @__PURE__ */ m.jsx(n, { className: a, ...o, children: e });
7
- }
1
+ import { j as i } from "./index.es19.js";
2
+ import { useRef as a, Children as f, cloneElement as u } from "react";
3
+ import { useTooltipTrigger as T } from "react-aria";
4
+ import { useTooltipTriggerState as h } from "react-stately";
5
+ import { cn as x } from "./index.es20.js";
6
+ import { TooltipContext as d } from "./index.es26.js";
7
+ const w = (e) => {
8
+ const { children: r, isDisabled: s, trigger: l, className: n } = e, t = h(e), o = a(null), { triggerProps: g, tooltipProps: m } = T({ isDisabled: s, trigger: l }, t, o), [c, p] = f.toArray(r);
9
+ if (!Array.isArray(r) || r.length > 2)
10
+ throw new Error("TooltipTrigger must have exactly 2 children");
11
+ return /* @__PURE__ */ i.jsxs("span", { className: x("relative inline-flex items-center", n), children: [
12
+ u(c, {
13
+ ...g,
14
+ ref: o
15
+ }),
16
+ /* @__PURE__ */ i.jsx(
17
+ d.Provider,
18
+ {
19
+ value: {
20
+ state: t,
21
+ ...m
22
+ },
23
+ children: t.isOpen ? p : null
24
+ }
25
+ )
26
+ ] });
27
+ };
8
28
  export {
9
- j as Title
29
+ w as TooltipTrigger
10
30
  };
@@ -1,8 +1,10 @@
1
- import { __module as e } from "./index.es38.js";
2
- import { __require as r } from "./index.es39.js";
3
- import { __require as o } from "./index.es40.js";
4
- process.env.NODE_ENV === "production" ? e.exports = r() : e.exports = o();
5
- var m = e.exports;
1
+ import { j as m } from "./index.es19.js";
2
+ import { cn as n } from "./index.es20.js";
3
+ import { textVariants as a } from "./index.es28.js";
4
+ function x(t) {
5
+ const { children: s, type: o = "body", className: r } = t, e = n(a({ type: o }), r);
6
+ return /* @__PURE__ */ m.jsx("p", { className: e, children: s });
7
+ }
6
8
  export {
7
- m as j
9
+ x as Text
8
10
  };
@@ -1,8 +1,10 @@
1
- import { clsx as o } from "clsx";
2
- import { twMerge as t } from "tailwind-merge";
3
- function n(...r) {
4
- return t(o(r));
1
+ import { j as m } from "./index.es19.js";
2
+ import { cn as c } from "./index.es20.js";
3
+ import { titleVariants as l } from "./index.es28.js";
4
+ function j(s) {
5
+ const { children: e, type: t = "h1", size: r = t, className: i, ...o } = s, n = t, a = c(l({ size: r }), i);
6
+ return /* @__PURE__ */ m.jsx(n, { className: a, ...o, children: e });
5
7
  }
6
8
  export {
7
- n as cn
9
+ j as Title
8
10
  };
@@ -1,24 +1,90 @@
1
- import { j as s } from "./index.es16.js";
2
- import { MinusIcon as p, PlusIcon as u } from "./index.es26.js";
3
- import { cn as e } from "./index.es17.js";
4
- const f = ({
5
- label: o,
6
- section: n,
7
- active: r,
8
- onToggle: l,
9
- itemClassName: t,
10
- sectionClassName: c,
11
- hasIcon: i = !0
12
- }) => {
13
- const a = e("rounded-md border border-solid border-purple-200 bg-gray-100", t), d = e("px-4 pb-4", c), m = r ? p : u;
14
- return /* @__PURE__ */ s.jsxs("div", { className: a, children: [
15
- /* @__PURE__ */ s.jsxs("button", { className: "flex w-full cursor-pointer items-center gap-x-4 p-4", onClick: l, children: [
16
- /* @__PURE__ */ s.jsx("div", { className: "flex-1", children: o }),
17
- i ? /* @__PURE__ */ s.jsx("span", { className: `shrink-0 transition duration-300 ${r ? "-rotate-180" : "rotate-0"}`, children: /* @__PURE__ */ s.jsx(m, { className: "size-6" }) }) : null
18
- ] }),
19
- r ? /* @__PURE__ */ s.jsx("div", { className: d, children: n }) : null
20
- ] });
1
+ import { j as e } from "./index.es19.js";
2
+ import { motion as T } from "framer-motion";
3
+ import { ProgressBar as L } from "react-aria-components";
4
+ import "react";
5
+ import { cn as s } from "./index.es20.js";
6
+ import "./index.es22.js";
7
+ import "./index.es23.js";
8
+ import "react-aria";
9
+ import "./index.es24.js";
10
+ import "./index.es6.js";
11
+ import { Label as B } from "./index.es7.js";
12
+ import "./index.es9.js";
13
+ import "./index.es25.js";
14
+ import { Tooltip as V } from "./index.es14.js";
15
+ import { TooltipTrigger as D } from "./index.es15.js";
16
+ import "./index.es27.js";
17
+ import "./index.es13.js";
18
+ import { Text as c } from "./index.es16.js";
19
+ import "./index.es28.js";
20
+ import { progressBarVariants as I, progressFillVariants as $ } from "./index.es29.js";
21
+ const Z = (d) => {
22
+ const {
23
+ className: f,
24
+ classNameLabel: h,
25
+ label: a,
26
+ variant: n = "primary",
27
+ barClassName: u,
28
+ fillClassName: N,
29
+ valueTextClassName: p,
30
+ isLoading: r = !1,
31
+ showPercentage: l = !0,
32
+ showTypePercentage: i = "text",
33
+ positionTooltipPercentage: g = "top",
34
+ modeTooltip: j = "dark",
35
+ maxValue: w = 100,
36
+ minValue: b = 0,
37
+ valueCustomLabel: t,
38
+ valuePosition: x = "right",
39
+ ...v
40
+ } = d, C = s("flex w-full flex-col gap-2 text-neutral-900", f), y = s(I({ variant: n }), u), P = s($({ variant: n }), N);
41
+ return /* @__PURE__ */ e.jsx(L, { className: C, maxValue: w, minValue: b, ...v, children: ({ percentage: o, valueText: m }) => /* @__PURE__ */ e.jsxs(
42
+ "div",
43
+ {
44
+ className: s("flex w-full items-center gap-2", {
45
+ "items-end": a
46
+ }),
47
+ children: [
48
+ /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
49
+ a ? /* @__PURE__ */ e.jsx(B, { labelClassName: s("leading-[19.07px] text-left", h), children: a }) : null,
50
+ /* @__PURE__ */ e.jsxs(
51
+ D,
52
+ {
53
+ isDisabled: !l || i === "text",
54
+ className: "items-start",
55
+ delay: 90,
56
+ closeDelay: 200,
57
+ children: [
58
+ /* @__PURE__ */ e.jsx("div", { className: y, children: /* @__PURE__ */ e.jsx(
59
+ T.div,
60
+ {
61
+ className: P,
62
+ style: { width: r ? "100%" : `${o}%` },
63
+ animate: r ? { x: ["-100%", "100%"] } : { width: o + "%", x: [0, 0] },
64
+ transition: r ? { repeat: 1 / 0, duration: 1, ease: "easeInOut" } : {}
65
+ }
66
+ ) }),
67
+ /* @__PURE__ */ e.jsx(
68
+ V,
69
+ {
70
+ className: "!text-xs",
71
+ style: { left: o + "%" },
72
+ mode: j,
73
+ size: "sm",
74
+ placement: g,
75
+ children: t || m
76
+ }
77
+ )
78
+ ]
79
+ }
80
+ ),
81
+ l && i === "text" && x === "bottom" && /* @__PURE__ */ e.jsx("div", { className: "mt-0.5 self-end", children: /* @__PURE__ */ e.jsx(c, { className: s("whitespace-nowrap text-xs text-neutral-900", p), children: t || m }) })
82
+ ] }),
83
+ l && i === "text" && x === "right" && /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(c, { className: s("whitespace-nowrap text-xs text-neutral-900", p), children: t || m }) })
84
+ ]
85
+ }
86
+ ) });
21
87
  };
22
88
  export {
23
- f as AccordionItem
89
+ Z as ProgressBar
24
90
  };