@simpli-route/apollo-ds 0.1.3 → 0.1.4

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 (104) hide show
  1. package/dist/components/Slider/Slider.d.ts +12 -0
  2. package/dist/components/Slider/SliderContainerTrack.d.ts +3 -0
  3. package/dist/components/Slider/SliderThumb.d.ts +3 -0
  4. package/dist/components/Slider/index.d.ts +2 -0
  5. package/dist/components/Slider/types.d.ts +68 -0
  6. package/dist/components/Slider/utils.d.ts +8 -0
  7. package/dist/components/index.d.ts +1 -0
  8. package/dist/index.cjs.js +1 -1
  9. package/dist/index.cjs10.js +1 -1
  10. package/dist/index.cjs11.js +1 -1
  11. package/dist/index.cjs12.js +1 -1
  12. package/dist/index.cjs13.js +1 -1
  13. package/dist/index.cjs14.js +1 -1
  14. package/dist/index.cjs15.js +1 -1
  15. package/dist/index.cjs16.js +1 -1
  16. package/dist/index.cjs17.js +1 -1
  17. package/dist/index.cjs18.js +1 -1
  18. package/dist/index.cjs19.js +1 -1
  19. package/dist/index.cjs2.js +1 -1
  20. package/dist/index.cjs20.js +1 -1
  21. package/dist/index.cjs21.js +1 -1
  22. package/dist/index.cjs23.js +1 -1
  23. package/dist/index.cjs24.js +1 -1
  24. package/dist/index.cjs25.js +1 -1
  25. package/dist/index.cjs26.js +1 -1
  26. package/dist/index.cjs27.js +1 -1
  27. package/dist/index.cjs28.js +1 -1
  28. package/dist/index.cjs29.js +1 -1
  29. package/dist/index.cjs3.js +1 -1
  30. package/dist/index.cjs30.js +1 -1
  31. package/dist/index.cjs31.js +1 -1
  32. package/dist/index.cjs32.js +1 -1
  33. package/dist/index.cjs33.js +1 -1
  34. package/dist/index.cjs34.js +1 -1
  35. package/dist/index.cjs35.js +1 -1
  36. package/dist/index.cjs36.js +1 -9
  37. package/dist/index.cjs37.js +1 -19
  38. package/dist/index.cjs38.js +1 -1
  39. package/dist/index.cjs39.js +9 -1
  40. package/dist/index.cjs4.js +1 -1
  41. package/dist/index.cjs40.js +19 -1
  42. package/dist/index.cjs41.js +1 -1
  43. package/dist/index.cjs42.js +1 -1
  44. package/dist/index.cjs43.js +1 -1
  45. package/dist/index.cjs44.js +1 -1
  46. package/dist/index.cjs45.js +1 -0
  47. package/dist/index.cjs46.js +1 -0
  48. package/dist/index.cjs47.js +1 -0
  49. package/dist/index.cjs48.js +1 -0
  50. package/dist/index.cjs5.js +1 -1
  51. package/dist/index.cjs6.js +1 -1
  52. package/dist/index.cjs7.js +1 -1
  53. package/dist/index.cjs8.js +1 -1
  54. package/dist/index.cjs9.js +1 -1
  55. package/dist/index.es.js +20 -18
  56. package/dist/index.es10.js +77 -32
  57. package/dist/index.es11.js +29 -20
  58. package/dist/index.es12.js +21 -25
  59. package/dist/index.es13.js +28 -8
  60. package/dist/index.es14.js +7 -7
  61. package/dist/index.es15.js +8 -6
  62. package/dist/index.es16.js +6 -6
  63. package/dist/index.es17.js +6 -22
  64. package/dist/index.es18.js +22 -173
  65. package/dist/index.es19.js +150 -20
  66. package/dist/index.es2.js +3 -3
  67. package/dist/index.es20.js +20 -36
  68. package/dist/index.es21.js +45 -78
  69. package/dist/index.es23.js +87 -17
  70. package/dist/index.es24.js +20 -28
  71. package/dist/index.es25.js +30 -10
  72. package/dist/index.es26.js +11 -12
  73. package/dist/index.es27.js +10 -19
  74. package/dist/index.es28.js +12 -20
  75. package/dist/index.es29.js +131 -10
  76. package/dist/index.es3.js +7 -7
  77. package/dist/index.es30.js +19 -10
  78. package/dist/index.es31.js +17 -28
  79. package/dist/index.es32.js +95 -130
  80. package/dist/index.es33.js +13 -11
  81. package/dist/index.es34.js +10 -45
  82. package/dist/index.es35.js +10 -2
  83. package/dist/index.es36.js +30 -29
  84. package/dist/index.es37.js +45 -599
  85. package/dist/index.es38.js +2 -2
  86. package/dist/index.es39.js +30 -2
  87. package/dist/index.es4.js +4 -4
  88. package/dist/index.es40.js +599 -19
  89. package/dist/index.es41.js +7 -7
  90. package/dist/index.es42.js +13 -15
  91. package/dist/index.es43.js +8 -8
  92. package/dist/index.es44.js +11 -9
  93. package/dist/index.es45.js +21 -0
  94. package/dist/index.es46.js +58 -0
  95. package/dist/index.es47.js +4 -0
  96. package/dist/index.es48.js +4 -0
  97. package/dist/index.es5.js +19 -18
  98. package/dist/index.es6.js +17 -16
  99. package/dist/index.es7.js +2 -2
  100. package/dist/index.es8.js +5 -5
  101. package/dist/index.es9.js +67 -74
  102. package/dist/stories/Checkbox.stories.d.ts +5 -0
  103. package/dist/style.css +34 -0
  104. package/package.json +1 -1
