@simpli-route/apollo-ds 0.1.16 → 0.1.18

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 (71) hide show
  1. package/dist/components/Slider/Slider.d.ts +1 -1
  2. package/dist/components/Slider/SliderContainerTrack.d.ts +1 -1
  3. package/dist/components/Slider/SliderThumb.d.ts +1 -1
  4. package/dist/components/Slider/types.d.ts +7 -0
  5. package/dist/index.cjs10.js +1 -1
  6. package/dist/index.cjs12.js +1 -1
  7. package/dist/index.cjs14.js +1 -1
  8. package/dist/index.cjs17.js +1 -1
  9. package/dist/index.cjs19.js +1 -1
  10. package/dist/index.cjs26.js +1 -1
  11. package/dist/index.cjs27.js +1 -1
  12. package/dist/index.cjs38.js +1 -1
  13. package/dist/index.cjs39.js +1 -1
  14. package/dist/index.cjs40.js +1 -1
  15. package/dist/index.cjs41.js +1 -1
  16. package/dist/index.cjs42.js +1 -1
  17. package/dist/index.cjs43.js +1 -1
  18. package/dist/index.cjs44.js +1 -1
  19. package/dist/index.cjs45.js +1 -1
  20. package/dist/index.cjs46.js +1 -1
  21. package/dist/index.cjs47.js +1 -1
  22. package/dist/index.cjs48.js +1 -1
  23. package/dist/index.cjs49.js +1 -1
  24. package/dist/index.cjs50.js +1 -1
  25. package/dist/index.cjs51.js +1 -1
  26. package/dist/index.cjs52.js +1 -1
  27. package/dist/index.cjs58.js +1 -1
  28. package/dist/index.cjs59.js +1 -1
  29. package/dist/index.cjs6.js +1 -1
  30. package/dist/index.cjs60.js +1 -1
  31. package/dist/index.cjs61.js +1 -1
  32. package/dist/index.cjs62.js +1 -1
  33. package/dist/index.cjs63.js +1 -1
  34. package/dist/index.cjs64.js +1 -1
  35. package/dist/index.cjs65.js +1 -1
  36. package/dist/index.cjs7.js +1 -1
  37. package/dist/index.cjs9.js +1 -1
  38. package/dist/index.es10.js +2 -2
  39. package/dist/index.es12.js +2 -2
  40. package/dist/index.es14.js +33 -31
  41. package/dist/index.es17.js +4 -4
  42. package/dist/index.es19.js +3 -3
  43. package/dist/index.es26.js +1 -1
  44. package/dist/index.es27.js +2 -2
  45. package/dist/index.es38.js +13 -96
  46. package/dist/index.es39.js +163 -13
  47. package/dist/index.es40.js +10 -137
  48. package/dist/index.es41.js +97 -24
  49. package/dist/index.es42.js +13 -10
  50. package/dist/index.es43.js +137 -13
  51. package/dist/index.es44.js +27 -10
  52. package/dist/index.es45.js +10 -12
  53. package/dist/index.es46.js +12 -163
  54. package/dist/index.es47.js +10 -7
  55. package/dist/index.es48.js +9 -17
  56. package/dist/index.es49.js +35 -139
  57. package/dist/index.es50.js +7 -10
  58. package/dist/index.es51.js +17 -9
  59. package/dist/index.es52.js +139 -35
  60. package/dist/index.es58.js +21 -56
  61. package/dist/index.es59.js +19 -30
  62. package/dist/index.es6.js +1 -1
  63. package/dist/index.es60.js +10 -12
  64. package/dist/index.es61.js +14 -12
  65. package/dist/index.es62.js +12 -10
  66. package/dist/index.es63.js +13 -15
  67. package/dist/index.es64.js +30 -21
  68. package/dist/index.es65.js +57 -19
  69. package/dist/index.es7.js +1 -1
  70. package/dist/index.es9.js +1 -1
  71. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import { j as n } from "./index.es24.js";
