@spear-ai/spectral 1.11.3 → 1.12.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 (109) hide show
  1. package/README.md +4 -0
  2. package/dist/.js +124 -121
  3. package/dist/{Accordion-CDXdSAST.js → Accordion-Cyrb2byI.js} +1 -1
  4. package/dist/Accordion.js +1 -1
  5. package/dist/Alert/AlertBase.js +1 -1
  6. package/dist/Alert.js +3 -3
  7. package/dist/{AnimatePresence-D-9jXfgI.js → AnimatePresence-D9FLxIGV.js} +1 -1
  8. package/dist/Avatar.js +46 -48
  9. package/dist/Badge.js +1 -1
  10. package/dist/Button.js +1 -1
  11. package/dist/ButtonGroup/ButtonGroupButton.js +1 -1
  12. package/dist/ButtonGroup.js +1 -1
  13. package/dist/ButtonIcon.js +1 -1
  14. package/dist/{Calendar-s4lyijkn.js → Calendar-Cnh_PTbQ.js} +4 -4
  15. package/dist/Checkbox/CheckboxBase.js +1 -1
  16. package/dist/Checkbox.d.ts +10 -3
  17. package/dist/Checkbox.js +55 -35
  18. package/dist/Combobox/ComboboxBase.js +1 -1
  19. package/dist/Combobox.d.ts +5 -3
  20. package/dist/Combobox.js +64 -70
  21. package/dist/{ComboboxBase-qX-mQhT6.js → ComboboxBase-BzDGK36x.js} +1 -1
  22. package/dist/ControlGroup/ControlGroupSelect.d.ts +5 -2
  23. package/dist/ControlGroup/ControlGroupSelect.js +32 -29
  24. package/dist/ControlGroup.d.ts +3 -2
  25. package/dist/ControlGroup.js +41 -33
  26. package/dist/DataCard/Card.js +1 -1
  27. package/dist/DataCard.js +1 -1
  28. package/dist/DateTimePicker/Calendar.js +1 -1
  29. package/dist/DateTimePicker/DateTimeDisplayInput.js +84 -83
  30. package/dist/DateTimePicker/DateTimeInput.js +2 -2
  31. package/dist/DateTimePicker/DateTimeUtils.js +1 -1
  32. package/dist/DateTimePicker/TimePeriodSelect.js +32 -35
  33. package/dist/DateTimePicker/TimePicker.js +2 -2
  34. package/dist/DateTimePicker.d.ts +1 -1
  35. package/dist/DateTimePicker.js +55 -52
  36. package/dist/{DateTimeUtils-DVvG6H-p.js → DateTimeUtils-BJUAMuot.js} +1 -1
  37. package/dist/Dialog.js +1 -1
  38. package/dist/DropdownMenu.d.ts +61 -0
  39. package/dist/DropdownMenu.js +869 -0
  40. package/dist/{HoverCard-CYDsIiVK.js → HoverCard-DERasp0v.js} +1 -1
  41. package/dist/HoverCard.js +1 -1
  42. package/dist/Icons/AdjustmentsIcon.d.ts +5 -0
  43. package/dist/Icons/AdjustmentsIcon.js +78 -0
  44. package/dist/Icons/MenuDotsIcon.d.ts +5 -0
  45. package/dist/Icons/MenuDotsIcon.js +36 -0
  46. package/dist/Icons/MenuIcon.d.ts +5 -0
  47. package/dist/Icons/MenuIcon.js +36 -0
  48. package/dist/Icons/index.d.ts +3 -0
  49. package/dist/Icons.js +81 -78
  50. package/dist/IconsAnimated/PanelLeftCloseIcon.js +3 -3
  51. package/dist/IconsAnimated/PanelLeftOpenIcon.js +3 -3
  52. package/dist/Input.js +1 -1
  53. package/dist/InputNumeric.js +1 -1
  54. package/dist/{InputOTP-cVn5Bzyp.js → InputOTP-BkSw_KIB.js} +12 -10
  55. package/dist/InputOTP.js +1 -1
  56. package/dist/Kbd.js +1 -1
  57. package/dist/Label.js +1 -1
  58. package/dist/MultiSelect/MultiSelectBase.d.ts +6 -4
  59. package/dist/MultiSelect/MultiSelectBase.js +222 -201
  60. package/dist/MultiSelect.d.ts +2 -1
  61. package/dist/MultiSelect.js +14 -12
  62. package/dist/Popover.js +1 -1
  63. package/dist/RadioButton.js +1 -1
  64. package/dist/RadioButtonGroup/RadioButtonGroupBase.js +1 -1
  65. package/dist/RadioButtonGroup.js +1 -1
  66. package/dist/RadioGroup-DqKggFnI.js +328 -0
  67. package/dist/RadioGroup.d.ts +7 -0
  68. package/dist/RadioGroup.js +1 -1
  69. package/dist/Select.d.ts +5 -2
  70. package/dist/Select.js +98 -86
  71. package/dist/Separator.js +1 -1
  72. package/dist/Skeleton.js +1 -1
  73. package/dist/{Slider-BzzZT3Zm.js → Slider-CfUFkWU4.js} +1 -1
  74. package/dist/Slider.js +1 -1
  75. package/dist/Switch-Wj_zov--.js +144 -0
  76. package/dist/Switch.d.ts +12 -3
  77. package/dist/Switch.js +1 -1
  78. package/dist/Tabs/TabsBase.js +4 -4
  79. package/dist/Tabs.js +1 -1
  80. package/dist/Textarea.d.ts +3 -2
  81. package/dist/Textarea.js +50 -45
  82. package/dist/{Toast-9zqXxKKO.js → Toast-CJvzLlMD.js} +1 -1
  83. package/dist/Toast.js +1 -1
  84. package/dist/Toggle.js +1 -1
  85. package/dist/ToggleGroup.js +1 -1
  86. package/dist/{Tooltip-D1K8kY1y.js → Tooltip-BR0tdif4.js} +2 -2
  87. package/dist/Tooltip.js +1 -1
  88. package/dist/Tray.js +4 -4
  89. package/dist/{chunk-h9knIhTc.js → chunk-C4rFPcKS.js} +1 -1
  90. package/dist/dist-DcUGLq_y.js +149 -0
  91. package/dist/main.js +1 -1
  92. package/dist/primitives/button.js +1 -1
  93. package/dist/primitives/input-group.js +1 -1
  94. package/dist/primitives/input.js +1 -1
  95. package/dist/primitives/popover.js +1 -1
  96. package/dist/primitives/select.js +13 -13
  97. package/dist/primitives/textarea.js +1 -1
  98. package/dist/{proxy-Dn10Pl_g.js → proxy-CCB7C4Pu.js} +10 -10
  99. package/dist/styles/spectral.css +1 -1
  100. package/dist/{twUtils-VNWgstKL.js → twUtils-D_qzdiwM.js} +1 -1
  101. package/dist/{use-animation-CBUDycyW.js → use-animation-C-qL83hj.js} +1 -1
  102. package/dist/utils/formFieldUtils.d.ts +15 -1
  103. package/dist/utils/formFieldUtils.d.ts.map +1 -1
  104. package/dist/utils/formFieldUtils.js +35 -19
  105. package/dist/utils/twUtils.js +1 -1
  106. package/package.json +26 -22
  107. package/dist/RadioGroup-w_q6RGEK.js +0 -447
  108. package/dist/Switch-CVzRJ-0n.js +0 -126
  109. /package/dist/{dist-B4FgboI8.js → dist-Cujfuel1.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { t as e } from "../twUtils-VNWgstKL.js";
1
+ import { t as e } from "../twUtils-D_qzdiwM.js";
2
2
  import { t } from "../dist-B4g6zpUF.js";
3
3
  import { PrimitiveButton as n } from "./button.js";
4
4
  import { Input as r } from "./input.js";
@@ -1,4 +1,4 @@
1
- import { t as e } from "../twUtils-VNWgstKL.js";
1
+ import { t as e } from "../twUtils-D_qzdiwM.js";
2
2
  import "react";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
4
  //#region src/primitives/input.tsx
@@ -1,4 +1,4 @@
1
- import { t as e } from "../twUtils-VNWgstKL.js";
1
+ import { t as e } from "../twUtils-D_qzdiwM.js";
2
2
  import { a as t, i as n, n as r, r as i, t as a } from "../dist-BtdmHAzK.js";
3
3
  import "react";
4
4
  import { jsx as o } from "react/jsx-runtime";
@@ -2,7 +2,7 @@
2
2
  import { CheckmarkIcon as e } from "../Icons/CheckmarkIcon.js";
3
3
  import { ChevronDownIcon as t } from "../Icons/ChevronDownIcon.js";
4
4
  import { ChevronUpIcon as n } from "../Icons/ChevronUpIcon.js";
5
- import { t as r } from "../twUtils-VNWgstKL.js";
5
+ import { t as r } from "../twUtils-D_qzdiwM.js";
6
6
  import { getDropdownSurfaceClasses as i } from "../utils/formFieldUtils.js";
7
7
  import { useAutoDropdownHorizontalShift as a } from "../utils/dropdownPositioning.js";
8
8
  import { a as o, c as s, d as c, f as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b } from "../dist-fW81qjVl.js";
@@ -57,24 +57,24 @@ var w = 12, T = (e) => {
57
57
  })