@@ -1,23 +1,21 @@
1
- import t from "react";
2
- const e = t, a = ({
1
+ import n from "react";
2
+ const e = n, l = ({
3
3
  title: r,
4
- titleId: n,
5
- ...l
6
- }, o) => /* @__PURE__ */ e.createElement("svg", Object.assign({
4
+ titleId: a,
5
+ ...o
6
+ }, t) => /* @__PURE__ */ e.createElement("svg", Object.assign({
7
7
  fill: "currentColor",
8
8
  "aria-hidden": "true",
9
9
  viewBox: "0 0 24 24",
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
- ref: o,
12
- "aria-labelledby": n
13
- }, l), r ? /* @__PURE__ */ e.createElement("title", {
14
- id: n
11
+ ref: t,
12
+ "aria-labelledby": a
13
+ }, o), r ? /* @__PURE__ */ e.createElement("title", {
14
+ id: a
15
15
  }, r) : null, /* @__PURE__ */ e.createElement("path", {
16
- fillRule: "evenodd",
17
- d: "M2 11.85c0-.47.35-.85.783-.85h18.434c.432 0 .783.38.783.85s-.35.85-.783.85H2.783c-.432 0-.783-.38-.783-.85",
18
- clipRule: "evenodd"
19
- })), c = e.forwardRef(a);
20
- var s = c;
16
+ d: "M11.999 2C17.522 2 22 6.477 22 12s-4.478 10-10.001 10S2 17.523 2 12C1.999 6.478 6.476 2 11.999 2m0 1.5a8.501 8.501 0 1 0 0 17 8.501 8.501 0 0 0 0-17m-.004 6.999a.75.75 0 0 1 .744.648l.007.102.004 5.5a.75.75 0 0 1-1.494.103l-.006-.101-.004-5.501a.75.75 0 0 1 .75-.75zM12 7.002A1 1 0 1 1 12.063 9 1 1 0 0 1 12 7.002"
17
+ })), c = e.forwardRef(l);
18
+ var f = c;
21
19
  export {
22
- s as M
20
+ f as I
23
21
  };
@@ -1,7 +1,7 @@
1
1
  import t from "react";