2
- import { CheckIcon as I } from "./index.es43.js";
2
+ import { CheckIcon as I } from "./index.es38.js";
3
3
  import { motion as f } from "framer-motion";
4
4
  import { useRef as k } from "react";
5
5
  import { useButton as D, useHover as V } from "react-aria";
6
- import z from "./index.es47.js";
7
- import B from "./index.es48.js";
6
+ import z from "./index.es50.js";
7
+ import B from "./index.es51.js";
8
8
  import { cn as H } from "./index.es25.js";
9
- import { stepVariants as R, iconVariants as $, labelVariants as E } from "./index.es49.js";
9
+ import { stepVariants as R, iconVariants as $, labelVariants as E } from "./index.es52.js";
10
10
  const c = z(B), x = (s, e) => typeof s == "function" ? /* @__PURE__ */ n.jsx(s, { step: e || 0 }) : s, C = (s) => {
11
11
  var t, r, o, a, i;
12
12
  const e = (t = c == null ? void 0 : c.theme) == null ? void 0 : t.colors;
@@ -3,9 +3,9 @@ import { useRef as b } from "react";
3
3
  import { useTabList as d } from "react-aria";
4
4
  import { useTabListState as u, Item as N } from "react-stately";
5
5
  import { cn as e } from "./index.es25.js";
6
- import { Tab as j } from "./index.es50.js";
7
- import { TabPanel as h } from "./index.es51.js";
8
- import { tabsVariants as T } from "./index.es52.js";
6
+ import { Tab as j } from "./index.es47.js";
7
+ import { TabPanel as h } from "./index.es48.js";
8
+ import { tabsVariants as T } from "./index.es49.js";
9
9
  const v = (a) => {
10
10
  var l;
11
11
  const {
@@ -1,5 +1,5 @@
1
1
  import { j as s } from "./index.es24.js";
2
- import { MinusIcon as p, PlusIcon as u } from "./index.es43.js";
2
+ import { MinusIcon as p, PlusIcon as u } from "./index.es38.js";
3
3
  import { cn as e } from "./index.es25.js";
4
4
  const f = ({
5
5
  label: o,
@@ -1,6 +1,6 @@
1
1
  import { cva as r } from "class-variance-authority";
2
2
  const t = r(
3
- "inline-flex select-none items-center justify-center text-center text-base font-semibold leading-6 transition duration-150 ease-in-out focus:outline-none",
3
+ "inline-flex select-none items-center justify-center text-center text-xs font-semibold leading-6 transition duration-150 ease-in-out focus:outline-none",
4
4
  {
5
5
  variants: {
6
6
  intent: {
@@ -17,7 +17,7 @@ const t = r(
17
17
  size: {
18
18
  xs: "rounded px-3 py-1",
19
19
  sm: "rounded px-3 py-2",
20
- md: "rounded-lg px-4 py-3",
20
+ md: "rounded px-4 py-3",
21
21
  lg: "rounded-lg px-6 py-4"
22
22
  },
23
23
  isDisabled: {
@@ -1,98 +1,15 @@
1
- import { j as r } from "./index.es24.js";
2
- import { cn as m } from "./index.es25.js";
3
- import { SliderThumb as c } from "./index.es58.js";
4
- const i = ({
5
- state: e,
6
- type: n,
7
- showTypeValue: t,
8
- suffix: l,
9
- classNameFilled: d,
10
- classNameUnfilled: v,
11
- modeTooltip: a,
12
- positionTooltip: u,
13
- classNameThumb: s
14
- }) => /* @__PURE__ */ r.jsxs("div", { className: "relative", children: [
15
- t === "default" ? /* @__PURE__ */ r.jsxs("div", { className: "flex justify-between", children: [
16
- /* @__PURE__ */ r.jsxs(
17
- "div",
18
- {
19
- className: "absolute top-4 text-sm text-neutral-900",
20
- style: { left: `${e.getThumbPercent(0) * 100}%`, transform: "translateX(-50%)" },
21
- children: [
22
- e.values[0],
23
- l
24
- ]
25
- }
26
- ),
27
- n === "range" && /* @__PURE__ */ r.jsxs(
28
- "div",
29
- {
30
- className: "absolute top-4 text-sm text-neutral-900",
31
- style: { left: `${e.getThumbPercent(1) * 100}%`, transform: "translateX(-50%)" },
32
- children: [
33
- e.values[1],
34
- l
35
- ]
36
- }
37
- )
38
- ] }) : null,
39
- /* @__PURE__ */ r.jsx(
40
- "div",
41
- {
42
- className: m("absolute top-1/2 h-2 w-full -translate-y-1/2 rounded-full bg-primary-100", v)
43
- }
44
- ),
45
- /* @__PURE__ */ r.jsx(
46
- "div",
47
- {
48
- className: m("absolute top-1/2 h-2 -translate-y-1/2 rounded-full bg-primary-500", d),
49
- style: {
50
- width: `${n === "range" ? e.getThumbPercent(1) * 100 - e.getThumbPercent(0) * 100 : e.getThumbPercent(0) * 100}%`,
51
- left: n === "range" ? `${e.getThumbPercent(0) * 100}%` : "0%"
52
- }
53
- }
54
- ),
55
- n === "range" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
56
- /* @__PURE__ */ r.jsx(
57
- c,
58
- {
59
- index: 0,
60
- valuePercent: e.getThumbPercent(0),
61
- value: e.values[0],
62
- suffix: l,
63
- modeTooltip: a,
64
- positionTooltip: u,
65
- showTypeValue: t,
66
- classNameThumb: s
67
- }
68
- ),
69
- /* @__PURE__ */ r.jsx(
70
- c,
71
- {
72
- index: 1,
73
- valuePercent: e.getThumbPercent(1),
74
- value: e.values[1],
75
- suffix: l,
76
- modeTooltip: a,
77
- positionTooltip: u,
78
- showTypeValue: t,
79
- classNameThumb: s
80
- }
81
- )
82
- ] }) : /* @__PURE__ */ r.jsx(
83
- c,
84
- {
85
- index: 0,
86
- valuePercent: e.getThumbPercent(0),
87
- value: e.values[0],
88
- suffix: l,
89
- modeTooltip: a,
90
- positionTooltip: u,
91
- showTypeValue: t,
92
- classNameThumb: s
93
- }
94
- )
95
- ] });
1
+ import { C as o } from "./index.es58.js";
2
+ import { D as r } from "./index.es59.js";
3
+ import { I as n } from "./index.es60.js";
4
+ import { M as I } from "./index.es61.js";
5
+ import { P as c } from "./index.es62.js";
6
+ import { U as a } from "./index.es63.js";
7
+ var e = o, t = r, C = n, h = I, _ = c, u = a;
96
8
  export {
97
- i as SliderContainerTrack
9
+ e as CheckIcon,
10
+ t as DownChevronIcon,
11
+ C as InfoIcon,
12
+ h as MinusIcon,
13
+ _ as PlusIcon,
14
+ u as UpChevronIcon
98
15
  };
@@ -1,15 +1,165 @@
1
- const o = (e, g, r = 1) => {
2
- if (g === "range" && Array.isArray(e) && e.length === 2) {
3
- const [t, f] = e;
4
- if (f - t < r) {
5
- if (t > f - r)
6
- return [f - r, f];
7
- if (f < t + r)
8
- return [t, t + r];
9
- }
10
- }
11
- return e;
12
- };
1
+ import { cva as e } from "class-variance-authority";
2
+ const t = [
3
+ {
4
+ intent: "primary",
5
+ isHovered: !0,
6
+ isDisabled: !1,
7
+ isActive: !1,
8
+ class: "bg-primary-100"
9
+ },
10
+ {
11
+ intent: "secondary",
12
+ isHovered: !0,
13
+ isDisabled: !1,
14
+ isActive: !1,
15
+ class: "bg-primary-500 text-primary-50"
16
+ },
17
+ {
18
+ intent: "minimal",
19
+ isHovered: !0,
20
+ isDisabled: !1,
21
+ isActive: !1,
22
+ class: "bg-neutral-200 text-neutral-800"
23
+ },
24
+ {
25
+ intent: "error",
26
+ isHovered: !0,
27
+ isDisabled: !1,
28
+ isActive: !1,
29
+ class: "bg-error-100"
30
+ }
31
+ ], r = [
32
+ {
33
+ intent: "primary",
34
+ isActive: !0,
35
+ isDisabled: !1,
36
+ class: "bg-primary-500 text-primary-50"
37
+ },
38
+ {
39
+ intent: "primary",
40
+ isActive: !0,
41
+ isDisabled: !0,
42
+ class: "bg-primary-300 text-primary-100"
43
+ },
44
+ {
45
+ intent: "secondary",
46
+ isActive: !0,
47
+ isDisabled: !1,
48
+ class: "bg-primary-500 text-primary-50"
49
+ },
50
+ {
51
+ intent: "secondary",
52
+ isActive: !0,
53
+ isDisabled: !0,
54
+ class: "bg-primary-100 text-primary-300"
55
+ },
56
+ {
57
+ intent: "minimal",
58
+ isActive: !0,
59
+ isDisabled: !1,
60
+ class: "text-primary-500"
61
+ },
62
+ {
63
+ intent: "minimal",
64
+ isActive: !0,
65
+ isDisabled: !0,
66
+ class: "text-neutral-700"
67
+ },
68
+ {
69
+ intent: "error",
70
+ isActive: !0,
71
+ isDisabled: !1,
72
+ class: "bg-error-700 text-error-50"
73
+ },
74
+ {
75
+ intent: "error",
76
+ isActive: !0,
77
+ isDisabled: !0,
78
+ class: "bg-error-300 text-error-100"
79
+ }
80
+ ], i = [
81
+ {
82
+ intent: "primary",
83
+ isDisabled: !0,
84
+ isActive: !1,
85
+ class: "text-neutral-600"
86
+ },
87
+ {
88
+ intent: "primary",
89
+ isDisabled: !0,
90
+ isActive: !0,
91
+ class: "bg-primary-300 text-primary-100"
92
+ },
93
+ {
94
+ intent: "secondary",
95
+ isDisabled: !0,
96
+ isActive: !1,
97
+ class: "bg-neutral-400 text-neutral-600"
98
+ },
99
+ {
100
+ intent: "secondary",
101
+ isDisabled: !0,
102
+ isActive: !0,
103
+ class: "bg-primary-100 text-primary-300"
104
+ },
105
+ {
106
+ intent: "minimal",
107
+ isDisabled: !0,
108
+ isActive: !1,
109
+ class: "text-neutral-600"
110
+ },
111
+ {
112
+ intent: "minimal",
113
+ isDisabled: !0,
114
+ isActive: !0,
115
+ class: "text-neutral-700"
116
+ },
117
+ {
118
+ intent: "error",
119
+ isDisabled: !0,
120
+ isActive: !1,
121
+ class: "text-neutral-600"
122
+ },
123
+ {
124
+ intent: "error",
125
+ isDisabled: !0,
126
+ isActive: !0,
127
+ class: "bg-error-300 text-primary-100"
128
+ }
129
+ ], a = e(
130
+ "inline-flex items-center justify-center rounded-lg border border-transparent transition duration-150 ease-in-out focus:outline-none",
131
+ {
132
+ variants: {
133
+ intent: {
134
+ primary: "bg-transparent text-primary-500",
135
+ secondary: "bg-primary-200 text-primary-500",
136
+ minimal: "bg-transparent text-neutral-700",
137
+ error: "bg-transparent text-error-500"
138
+ },
139
+ size: {
140
+ xxs: "p-1",
141
+ xs: "p-2",
142
+ sm: "p-2.5",
143
+ md: "p-3",
144
+ lg: "p-4"
145
+ },
146
+ isDisabled: {
147
+ true: "pointer-events-none cursor-not-allowed"
148
+ },
149
+ isHovered: {
150
+ true: ""
151
+ },
152
+ isActive: {
153
+ true: ""
154
+ },
155
+ isFocused: {
156
+ false: "",
157
+ true: "focus:outline-none focus:ring-offset-2 outline-none ring-2 ring-sky-400"
158
+ }
159
+ },
160
+ compoundVariants: [...t, ...r, ...i]
161
+ }
162
+ );
13
163
  export {
14
- o as validateMinDistance
164
+ a as buttonVariants
15
165
  };
@@ -1,139 +1,12 @@
1
- import { j as n } from "./index.es24.js";
2
- import { Button as w } from "react-aria-components";
3
- import { cn as e } from "./index.es25.js";
4
- import { selectContainerVariant as v, selectBadgeValueVariant as j } from "./index.es32.js";
5
- const k = ({
6
- isDisabled: l,
7
- size: c,
8
- selectButtonClassName: i,
9
- setIsOpen: p,
10
- isOpen: d,
11
- value: r,
12
- placeholder: L,
13
- items: a,
14
- keyIdName: N,
15
- keyLabelName: g,
16
- visibleItems: o,
17
- handleDeleteOptionSelected: B,
18
- maxLengthTextOption: h,
19
- hiddenDiscardButton: x,
20
- containerRef: Z,
21
- setTooltipMessage: s,
22
- hasOverflow: M,
23
- isCalculatingChips: R
24
- }) => /* @__PURE__ */ n.jsxs(
25
- w,
26
- {
27
- className: ({ isFocusVisible: t, isHovered: f }) => e(
28
- v({
29
- isDisabled: l,
30
- isFocusVisible: t,
31
- size: c,
32
- isHovered: f
33
- }),
34
- i
35
- ),
36
- onPress: () => {
37
- p(!d), s("");
38
- },
39
- children: [
40
- /* @__PURE__ */ n.jsx("div", { ref: Z, className: e("no-scrollbar mr-[5px] flex flex-1 overflow-hidden"), children: r.length ? /* @__PURE__ */ n.jsxs("div", { className: "flex flex-1", children: [
41
- r == null ? void 0 : r.slice(0, o).map((t, f) => {
42
- var m;
43
- const C = ((m = a == null ? void 0 : a.find((u) => u[N] === t)) == null ? void 0 : m[g]) ?? "", V = C.length > h ? `${C.slice(0, h)}...` : C;
44
- return /* @__PURE__ */ n.jsxs(
45
- "div",
46
- {
47
- "data-chip": !0,
48
- className: e(
49
- j({
50
- isDisabled: l,
51
- isLastItem: f + 1 < o,
52
- size: c,
53
- hiddenDiscardButton: x
54
- })
55
- ),
56
- children: [
57
- /* @__PURE__ */ n.jsx(
58
- "div",
59
- {
60
- onMouseEnter: () => C.length > h ? s(C) : s(""),
61
- onMouseLeave: () => s(""),
62
- children: /* @__PURE__ */ n.jsx("p", { className: "whitespace-nowrap font-normal", children: V })
63
- }
64
- ),
65
- !x && /* @__PURE__ */ n.jsx(
66
- w,
67
- {
68
- className: e("outline-none", l ? "cursor-not-allowed" : ""),
69
- isDisabled: l,
70
- slot: null,
71
- onPress: () => B(t),
72
- children: /* @__PURE__ */ n.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
73
- /* @__PURE__ */ n.jsx(
74
- "path",
75
- {
76
- fillRule: "evenodd",
77
- clipRule: "evenodd",
78
- d: "M7.00004 12.6667C10.1297 12.6667 12.6667 10.1297 12.6667 7.00004C12.6667 3.87043 10.1297 1.33337 7.00004 1.33337C3.87043 1.33337 1.33337 3.87043 1.33337 7.00004C1.33337 10.1297 3.87043 12.6667 7.00004 12.6667ZM7.00004 13.6667C10.6819 13.6667 13.6667 10.6819 13.6667 7.00004C13.6667 3.31814 10.6819 0.333374 7.00004 0.333374C3.31814 0.333374 0.333374 3.31814 0.333374 7.00004C0.333374 10.6819 3.31814 13.6667 7.00004 13.6667Z",
79
- fill: l ? "#979BB4" : "#0C0645"
80
- }
81
- ),
82
- /* @__PURE__ */ n.jsx(
83
- "path",
84
- {
85
- d: "M4.64649 8.64649C4.45123 8.84175 4.45123 9.15833 4.64649 9.35359C4.84175 9.54886 5.15834 9.54886 5.3536 9.35359L7.00005 7.70715L8.65343 9.36053C8.84869 9.55579 9.16527 9.55579 9.36053 9.36053C9.55579 9.16526 9.55579 8.84868 9.36053 8.65342L7.70715 7.00004L9.36054 5.34666C9.5558 5.15139 9.5558 4.83481 9.36054 4.63955C9.16527 4.44429 8.84869 4.44429 8.65343 4.63955L7.00005 6.29293L5.35359 4.64648C5.15833 4.45122 4.84175 4.45122 4.64649 4.64648C4.45123 4.84174 4.45123 5.15833 4.64649 5.35359L6.29294 7.00004L4.64649 8.64649Z",
86
- fill: l ? "#979BB4" : "#0C0645"
87
- }
88
- )
89
- ] })
90
- }
91
- )
92
- ]
93
- },
94
- t
95
- );
96
- }),
97
- M && r.length > o && !R && /* @__PURE__ */ n.jsx(
98
- "div",
99
- {
100
- className: e(
101
- j({
102
- isDisabled: l,
103
- isLastItem: !1,
104
- size: c,
105
- hiddenDiscardButton: x
106
- }),
107
- "ml-1"
108
- ),
109
- children: /* @__PURE__ */ n.jsxs("p", { className: "whitespace-nowrap font-normal", children: [
110
- "+",
111
- (r == null ? void 0 : r.length) - o
112
- ] })
113
- }
114
- )
115
- ] }) : /* @__PURE__ */ n.jsx("p", { className: e("flex-1 text-left font-normal text-neutral-700"), children: L }) }),
116
- /* @__PURE__ */ n.jsx(
117
- "svg",
118
- {
119
- className: `${d ? "rotate-180" : ""} transition-transform duration-100`,
120
- width: "20",
121
- height: "10",
122
- viewBox: "0 0 20 10",
123
- fill: "none",
124
- xmlns: "http://www.w3.org/2000/svg",
125
- children: /* @__PURE__ */ n.jsx(
126
- "path",
127
- {
128
- d: "M20 0.838022C20.0006 0.947676 19.9796 1.05638 19.9381 1.15789C19.8967 1.2594 19.8356 1.35173 19.7584 1.42959L12.9512 8.23676C12.5642 8.62472 12.1045 8.93252 11.5984 9.14254C11.0922 9.35256 10.5497 9.46066 10.0017 9.46066C9.45373 9.46066 8.91115 9.35256 8.40502 9.14254C7.8989 8.93252 7.43918 8.62472 7.0522 8.23676L0.245034 1.42959C0.167349 1.3519 0.105725 1.25968 0.0636824 1.15818C0.0216393 1.05667 5.62088e-09 0.947886 0 0.838023C-5.62081e-09 0.728159 0.0216393 0.619372 0.0636824 0.51787C0.105725 0.41637 0.167349 0.324143 0.245034 0.246458C0.32272 0.168773 0.414946 0.107149 0.516447 0.0651056C0.617948 0.0230624 0.726736 0.00142351 0.8366 0.00142351C0.946464 0.00142351 1.05525 0.0230624 1.15675 0.0651055C1.25825 0.107149 1.35048 0.168773 1.42817 0.246458L8.23533 7.05363C8.704 7.52171 9.33931 7.78463 10.0017 7.78463C10.6641 7.78463 11.2994 7.52171 11.7681 7.05363L18.5752 0.246457C18.6527 0.168363 18.7448 0.106378 18.8464 0.0640783C18.9479 0.0217776 19.0568 4.80781e-09 19.1668 0C19.2768 -4.80789e-09 19.3857 0.0217776 19.4872 0.0640782C19.5888 0.106378 19.6809 0.168363 19.7584 0.246457C19.8356 0.324311 19.8967 0.41664 19.9381 0.518154C19.9796 0.619668 20.0006 0.728369 20 0.838022Z",
129
- fill: "#73768C"
130
- }
131
- )
132
- }
133
- )
134
- ]
135
- }
136
- );
1
+ import { j as d } from "./index.es24.js";
2
+ import { forwardRef as p } from "react";
3
+ import { cn as f } from "./index.es25.js";
4
+ import { overlayVariants as v } from "./index.es64.js";
5
+ const y = (e, a) => {
6
+ const { zIndex: s = 200, opacity: t = "md", blur: o = "sm", children: m, className: c, center: r = !0, fixed: i, ...n } = e, l = f(v({ opacity: t, fixed: i, center: r, blur: o }), `z-[${s}]`, c);
7
+ return /* @__PURE__ */ d.jsx("div", { ref: a, className: l, "data-center": r || void 0, ...n, children: m });
8
+ }, x = p(y);
9
+ x.displayName = "Overlay";
137
10
  export {
138
- k as SelectContent
11
+ x as Overlay
139
12
  };
@@ -1,29 +1,102 @@
1
- import { j as o } from "./index.es24.js";
2
- import { cn as r } from "./index.es25.js";
3
- import { tooltipVariants as m } from "./index.es33.js";
4
- const d = ({
5
- children: a,
6
- supportText: t,
7
- mode: s = "dark",
8
- className: l,
9
- placement: e = "top",
10
- size: n = "sm"
11
- }) => {
12
- const i = r(m({ placement: e, size: n, mode: s, hasSupportText: !!t }), l);
13
- return /* @__PURE__ */ o.jsxs("span", { className: i, children: [
14
- a,
15
- t ? /* @__PURE__ */ o.jsx(
1
+ import { j as r } from "./index.es24.js";
2
+ import { cn as v } from "./index.es25.js";
3
+ import { SliderThumb as s } from "./index.es65.js";
4
+ const j = ({
5
+ state: e,
6
+ type: n,
7
+ showTypeValue: t,
8
+ suffix: l,
9
+ classNameFilled: x,
10
+ classNameUnfilled: g,
11
+ modeTooltip: u,
12
+ positionTooltip: c,
13
+ classNameThumb: m,
14
+ isHiddenValue: a
15
+ }) => /* @__PURE__ */ r.jsxs("div", { className: "relative", children: [
16
+ t === "default" && !a ? /* @__PURE__ */ r.jsxs("div", { className: "flex justify-between", children: [
17
+ /* @__PURE__ */ r.jsxs(
16
18
  "div",
17
19
  {
18
- className: r(
19
- "!text-sm !font-normal !leading-[19.07px]",
20
- s === "dark" ? "!text-blue-50" : "!text-neutral-700"
21
- ),
22
- children: t
20
+ className: "absolute top-4 text-sm text-neutral-900",
21
+ style: { left: `${e.getThumbPercent(0) * 100}%`, transform: "translateX(-50%)" },
22
+ children: [
23
+ e.values[0],
24
+ l
25
+ ]
23
26
  }
24
- ) : null
25
- ] });
26
- };
27
+ ),
28
+ n === "range" && /* @__PURE__ */ r.jsxs(
29
+ "div",
30
+ {
31
+ className: "absolute top-4 text-sm text-neutral-900",
32
+ style: { left: `${e.getThumbPercent(1) * 100}%`, transform: "translateX(-50%)" },
33
+ children: [
34
+ e.values[1],
35
+ l
36
+ ]
37
+ }
38
+ )
39
+ ] }) : null,
40
+ /* @__PURE__ */ r.jsx(
41
+ "div",
42
+ {
43
+ className: v("absolute top-1/2 h-2 w-full -translate-y-1/2 rounded-full bg-primary-100", g)
44
+ }
45
+ ),
46
+ /* @__PURE__ */ r.jsx(
47
+ "div",
48
+ {
49
+ className: v("absolute top-1/2 h-2 -translate-y-1/2 rounded-full bg-primary-500", x),
50
+ style: {
51
+ width: `${n === "range" ? e.getThumbPercent(1) * 100 - e.getThumbPercent(0) * 100 : e.getThumbPercent(0) * 100}%`,
52
+ left: n === "range" ? `${e.getThumbPercent(0) * 100}%` : "0%"
53
+ }
54
+ }
55
+ ),
56
+ n === "range" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
57
+ /* @__PURE__ */ r.jsx(
58
+ s,
59
+ {
60
+ index: 0,
61
+ valuePercent: e.getThumbPercent(0),
62
+ value: e.values[0],
63
+ suffix: l,
64
+ modeTooltip: u,
65
+ positionTooltip: c,
66
+ showTypeValue: t,
67
+ isHiddenValue: a,
68
+ classNameThumb: m
69
+ }
70
+ ),
71
+ /* @__PURE__ */ r.jsx(
72
+ s,
73
+ {
74
+ index: 1,
75
+ valuePercent: e.getThumbPercent(1),
76
+ value: e.values[1],
77
+ suffix: l,
78
+ modeTooltip: u,
79
+ positionTooltip: c,
80
+ showTypeValue: t,
81
+ isHiddenValue: a,
82
+ classNameThumb: m
83
+ }
84
+ )
85
+ ] }) : /* @__PURE__ */ r.jsx(
86
+ s,
87
+ {
88
+ index: 0,
89
+ valuePercent: e.getThumbPercent(0),
90
+ value: e.values[0],
91
+ suffix: l,
92
+ modeTooltip: u,
93
+ positionTooltip: c,
94
+ showTypeValue: t,
95
+ isHiddenValue: a,
96
+ classNameThumb: m
97
+ }
98
+ )
99
+ ] });
27
100
  export {
28
- d as TooltipSelect
101
+ j as SliderContainerTrack
29
102
  };
@@ -1,12 +1,15 @@
1
- import { j as d } from "./index.es24.js";
2
- import { forwardRef as p } from "react";
3
- import { cn as f } from "./index.es25.js";
4
- import { overlayVariants as v } from "./index.es59.js";
5
- const y = (e, a) => {
6
- const { zIndex: s = 200, opacity: t = "md", blur: o = "sm", children: m, className: c, center: r = !0, fixed: i, ...n } = e, l = f(v({ opacity: t, fixed: i, center: r, blur: o }), `z-[${s}]`, c);
7
- return /* @__PURE__ */ d.jsx("div", { ref: a, className: l, "data-center": r || void 0, ...n, children: m });
8
- }, x = p(y);
9
- x.displayName = "Overlay";
1
+ const o = (e, g, r = 1) => {
2
+ if (g === "range" && Array.isArray(e) && e.length === 2) {
3
+ const [t, f] = e;
4
+ if (f - t < r) {
5
+ if (t > f - r)
6
+ return [f - r, f];
7
+ if (f < t + r)
8
+ return [t, t + r];
9
+ }
10
+ }
11
+ return e;
12
+ };
10
13
  export {
11
- x as Overlay
14
+ o as validateMinDistance
12
15
  };