58
58
  })]
59
59
  }), j = ({ align: e = "center", children: t, className: n, dropdownWidth: o = "trigger", onCloseAutoFocus: c, onFocusCapture: l, position: d = "popper", style: f, ...p }) => {
60
- let m = x(!1), { dropdownShiftStyle: h, recalculateDropdownPosition: g, setDropdownElement: _ } = a(), v = o === "trigger" ? "var(--radix-select-trigger-width)" : o === "content" ? "max-content" : o, b = o === "trigger" || o === "content" ? o : "custom", w = (e) => {
61
- if (l?.(e), m.current) return;
62
- m.current = !0;
63
- let t = e.currentTarget;
64
- requestAnimationFrame(() => {
65
- E(t), g();
66
- });
67
- }, T = (e) => {
68
- m.current = !1, c?.(e);
69
- };
60
+ let m = x(!1), { dropdownShiftStyle: h, recalculateDropdownPosition: g, setDropdownElement: _ } = a(), v = o === "trigger" ? "var(--radix-select-trigger-width)" : o === "content" ? "max-content" : o, b = o === "trigger" || o === "content" ? o : "custom";
70
61
  return /* @__PURE__ */ S(s, { children: /* @__PURE__ */ C(y, {
71
62
  align: e,
72
63
  className: r("min-w-32 relative z-50 max-h-[--radix-select-content-available-height] origin-[--radix-select-content-transform-origin] overflow-x-hidden overflow-y-auto text-text-primary motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 motion-safe:data-[state=closed]:animate-out motion-safe:data-[state=closed]:fade-out-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:animate-in motion-safe:data-[state=open]:fade-in-0 motion-safe:data-[state=open]:zoom-in-95", i(), d === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", n),
73
64
  "data-dropdown-width-mode": b,
74
65
  "data-dropdown-width-value": b === "custom" ? o : void 0,
75
66
  "data-slot": "select-content",
76
- onCloseAutoFocus: T,
77
- onFocusCapture: w,
67
+ onCloseAutoFocus: (e) => {
68
+ m.current = !1, c?.(e);
69
+ },
70
+ onFocusCapture: (e) => {
71
+ if (l?.(e), m.current) return;
72
+ m.current = !0;
73
+ let t = e.currentTarget;
74
+ requestAnimationFrame(() => {
75
+ E(t), g();
76
+ });
77
+ },
78
78
  position: d,
79
79
  ref: _,
80
80
  style: {
@@ -1,4 +1,4 @@
1
- import { t as e } from "../twUtils-VNWgstKL.js";
1
+ import { t as e } from "../twUtils-D_qzdiwM.js";
2
2
  import "react";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
4
  //#region src/primitives/textarea.tsx
@@ -1,5 +1,5 @@
1
1
  import "./styles/main.css";
2
- import { a as e, n as t, r as n } from "./chunk-h9knIhTc.js";
2
+ import { a as e, n as t, r as n } from "./chunk-C4rFPcKS.js";
3
3
  import { Component as r, Fragment as i, createContext as a, createElement as o, forwardRef as s, useCallback as c, useContext as l, useEffect as u, useId as d, useInsertionEffect as f, useLayoutEffect as p, useMemo as m, useRef as h } from "react";
4
4
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
5
5
  //#region node_modules/.pnpm/framer-motion@12.38.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs
@@ -913,7 +913,7 @@ var W = (e) => e * 180 / Math.PI, wn = (e) => En(W(Math.atan2(e[1], e[0]))), Tn
913
913
  skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
914
914
  };
915
915
  function jn(e) {
916
- return e.includes("scale") ? 1 : 0;
916
+ return +!!e.includes("scale");
917
917
  }
918
918
  function Mn(e, t) {
919
919
  if (!e || e === "none") return jn(t);
@@ -963,7 +963,7 @@ function Bn(e) {
963
963
  let t = [];
964
964
  return zn.forEach((n) => {
965
965
  let r = e.getValue(n);
966
- r !== void 0 && (t.push([n, r.get()]), r.set(n.startsWith("scale") ? 1 : 0));
966
+ r !== void 0 && (t.push([n, r.get()]), r.set(+!!n.startsWith("scale")));
967
967
  }), t;
968
968
  }
969
969
  var G = {
@@ -1309,8 +1309,8 @@ var Cr = 40, wr = class extends bn {
1309
1309
  motionValue: c,
1310
1310
  element: l,
1311
1311
  ...u
1312
- };
1313
- this.keyframeResolver = new (l?.KeyframeResolver || Jn)(o, (e, t, n) => this.onKeyframesResolved(e, t, d, !n), s, c, l), this.keyframeResolver?.scheduleResolve();
1312
+ }, f = l?.KeyframeResolver || Jn;
1313
+ this.keyframeResolver = new f(o, (e, t, n) => this.onKeyframesResolved(e, t, d, !n), s, c, l), this.keyframeResolver?.scheduleResolve();
1314
1314
  }
1315
1315
  onKeyframesResolved(e, t, n, r) {
1316
1316
  this.keyframeResolver = void 0;
@@ -1791,7 +1791,7 @@ function hi(e) {
1791
1791
  if (t === "drop-shadow") return e;
1792
1792
  let [r] = n.match(Ze) || [];
1793
1793
  if (!r) return e;
1794
- let i = n.replace(r, ""), a = mi.has(t) ? 1 : 0;
1794
+ let i = n.replace(r, ""), a = +!!mi.has(t);
1795
1795
  return r !== n && (a *= 100), t + "(" + a + i + ")";
1796
1796
  }
1797
1797
  var gi = /\b([a-z-]*)\(.*?\)/gu, _i = {
@@ -2608,7 +2608,7 @@ function io(e, t, n) {
2608
2608
  let o = Fn[a], s = e[o];
2609
2609
  if (s === void 0) continue;
2610
2610
  let c = !0;
2611
- if (typeof s == "number") c = s === (o.startsWith("scale") ? 1 : 0);
2611
+ if (typeof s == "number") c = s === +!!o.startsWith("scale");
2612
2612
  else {
2613
2613
  let e = parseFloat(s);
2614
2614
  c = o.startsWith("scale") ? e === 1 : e === 0;
@@ -4872,14 +4872,14 @@ var ru = {
4872
4872
  root: t ? t.current : void 0,
4873
4873
  rootMargin: n,
4874
4874
  threshold: typeof r == "number" ? r : ru[r]
4875
- };
4876
- this.stopObserver = nu(this.node.current, a, (e) => {
4875
+ }, o = (e) => {
4877
4876
  let { isIntersecting: t } = e;
4878
4877
  if (this.isInView === t || (this.isInView = t, i && !t && this.hasEnteredView)) return;
4879
4878
  t && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", t);
4880
4879
  let { onViewportEnter: n, onViewportLeave: r } = this.node.getProps(), a = t ? n : r;
4881
4880
  a && a(e);
4882
- });
4881
+ };
4882
+ this.stopObserver = nu(this.node.current, a, o);
4883
4883
  }
4884
4884
  mount() {
4885
4885
  this.startObserver();