2
- const e = t, n = ({
2
+ const e = t, a = ({
3
3
  title: r,
4
- titleId: a,
4
+ titleId: n,
5
5
  ...l
6
6
  }, o) => /* @__PURE__ */ e.createElement("svg", Object.assign({
7
7
  fill: "currentColor",
@@ -9,15 +9,15 @@ const e = t, n = ({
9
9
  viewBox: "0 0 24 24",
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  ref: o,
12
- "aria-labelledby": a
12
+ "aria-labelledby": n
13
13
  }, l), r ? /* @__PURE__ */ e.createElement("title", {
14
- id: a
14
+ id: n
15
15
  }, r) : null, /* @__PURE__ */ e.createElement("path", {
16
16
  fillRule: "evenodd",
17
- d: "M11.885 2c.433 0 .783.35.783.783v8.434h8.549a.783.783 0 1 1 0 1.566h-8.549v8.434a.783.783 0 1 1-1.567 0v-8.434H2.783a.783.783 0 1 1 0-1.566h8.318V2.783c0-.432.351-.783.784-.783",
17
+ d: "M2 11.85c0-.47.35-.85.783-.85h18.434c.432 0 .783.38.783.85s-.35.85-.783.85H2.783c-.432 0-.783-.38-.783-.85",
18
18
  clipRule: "evenodd"
19
- })), c = e.forwardRef(n);
20
- var d = c;
19
+ })), c = e.forwardRef(a);
20
+ var s = c;
21
21
  export {
22
- d as P
22
+ s as M
23
23
  };
@@ -1,21 +1,23 @@
1
- import l from "react";
2
- const e = l, n = ({
1
+ import t from "react";
2
+ const e = t, n = ({
3
3
  title: r,
4
4
  titleId: a,
5
- ...o
6
- }, t) => /* @__PURE__ */ e.createElement("svg", Object.assign({
5
+ ...l
6
+ }, o) => /* @__PURE__ */ e.createElement("svg", Object.assign({
7
7
  fill: "currentColor",
8
8
  "aria-hidden": "true",
9
9
  viewBox: "0 0 24 24",
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
- ref: t,
11
+ ref: o,
12
12
  "aria-labelledby": a
13
- }, o), r ? /* @__PURE__ */ e.createElement("title", {
13
+ }, l), r ? /* @__PURE__ */ e.createElement("title", {
14
14
  id: a
15
15
  }, r) : null, /* @__PURE__ */ e.createElement("path", {
16
- d: "M2 15.892a.83.83 0 0 1 .242-.591l6.807-6.807a4.166 4.166 0 0 1 5.899 0l6.807 6.806a.835.835 0 0 1-.912 1.365.8.8 0 0 1-.271-.181l-6.807-6.807a2.5 2.5 0 0 0-3.533 0l-6.807 6.806A.833.833 0 0 1 2 15.893Z"
16
+ fillRule: "evenodd",
17
+ d: "M11.885 2c.433 0 .783.35.783.783v8.434h8.549a.783.783 0 1 1 0 1.566h-8.549v8.434a.783.783 0 1 1-1.567 0v-8.434H2.783a.783.783 0 1 1 0-1.566h8.318V2.783c0-.432.351-.783.784-.783",
18
+ clipRule: "evenodd"
17
19
  })), c = e.forwardRef(n);
18
- var i = c;
20
+ var d = c;
19
21
  export {
20
- i as U
22
+ d as P
21
23
  };
@@ -0,0 +1,21 @@
1
+ import l from "react";
2
+ const e = l, n = ({
3
+ title: r,
4
+ titleId: a,
5
+ ...o
6
+ }, t) => /* @__PURE__ */ e.createElement("svg", Object.assign({
7
+ fill: "currentColor",
8
+ "aria-hidden": "true",
9
+ viewBox: "0 0 24 24",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ ref: t,
12
+ "aria-labelledby": a
13
+ }, o), r ? /* @__PURE__ */ e.createElement("title", {
14
+ id: a
15
+ }, r) : null, /* @__PURE__ */ e.createElement("path", {
16
+ d: "M2 15.892a.83.83 0 0 1 .242-.591l6.807-6.807a4.166 4.166 0 0 1 5.899 0l6.807 6.806a.835.835 0 0 1-.912 1.365.8.8 0 0 1-.271-.181l-6.807-6.807a2.5 2.5 0 0 0-3.533 0l-6.807 6.806A.833.833 0 0 1 2 15.893Z"
17
+ })), c = e.forwardRef(n);
18
+ var i = c;
19
+ export {
20
+ i as U
21
+ };
@@ -0,0 +1,58 @@
1
+ import { j as r } from "./index.es16.js";
2
+ import { SliderThumb as l } from "react-aria-components";
3
+ import { cn as i } from "./index.es17.js";
4
+ import { Tooltip as d } from "./index.es12.js";
5
+ import { TooltipTrigger as g } from "./index.es13.js";
6
+ const j = ({
7
+ index: e,
8
+ valuePercent: m,
9
+ value: n,
10
+ suffix: a,
11
+ modeTooltip: p,
12
+ positionTooltip: o,
13
+ showTypeValue: s,
14
+ classNameThumb: t
15
+ }) => /* @__PURE__ */ r.jsx(
16
+ "div",
17
+ {
18
+ className: i("absolute", s === "tooltip" ? "top-[-6px]" : "top-1/2"),
19
+ style: { left: `${m * 100}%`, transform: "translate(-50%, -50%)" },
20
+ children: s === "tooltip" ? /* @__PURE__ */ r.jsxs(g, { closeDelay: 100, delay: 100, children: [
21
+ /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(
22
+ l,
23
+ {
24
+ index: e,
25
+ className: i(
26
+ "dragging:bg-primary-100 size-5 rounded-full bg-primary-500 outline-none ring-black transition focus-visible:ring-2",
27
+ t
28
+ )
29
+ }
30
+ ) }),
31
+ /* @__PURE__ */ r.jsxs(
32
+ d,
33
+ {
34
+ mode: p,
35
+ placement: o,
36
+ size: "sm",
37
+ className: i("!text-sm", o === "top" ? "!mb-6" : "!mt-6"),
38
+ children: [
39
+ n,
40
+ a
41
+ ]
42
+ }
43
+ )
44
+ ] }) : /* @__PURE__ */ r.jsx(
45
+ l,
46
+ {
47
+ index: e,
48
+ className: i(
49
+ "dragging:bg-primary-100 size-5 rounded-full bg-primary-500 outline-none ring-black transition focus-visible:ring-2",
50
+ t
51
+ )
52
+ }
53
+ )
54
+ }
55
+ );
56
+ export {
57
+ j as SliderThumb
58
+ };
@@ -0,0 +1,4 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
@@ -0,0 +1,4 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
package/dist/index.es5.js CHANGED
@@ -1,40 +1,41 @@
1
- import { j as s } from "./index.es15.js";
1
+ import { j as o } from "./index.es16.js";
2
2
  import { forwardRef as h } from "react";
3
- import { useContextProps as j, ButtonContext as B, Button as w } from "react-aria-components";
4
- import { cn as C } from "./index.es16.js";
5
- import { buttonVariants as N } from "./index.es32.js";
6
- function g(r, i) {
7
- const [c, a] = j(r, i, B), {
3
+ import { useContextProps as B, ButtonContext as j, Button as N } from "react-aria-components";
4
+ import { cn as w } from "./index.es17.js";
5
+ import { buttonVariants as C } from "./index.es29.js";
6
+ function I(r, i) {
7
+ const [a, c] = B(r, i, j), {
8
8
  intent: m = "secondary",
9
9
  size: f = "lg",
10
- isDisabled: o = !1,
10
+ isDisabled: s = !1,
11
11
  isActive: l = !1,
12
12
  children: t,
13
13
  className: p,
14
14
  ...u
15
- } = c, n = "flex h-full items-center overflow-hidden whitespace-nowrap";
16
- return /* @__PURE__ */ s.jsx(
17
- w,
15
+ } = a, n = "flex h-full items-center overflow-hidden whitespace-nowrap";
16
+ return /* @__PURE__ */ o.jsx(
17
+ N,
18
18
  {
19
- ref: a,
20
- className: ({ isPressed: e, isHovered: d, isFocusVisible: x }) => C(
21
- N({
19
+ ref: c,
20
+ className: ({ isPressed: e, isHovered: d, isFocusVisible: x }) => w(
21
+ C({
22
22
  intent: m,
23
23
  size: f,
24
- isDisabled: o,
24
+ isDisabled: s,
25
25
  isActive: l || e,
26
26
  isHovered: d,
27
27
  isFocused: x
28
28
  }),
29
29
  p
30
30
  ),
31
- isDisabled: o,
31
+ isDisabled: s,
32
32
  ...u,
33
- children: typeof t == "function" ? (e) => /* @__PURE__ */ s.jsx("span", { className: n + "p-2.", children: t(e) }) : /* @__PURE__ */ s.jsx("span", { className: n, children: t })
33
+ children: typeof t == "function" ? (e) => /* @__PURE__ */ o.jsx("span", { className: n + "p-2.", children: t(e) }) : /* @__PURE__ */ o.jsx("span", { className: n, children: t })
34
34
  }
35
35
  );
36
36
  }
37
- const A = h(g);
37
+ const g = h(I);
38
+ g.displayName = "IconButton";
38
39
  export {
39
- A as IconButton
40
+ g as IconButton
40
41
  };
package/dist/index.es6.js CHANGED
@@ -1,33 +1,34 @@
1
- import { j as t } from "./index.es15.js";
2
- import { InfoIcon as p } from "./index.es33.js";
1
+ import { j as t } from "./index.es16.js";
2
+ import { InfoIcon as p } from "./index.es26.js";
3
3
  import { forwardRef as u } from "react";
4
4
  import { useContextProps as d, LabelContext as b, Label as j } from "react-aria-components";
5
- import { cn as g } from "./index.es16.js";
6
- import { Tooltip as h } from "./index.es11.js";
7
- import { TooltipTrigger as L } from "./index.es12.js";
8
- function T(r, n) {
9
- const { labelClassName: a } = r, [o, m] = d(r, n, b), { children: s, tooltipText: l, tooltipSupportText: i, tooltipProps: e, isRequired: c = !1, ...x } = o;
10
- if (!s)
5
+ import { cn as L } from "./index.es17.js";
6
+ import { Tooltip as g } from "./index.es12.js";
7
+ import { TooltipTrigger as h } from "./index.es13.js";
8
+ function T(l, a) {
9
+ const { labelClassName: n } = l, [m, o] = d(l, a, b), { children: r, tooltipText: s, tooltipSupportText: i, tooltipProps: e, isRequired: c = !1, ...x } = m;
10
+ if (!r)
11
11
  return null;
12
- const f = g("flex select-none items-center text-sm leading-6 text-neutral-900", a);
13
- return /* @__PURE__ */ t.jsxs(j, { className: f, ...x, ref: m, children: [
14
- s,
12
+ const f = L("flex select-none items-center text-sm leading-6 text-neutral-900", n);
13
+ return /* @__PURE__ */ t.jsxs(j, { className: f, ...x, ref: o, children: [
14
+ r,
15
15
  c ? /* @__PURE__ */ t.jsx("span", { className: "ml-1 text-neutral-900", children: "*" }) : null,
16
- l ? /* @__PURE__ */ t.jsxs(L, { delay: 100, children: [
16
+ s ? /* @__PURE__ */ t.jsxs(h, { delay: 100, children: [
17
17
  /* @__PURE__ */ t.jsx(p, { className: "ml-1 size-4 text-primary-600" }),
18
18
  /* @__PURE__ */ t.jsx(
19
- h,
19
+ g,
20
20
  {
21
21
  placement: (e == null ? void 0 : e.placement) || "right",
22
22
  supportText: i,
23
23
  size: (e == null ? void 0 : e.size) || "sm",
24
- children: l
24
+ children: s
25
25
  }
26
26
  )
27
27
  ] }) : null
28
28
  ] });
29
29
  }
30
- const w = u(T);
30
+ const N = u(T);
31
+ N.displayName = "Label";
31
32
  export {
32
- w as Label
33
+ N as Label
33
34
  };
package/dist/index.es7.js CHANGED
@@ -1,6 +1,6 @@
1
- import { j as e } from "./index.es15.js";
1
+ import { j as e } from "./index.es16.js";
2
2
  import { useVisuallyHidden as a } from "react-aria";
3
- import { cn as l } from "./index.es16.js";
3
+ import { cn as l } from "./index.es17.js";
4
4
  const d = ({ className: s, label: r, size: t = "sm" }) => {
5
5
  const i = (() => {
6
6
  switch (t) {
package/dist/index.es8.js CHANGED
@@ -1,10 +1,10 @@
1
- import { j as r } from "./index.es15.js";
1
+ import { j as r } from "./index.es16.js";
2
2
  import { NumberField as g, Group as w, Input as B } from "react-aria-components";
3
- import { cn as l } from "./index.es16.js";
3
+ import { cn as l } from "./index.es17.js";
4
4
  import { Label as E } from "./index.es6.js";
5
- import { CaptionNumberField as G } from "./index.es25.js";
6
- import { StepperButton as S } from "./index.es26.js";
7
- import { inputNumberVariant as V } from "./index.es20.js";
5
+ import { CaptionNumberField as G } from "./index.es27.js";
6
+ import { StepperButton as S } from "./index.es28.js";
7
+ import { inputNumberVariant as V } from "./index.es21.js";
8
8
  const H = ({
9
9
  size: o = "sm",
10
10
  label: i,
package/dist/index.es9.js CHANGED
@@ -1,80 +1,73 @@
1
- import { j as o } from "./index.es15.js";
2
- import { Switch as u } from "react-aria-components";
3
- import { cn as c } from "./index.es16.js";
4
- import { ContentSwitch as L } from "./index.es27.js";
5
- import { SwitchIndicator as v } from "./index.es28.js";
6
- import { switchVariants as b } from "./index.es21.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
1
+ import { j as m } from "./index.es16.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.es17.js";
5
+ import { SliderContainerTrack as B } from "./index.es32.js";
6
+ import { validateMinDistance as F } from "./index.es33.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
20
24
  }) => {
21
- const j = e === "invalid" && !r, w = a === "sm" ? { offLeft: 3, onLeft: 19 } : { offLeft: 4, onLeft: 28 };
22
- return /* @__PURE__ */ o.jsxs(
23
- "label",
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));
32
+ }
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,
24
38
  {
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
- }
61
- ),
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
- ]
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
+ }
52
+ },
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
+ ) })
75
68
  }
76
- );
69
+ ) });
77
70
  };
78
71
  export {
79
- E as Switch
72
+ O as Slider
80
73
  };
@@ -12,6 +12,11 @@ declare const meta: {
12
12
  control: "text";
13
13
  };
14
14
  };
15
+ args: {
16
+ isSelected: false;
17
+ isDisabled: false;
18
+ isIndeterminate: false;
19
+ };
15
20
  };
16
21
  export default meta;
17
22
  type Story = StoryObj<typeof meta>;
package/dist/style.css CHANGED
@@ -775,12 +775,28 @@ select {
775
775
  .top-1\/2 {
776
776
  top: 50%;
777
777
  }
778
+ .top-4 {
779
+ top: 1rem;
780
+ }
781
+ .top-\[-6px\] {
782
+ top: -6px;
783
+ }
778
784
  .top-full {
779
785
  top: 100%;
780
786
  }
781
787
  .z-20 {
782
788
  z-index: 20;
783
789
  }
790
+ .my-6 {
791
+ margin-top: 1.5rem;
792
+ margin-bottom: 1.5rem;
793
+ }
794
+ .\!mb-6 {
795
+ margin-bottom: 1.5rem !important;
796
+ }
797
+ .\!mt-6 {
798
+ margin-top: 1.5rem !important;
799
+ }
784
800
  .mb-0 {
785
801
  margin-bottom: 0px;
786
802
  }
@@ -860,6 +876,12 @@ select {
860
876
  .h-16 {
861
877
  height: 4rem;
862
878
  }
879
+ .h-2 {
880
+ height: 0.5rem;
881
+ }
882
+ .h-3 {
883
+ height: 0.75rem;
884
+ }
863
885
  .h-4 {
864
886
  height: 1rem;
865
887
  }
@@ -997,6 +1019,9 @@ select {
997
1019
  .justify-center {
998
1020
  justify-content: center;
999
1021
  }
1022
+ .justify-between {
1023
+ justify-content: space-between;
1024
+ }
1000
1025
  .gap-1 {
1001
1026
  gap: 0.25rem;
1002
1027
  }
@@ -1526,6 +1551,10 @@ select {
1526
1551
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
1527
1552
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
1528
1553
  }
1554
+ .ring-black {
1555
+ --tw-ring-opacity: 1;
1556
+ --tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity));
1557
+ }
1529
1558
  .ring-sky-400 {
1530
1559
  --tw-ring-opacity: 1;
1531
1560
  --tw-ring-color: rgb(38 157 217 / var(--tw-ring-opacity));
@@ -1830,6 +1859,11 @@ select {
1830
1859
  outline: 2px solid transparent;
1831
1860
  outline-offset: 2px;
1832
1861
  }
1862
+ .focus-visible\:ring-2:focus-visible {
1863
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
1864
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
1865
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
1866
+ }
1833
1867
  .group:active .group-active\:border-primary-500 {
1834
1868
  --tw-border-opacity: 1;
1835
1869
  border-color: rgb(76 59 239 / var(--tw-border-opacity));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpli-route/apollo-ds",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"