@spear-ai/spectral 1.3.62 → 1.3.63

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 (164) hide show
  1. package/dist/.js +181 -152
  2. package/dist/Accordion.d.ts +37 -0
  3. package/dist/Accordion.js +465 -0
  4. package/dist/Alert/AlertBase.js +2 -2
  5. package/dist/Alert.js +4 -3
  6. package/dist/Avatar.js +1 -1
  7. package/dist/Badge.d.ts +12 -2
  8. package/dist/Badge.js +28 -4
  9. package/dist/Button.js +2 -2
  10. package/dist/ButtonGroup/ButtonGroupButton.d.ts +13 -0
  11. package/dist/ButtonGroup/ButtonGroupButton.js +51 -0
  12. package/dist/ButtonGroup.d.ts +29 -0
  13. package/dist/ButtonGroup.js +89 -0
  14. package/dist/ButtonIcon.js +2 -1
  15. package/dist/Checkbox/CheckboxBase.js +1 -1
  16. package/dist/Checkbox.js +11 -12
  17. package/dist/Dialog/DialogBase.d.ts +1 -1
  18. package/dist/Dialog/DialogBase.js +2 -2
  19. package/dist/Dialog.js +4 -4
  20. package/dist/Drawer.js +24 -1283
  21. package/dist/HoverCard.d.ts +29 -0
  22. package/dist/HoverCard.js +207 -0
  23. package/dist/Icons/MessagesIcon.d.ts +3 -0
  24. package/dist/Icons/MessagesIcon.js +31 -0
  25. package/dist/Icons/index.d.ts +1 -0
  26. package/dist/Icons.js +50 -48
  27. package/dist/Input.d.ts +2 -0
  28. package/dist/Input.js +98 -89
  29. package/dist/InputGroup.d.ts +16 -0
  30. package/dist/InputGroup.js +129 -0
  31. package/dist/InputOTP.d.ts +0 -2
  32. package/dist/InputOTP.js +138 -142
  33. package/dist/Label.d.ts +3 -7
  34. package/dist/Label.js +11 -11
  35. package/dist/MultiSelect/MultiSelectBase.js +22 -22
  36. package/dist/Popover.d.ts +6 -7
  37. package/dist/Popover.js +60 -71
  38. package/dist/RadioButtonGroup/RadioButtonGroupBase.js +1 -1
  39. package/dist/RadioButtonGroup.js +1 -1
  40. package/dist/RadioGroup.d.ts +1 -1
  41. package/dist/RadioGroup.js +141 -134
  42. package/dist/Select.js +97 -895
  43. package/dist/Separator.d.ts +12 -0
  44. package/dist/Separator.js +24 -0
  45. package/dist/Skeleton.js +3 -3
  46. package/dist/Slider.d.ts +15 -3
  47. package/dist/Slider.js +464 -40
  48. package/dist/Switch/SwitchBase.js +1 -1
  49. package/dist/Switch.js +2 -2
  50. package/dist/Tabs/TabsBase.js +1 -1
  51. package/dist/Tabs.js +16 -16
  52. package/dist/Textarea.js +41 -42
  53. package/dist/Toggle.js +2 -2
  54. package/dist/ToggleGroup.js +1 -1
  55. package/dist/Tooltip/TooltipBase.js +29 -29
  56. package/dist/Tooltip.js +15 -15
  57. package/dist/Tray/TrayStoriesData.d.ts +39 -0
  58. package/dist/Tray/TrayStoriesData.js +438 -0
  59. package/dist/Tray.d.ts +28 -0
  60. package/dist/Tray.js +227 -0
  61. package/dist/clsx-OuTLNxxd.js +16 -0
  62. package/dist/components/Accordion/Accordion.d.ts +37 -0
  63. package/dist/components/Accordion/Accordion.d.ts.map +1 -0
  64. package/dist/components/Badge/Badge.d.ts +12 -2
  65. package/dist/components/Badge/Badge.d.ts.map +1 -1
  66. package/dist/components/ButtonGroup/ButtonGroup.d.ts +29 -0
  67. package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
  68. package/dist/components/ButtonGroup/ButtonGroupButton.d.ts +13 -0
  69. package/dist/components/ButtonGroup/ButtonGroupButton.d.ts.map +1 -0
  70. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  71. package/dist/components/Dialog/DialogBase.d.ts +1 -1
  72. package/dist/components/HoverCard/HoverCard.d.ts +29 -0
  73. package/dist/components/HoverCard/HoverCard.d.ts.map +1 -0
  74. package/dist/components/Icons/MessagesIcon.d.ts +3 -0
  75. package/dist/components/Icons/MessagesIcon.d.ts.map +1 -0
  76. package/dist/components/Icons/index.d.ts +1 -0
  77. package/dist/components/Icons/index.d.ts.map +1 -1
  78. package/dist/components/Input/Input.d.ts +2 -0
  79. package/dist/components/Input/Input.d.ts.map +1 -1
  80. package/dist/components/InputGroup/InputGroup.d.ts +16 -0
  81. package/dist/components/InputGroup/InputGroup.d.ts.map +1 -0
  82. package/dist/components/InputOTP/InputOTP.d.ts +0 -2
  83. package/dist/components/InputOTP/InputOTP.d.ts.map +1 -1
  84. package/dist/components/Label/Label.d.ts +3 -7
  85. package/dist/components/Label/Label.d.ts.map +1 -1
  86. package/dist/components/Popover/Popover.d.ts +6 -7
  87. package/dist/components/Popover/Popover.d.ts.map +1 -1
  88. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  89. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  90. package/dist/components/Separator/Separator.d.ts +12 -0
  91. package/dist/components/Separator/Separator.d.ts.map +1 -0
  92. package/dist/components/Slider/Slider.d.ts +15 -3
  93. package/dist/components/Slider/Slider.d.ts.map +1 -1
  94. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  95. package/dist/components/Tray/Tray.d.ts +28 -0
  96. package/dist/components/Tray/Tray.d.ts.map +1 -0
  97. package/dist/components/Tray/TrayStoriesData.d.ts +39 -0
  98. package/dist/components/Tray/TrayStoriesData.d.ts.map +1 -0
  99. package/dist/features/AuthCard/ForgotPasswordEmailForm.js +4 -3
  100. package/dist/features/AuthCard/ForgotPasswordResetForm.js +9 -9
  101. package/dist/features/AuthCard/PasswordInput.js +78 -9
  102. package/dist/features/AuthCard/SignInForm.js +8 -7
  103. package/dist/features/AuthCard/SignUpForm.js +8 -7
  104. package/dist/features/AuthCard.js +2 -2
  105. package/dist/features/LabelingTools.js +7 -6
  106. package/dist/features/SensorMetadata.js +3 -2
  107. package/dist/features/SettingsPopover.js +3 -2
  108. package/dist/index-0ioNhtNM.js +10 -0
  109. package/dist/{index-CBwRmAsQ.js → index-6Abv_Flm.js} +1 -1
  110. package/dist/{index-DUK1rxhf.js → index-B-GQStVW.js} +6 -5
  111. package/dist/index-B2oBi8ng.js +142 -0
  112. package/dist/index-BIpuW_o8.js +146 -0
  113. package/dist/index-BZPx6jYI.js +8 -0
  114. package/dist/index-BhufZRa2.js +232 -0
  115. package/dist/index-CAKA12cC.js +1265 -0
  116. package/dist/{index-Cfyte2YO.js → index-CGALWSq_.js} +1 -1
  117. package/dist/index-CVSxKOPp.js +13 -0
  118. package/dist/index-CevVJ05e.js +822 -0
  119. package/dist/{index-CRBC94ik.js → index-D29mdTf5.js} +1 -1
  120. package/dist/{index-FeGk8zep.js → index-NzygPVvJ.js} +10 -9
  121. package/dist/index-UEFPWH8U.js +54 -0
  122. package/dist/index-rKs9bXHr.js +6 -0
  123. package/dist/{index-Cb7rjMhE.js → index-y6Br5T4h.js} +6 -6
  124. package/dist/index.d.ts +10 -1
  125. package/dist/index.d.ts.map +1 -1
  126. package/dist/linear-cursor-small.png +0 -0
  127. package/dist/message-alert-matte-glass-gradient.webp +0 -0
  128. package/dist/primitives/button.d.ts +10 -0
  129. package/dist/primitives/button.d.ts.map +1 -0
  130. package/dist/primitives/button.js +42 -0
  131. package/dist/primitives/input.d.ts +3 -0
  132. package/dist/primitives/input.d.ts.map +1 -0
  133. package/dist/primitives/input.js +18 -0
  134. package/dist/primitives/select.d.ts +16 -0
  135. package/dist/primitives/select.d.ts.map +1 -0
  136. package/dist/primitives/select.js +196 -0
  137. package/dist/primitives/slot.d.ts.map +1 -1
  138. package/dist/primitives/slot.js +21 -20
  139. package/dist/primitives/textarea.d.ts +3 -0
  140. package/dist/primitives/textarea.d.ts.map +1 -0
  141. package/dist/primitives/textarea.js +16 -0
  142. package/dist/{proxy-DD79Ok6n.js → proxy-C9AqCss6.js} +1 -1
  143. package/dist/speech-bubble-fluid-glass-gradient.webp +0 -0
  144. package/dist/styles/main.css +1 -1
  145. package/dist/utils/formFieldUtils.js +1 -1
  146. package/dist/utils/twUtils.js +2728 -2
  147. package/package.json +13 -8
  148. package/dist/Accordion/AccordionBase.d.ts +0 -42
  149. package/dist/Accordion/AccordionBase.js +0 -225
  150. package/dist/Badge/BadgeBase.d.ts +0 -13
  151. package/dist/Badge/BadgeBase.js +0 -35
  152. package/dist/PasswordInput-ClY_hxuN.js +0 -261
  153. package/dist/components/Accordion/AccordionBase.d.ts +0 -42
  154. package/dist/components/Accordion/AccordionBase.d.ts.map +0 -1
  155. package/dist/components/Badge/BadgeBase.d.ts +0 -13
  156. package/dist/components/Badge/BadgeBase.d.ts.map +0 -1
  157. package/dist/index-CA7haECj.js +0 -248
  158. package/dist/index-CbXx14YO.js +0 -59
  159. package/dist/index-VXXKXen4.js +0 -15
  160. package/dist/index-cCg4yNa8.js +0 -132
  161. package/dist/primitives/label.d.ts +0 -5
  162. package/dist/primitives/label.d.ts.map +0 -1
  163. package/dist/primitives/label.js +0 -27
  164. package/dist/twUtils-CRiPKpXj.js +0 -2743
package/dist/Tabs.js CHANGED
@@ -2,7 +2,7 @@ import "./styles/main.css";
2
2
  import { jsxs as f, jsx as l } from "react/jsx-runtime";
3
3
  import { TabsBase as w, TabsList as N, TabsTrigger as T, TabsContent as z } from "./Tabs/TabsBase.js";
4
4
  import { validateTabValues as k, getTabKeys as E } from "./Tabs/tabsUtils.js";
5
- import { c as r } from "./twUtils-CRiPKpXj.js";
5
+ import { cn as a } from "./utils/twUtils.js";
6
6
  import "react";
7
7
  const j = ({
8
8
  tabCount: n,
@@ -11,7 +11,7 @@ const j = ({
11
11
  /* @__PURE__ */ l(
12
12
  "div",
13
13
  {
14
- className: r(
14
+ className: a(
15
15
  "inline-flex w-full items-center justify-start",
16
16
  s === "horizontal" && "border-b border-neutral-600",
17
17
  s === "vertical" && "flex-col items-stretch border-r border-neutral-600"
@@ -19,7 +19,7 @@ const j = ({
19
19
  children: Array.from({ length: Math.min(n, 5) }, (i, t) => /* @__PURE__ */ l(
20
20
  "div",
21
21
  {
22
- className: r(
22
+ className: a(
23
23
  "animate-pulse rounded bg-neutral-600",
24
24
  s === "horizontal" ? "mx-2 my-2 h-6 w-16" : "mx-2 my-1 h-6 w-full"
25
25
  ),
@@ -37,7 +37,7 @@ const j = ({
37
37
  openOnLoad: i,
38
38
  orientation: t = "horizontal",
39
39
  tabValues: o = [],
40
- variant: a = "default",
40
+ variant: r = "default",
41
41
  activationMode: v = "automatic",
42
42
  loading: m = !1,
43
43
  onError: d,
@@ -84,7 +84,7 @@ const j = ({
84
84
  w,
85
85
  {
86
86
  "aria-label": n,
87
- className: r("relative w-full data-[orientation=vertical]:flex", a, s),
87
+ className: a("relative w-full data-[orientation=vertical]:flex", r, s),
88
88
  defaultValue: c,
89
89
  orientation: t,
90
90
  activationMode: v,
@@ -94,14 +94,14 @@ const j = ({
94
94
  /* @__PURE__ */ l(
95
95
  N,
96
96
  {
97
- className: r(
97
+ className: a(
98
98
  "inline-flex w-full items-center justify-start",
99
- t === "horizontal" && a === "default" && ["border-tabs-border border-b"],
100
- t === "vertical" && a === "default" && [
99
+ t === "horizontal" && r === "default" && ["border-tabs-border border-b"],
100
+ t === "vertical" && r === "default" && [
101
101
  "border-tabs-border relative m-0 h-auto w-auto flex-col items-stretch border-r py-1"
102
102
  ],
103
- t === "horizontal" && a === "enclosed" && ["bg-tabs-group-bg relative rounded-lg border-0 p-1"],
104
- t === "vertical" && a === "enclosed" && ["bg-tabs-group-bg w-auto flex-col rounded-lg border-0 p-1"]
103
+ t === "horizontal" && r === "enclosed" && ["bg-tabs-group-bg relative rounded-lg border-0 p-1"],
104
+ t === "vertical" && r === "enclosed" && ["bg-tabs-group-bg w-auto flex-col rounded-lg border-0 p-1"]
105
105
  ),
106
106
  children: o.filter((e) => e.key !== null).map((e) => /* @__PURE__ */ l(
107
107
  T,
@@ -110,16 +110,16 @@ const j = ({
110
110
  disabled: e.disabled,
111
111
  "aria-label": e["aria-label"],
112
112
  "aria-describedby": e["aria-describedby"],
113
- className: r(
113
+ className: a(
114
114
  "relative font-semibold whitespace-nowrap transition-all duration-500 ease-in-out focus:outline-none focus-visible:outline-none",
115
- t === "horizontal" && a === "default" && ["text-text-primary hover:text-accent hover:bg-tabs-bg--hover px-4 py-2"],
116
- t === "vertical" && a === "default" && [
115
+ t === "horizontal" && r === "default" && ["text-text-primary hover:text-accent hover:bg-tabs-bg--hover px-4 py-2"],
116
+ t === "vertical" && r === "default" && [
117
117
  "text-text-primary data-[state=active]:text-accent hover:text-accent hover:bg-tabs-bg--hover flex h-10 items-center px-4 py-2"
118
118
  ],
119
- t === "horizontal" && a === "enclosed" && [
119
+ t === "horizontal" && r === "enclosed" && [
120
120
  "text-text-primary data-[state=active]:text-accent hover:text-accent hover:bg-tabs-bg--hover z-[1] inline-flex items-center justify-center px-4 py-2"
121
121
  ],
122
- t === "vertical" && a === "enclosed" && [
122
+ t === "vertical" && r === "enclosed" && [
123
123
  "text-text-primary data-[state=active]:text-accent hover:text-accent hover:bg-tabs-bg--hover z-[1] px-4 py-2"
124
124
  ],
125
125
  "disabled:hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent"
@@ -134,7 +134,7 @@ const j = ({
134
134
  z,
135
135
  {
136
136
  value: e.key,
137
- className: r(
137
+ className: a(
138
138
  "focus-visible:outline-accent text-text-primary focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2",
139
139
  t === "horizontal" && "px-4 py-6",
140
140
  t === "vertical" && "py-0 ps-8",
package/dist/Textarea.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import "./styles/main.css";
3
3
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
4
- import { useTextarea as B } from "./Textarea/TextareaUtils.js";
4
+ import { useTextarea as z } from "./Textarea/TextareaUtils.js";
5
5
  import "./Icons/AnnotationsIcon.js";
6
6
  import "./Icons/CalendarIcon.js";
7
7
  import "./Icons/CheckCircleIcon.js";
@@ -29,9 +29,10 @@ import "./Icons/LabelIcon.js";
29
29
  import "./Icons/LassoIcon.js";
30
30
  import "./Icons/LineToolIcon.js";
31
31
  import "./Icons/LiveViewIcon.js";
32
- import { LoaderIcon as D } from "./Icons/LoaderIcon.js";
32
+ import { LoaderIcon as B } from "./Icons/LoaderIcon.js";
33
33
  import "./Icons/LocationIcon.js";
34
34
  import "./Icons/LogoutIcon.js";
35
+ import "./Icons/MessagesIcon.js";
35
36
  import "./Icons/MetadataIcon.js";
36
37
  import "./Icons/MinusIcon.js";
37
38
  import "./Icons/OntologyIcon.js";
@@ -49,78 +50,76 @@ import "./Icons/WarningIcon.js";
49
50
  import "./Icons/ZoomAllIcon.js";
50
51
  import "./Icons/ZoomXIcon.js";
51
52
  import "./Icons/ZoomYIcon.js";
52
- import { Label as E } from "./Label.js";
53
- import { useFormFieldId as O, getAriaProps as _, getErrorMessageId as $, getTextareaClasses as G, useFormFieldState as M } from "./utils/formFieldUtils.js";
54
- import { c as f } from "./twUtils-CRiPKpXj.js";
55
- import { forwardRef as V, useRef as H } from "react";
56
- const J = "absolute right-4 top-4", K = (r) => r || "off", Q = (r, t) => {
53
+ import { Label as D } from "./Label.js";
54
+ import { useFormFieldId as E, getAriaProps as O, getErrorMessageId as _, getTextareaClasses as $, useFormFieldState as G } from "./utils/formFieldUtils.js";
55
+ import { cn as h } from "./utils/twUtils.js";
56
+ import { forwardRef as M, useRef as V } from "react";
57
+ const H = "absolute right-4 top-4", J = (r) => r || "off", K = (r, t) => {
57
58
  const o = "absolute bottom-2 right-3 text-xs pointer-events-none z-10 tabular-nums", a = r >= t ? "text-danger-400" : "text-text-secondary";
58
- return f(o, a);
59
- }, U = V(
59
+ return h(o, a);
60
+ }, Q = M(
60
61
  ({
61
62
  className: r,
62
63
  state: t = "default",
63
64
  errorMessage: o,
64
65
  name: a,
65
- id: h,
66
+ id: f,
66
67
  label: n,
67
68
  placeholder: g,
68
69
  value: s = "",
69
- onFocus: b,
70
- onBlur: C,
70
+ onFocus: C,
71
+ onBlur: b,
71
72
  onChange: N,
72
73
  disabled: F,
73
74
  required: d,
74
75
  maxLength: i = 280,
75
76
  autoComplete: I,
76
- autoCorrect: v = "off",
77
77
  ...c
78
- }, S) => {
79
- const m = O(h, a), u = $(m), y = H(null), P = S || y, { handleFocus: w, handleBlur: A, handleChange: R, handlePaste: T } = B({
78
+ }, v) => {
79
+ const m = E(f, a), u = _(m), S = V(null), y = v || S, { handleFocus: P, handleBlur: w, handleChange: A, handlePaste: R } = z({
80
80
  maxLength: i,
81
81
  value: s,
82
82
  onChange: N,
83
- onFocus: b,
84
- onBlur: C
85
- }), { isDisabled: x, isLoading: L } = M(F, t), j = _(t, d, u, c["aria-describedby"]), p = s?.length || 0, k = G(t, r), z = () => ({
83
+ onFocus: C,
84
+ onBlur: b
85
+ }), { isDisabled: x, isLoading: T } = G(F, t), L = O(t, d, u, c["aria-describedby"]), p = s?.length || 0, j = $(t, r), k = () => ({
86
86
  "--textarea-min-height": "6rem",
87
87
  "--textarea-max-height": "12rem",
88
88
  "--textarea-border-radius": "0.5rem"
89
89
  });
90
90
  return /* @__PURE__ */ l("div", { className: "w-full", "data-testid": "textarea-root", children: [
91
- n && /* @__PURE__ */ e(E, { htmlFor: m, className: f("mb-2 block", x && "cursor-not-allowed opacity-50"), children: n }),
91
+ n && /* @__PURE__ */ e(D, { htmlFor: m, className: h("mb-2 block", x && "cursor-not-allowed opacity-50"), children: n }),
92
92
  /* @__PURE__ */ l("div", { className: "relative", "data-testid": "textarea-wrapper", children: [
93
93
  /* @__PURE__ */ e(
94
94
  "textarea",
95
95
  {
96
- ref: P,
97
- name: a,
98
- id: m,
99
- value: s,
96
+ "aria-multiline": "true",
97
+ autoComplete: J(I),
98
+ className: j,
99
+ "data-state": t,
100
+ "data-testid": "textarea-textarea",
100
101
  disabled: x,
101
- required: d,
102
- ...j,
103
- autoComplete: K(I),
104
- className: k,
105
- onFocus: w,
106
- onBlur: A,
107
- onChange: R,
108
- onPaste: T,
102
+ id: m,
103
+ name: a,
104
+ onBlur: w,
105
+ onChange: A,
106
+ onFocus: P,
107
+ onPaste: R,
109
108
  placeholder: g,
110
- ...c,
111
- "data-testid": "textarea-textarea",
112
- "data-state": t,
113
- autoCorrect: v,
114
- "aria-multiline": "true",
109
+ ref: y,
110
+ required: d,
115
111
  spellCheck: "true",
116
- style: z()
112
+ style: k(),
113
+ value: s,
114
+ ...L,
115
+ ...c
117
116
  }
118
117
  ),
119
- L && /* @__PURE__ */ e("div", { className: J, "data-testid": "textarea-loading-icon", children: /* @__PURE__ */ e(D, { size: 24 }) }),
118
+ T && /* @__PURE__ */ e("div", { className: H, "data-testid": "textarea-loading-icon", children: /* @__PURE__ */ e(B, { size: 24 }) }),
120
119
  /* @__PURE__ */ l(
121
120
  "div",
122
121
  {
123
- className: Q(p, i),
122
+ className: K(p, i),
124
123
  role: "status",
125
124
  "aria-live": "polite",
126
125
  "aria-label": `${p} of ${i} characters used`,
@@ -136,7 +135,7 @@ const J = "absolute right-4 top-4", K = (r) => r || "off", Q = (r, t) => {
136
135
  "p",
137
136
  {
138
137
  id: u,
139
- className: "text-danger-400 mt-1.5 text-base",
138
+ className: "!text-danger-300 mt-1.5 text-sm",
140
139
  "data-testid": "textarea-error-message",
141
140
  "aria-live": "polite",
142
141
  "aria-atomic": "true",
@@ -146,7 +145,7 @@ const J = "absolute right-4 top-4", K = (r) => r || "off", Q = (r, t) => {
146
145
  ] });
147
146
  }
148
147
  );
149
- U.displayName = "Textarea";
148
+ Q.displayName = "Textarea";
150
149
  export {
151
- U as Textarea
150
+ Q as Textarea
152
151
  };
package/dist/Toggle.js CHANGED
@@ -2,8 +2,8 @@
2
2
  import "./styles/main.css";
3
3
  import { jsx as g } from "react/jsx-runtime";
4
4
  import { ToggleBase as n } from "./Toggle/ToggleBase.js";
5
- import { c as s } from "./twUtils-CRiPKpXj.js";
6
- import { c as d } from "./index-CRBC94ik.js";
5
+ import { cn as s } from "./utils/twUtils.js";
6
+ import { c as d } from "./index-D29mdTf5.js";
7
7
  import { forwardRef as l } from "react";
8
8
  const v = d(
9
9
  `
@@ -3,7 +3,7 @@ import "./styles/main.css";
3
3
  import { jsx as d } from "react/jsx-runtime";
4
4
  import { ToggleGroupItemBase as p, ToggleGroupBase as f } from "./ToggleGroup/ToggleGroupBase.js";
5
5
  import { toggleVariants as m } from "./Toggle.js";
6
- import { c as l } from "./twUtils-CRiPKpXj.js";
6
+ import { cn as l } from "./utils/twUtils.js";
7
7
  import { createContext as c, forwardRef as v, useContext as b } from "react";
8
8
  const g = c({
9
9
  size: "default",
@@ -2,27 +2,27 @@
2
2
  import "../styles/main.css";
3
3
  import { jsx as D } from "react/jsx-runtime";
4
4
  import { createForwardedRef as N } from "../utils/refs.js";
5
- import { c as z } from "../twUtils-CRiPKpXj.js";
5
+ import { cn as z } from "../utils/twUtils.js";
6
6
  import { createContext as X, forwardRef as L, useMemo as Y, useRef as E, useEffect as k, useCallback as g, useState as I, useContext as M, useId as A } from "react";
7
7
  import { createPortal as S } from "react-dom";
8
8
  const F = X(null), V = L(function({
9
9
  children: a,
10
10
  delayDuration: u = 700,
11
- skipDelayDuration: c = 300,
11
+ skipDelayDuration: l = 300,
12
12
  disableHoverableContent: d = !1
13
13
  }) {
14
- const l = Y(
15
- () => ({ delayDuration: u, skipDelayDuration: c, disableHoverableContent: d }),
16
- [u, c, d]
14
+ const c = Y(
15
+ () => ({ delayDuration: u, skipDelayDuration: l, disableHoverableContent: d }),
16
+ [u, l, d]
17
17
  );
18
- return /* @__PURE__ */ D(F.Provider, { value: l, children: a });
18
+ return /* @__PURE__ */ D(F.Provider, { value: c, children: a });
19
19
  }), K = X(null), Z = ({
20
20
  children: h,
21
21
  open: a,
22
22
  defaultOpen: u,
23
- onOpenChange: c,
23
+ onOpenChange: l,
24
24
  side: d = "top",
25
- align: l = "center",
25
+ align: c = "center",
26
26
  sideOffset: f = 0,
27
27
  alignOffset: y = 0,
28
28
  avoidCollisions: p = !0,
@@ -37,23 +37,23 @@ const F = X(null), V = L(function({
37
37
  delayDuration: t ?? r.delayDuration
38
38
  }, [e, o] = I(!!u), i = typeof a == "boolean", w = i ? a : e, v = g(
39
39
  (x) => {
40
- i || o(x), c?.(x);
40
+ i || o(x), l?.(x);
41
41
  },
42
- [i, c]
42
+ [i, l]
43
43
  ), T = E(null), b = A(), C = Y(
44
44
  () => ({
45
45
  open: w,
46
46
  setOpen: v,
47
47
  triggerRef: T,
48
48
  contentId: b,
49
- options: { side: d, align: l, sideOffset: f, alignOffset: y, avoidCollisions: p },
49
+ options: { side: d, align: c, sideOffset: f, alignOffset: y, avoidCollisions: p },
50
50
  provider: m,
51
51
  arrowPadding: 4
52
52
  }),
53
- [w, v, d, l, f, y, p, m]
53
+ [w, v, d, c, f, y, p, m]
54
54
  );
55
55
  return /* @__PURE__ */ D(K.Provider, { value: C, children: h });
56
- }, _ = L(function({ asChild: a, onPointerEnter: u, onPointerLeave: c, onFocus: d, onBlur: l, onKeyDown: f, ...y }, p) {
56
+ }, _ = L(function({ asChild: a, onPointerEnter: u, onPointerLeave: l, onFocus: d, onBlur: c, onKeyDown: f, ...y }, p) {
57
57
  const t = H(), { provider: r } = t, m = N(t.triggerRef, p), e = E(null), o = E(null), i = E(0), w = () => {
58
58
  e.current && window.clearTimeout(e.current), o.current && window.clearTimeout(o.current), e.current = null, o.current = null;
59
59
  };
@@ -70,9 +70,9 @@ const F = X(null), V = L(function({
70
70
  [u, v]
71
71
  ), C = g(
72
72
  (s) => {
73
- c?.(s), (s.pointerType === "mouse" || s.pointerType === "pen") && (o.current = window.setTimeout(() => t.setOpen(!1), 0));
73
+ l?.(s), (s.pointerType === "mouse" || s.pointerType === "pen") && (o.current = window.setTimeout(() => t.setOpen(!1), 0));
74
74
  },
75
- [c, t.setOpen]
75
+ [l, t.setOpen]
76
76
  ), x = g(
77
77
  (s) => {
78
78
  d?.(s), v();
@@ -80,9 +80,9 @@ const F = X(null), V = L(function({
80
80
  [d, v]
81
81
  ), B = g(
82
82
  (s) => {
83
- l?.(s), T();
83
+ c?.(s), T();
84
84
  },
85
- [l, T]
85
+ [c, T]
86
86
  ), P = g(
87
87
  (s) => {
88
88
  f?.(s), s.key === "Escape" && T();
@@ -105,9 +105,9 @@ const F = X(null), V = L(function({
105
105
  }), tt = L(function({
106
106
  className: a,
107
107
  style: u,
108
- forceMount: c,
108
+ forceMount: l,
109
109
  container: d,
110
- onPointerEnter: l,
110
+ onPointerEnter: c,
111
111
  onPointerLeave: f,
112
112
  children: y,
113
113
  arrowPadding: p = 4,
@@ -140,15 +140,15 @@ const F = X(null), V = L(function({
140
140
  }, [e.open, e.setOpen]);
141
141
  const C = g(
142
142
  (n) => {
143
- l?.(n), e.provider.disableHoverableContent || e.setOpen(!0);
143
+ c?.(n), e.provider.disableHoverableContent || e.setOpen(!0);
144
144
  },
145
- [l, e.provider.disableHoverableContent, e.setOpen]
145
+ [c, e.provider.disableHoverableContent, e.setOpen]
146
146
  ), x = g(
147
147
  (n) => {
148
148
  f?.(n), e.provider.disableHoverableContent || e.setOpen(!1);
149
149
  },
150
150
  [f, e.provider.disableHoverableContent, e.setOpen]
151
- ), B = e.open || c ? /* @__PURE__ */ D(
151
+ ), B = e.open || l ? /* @__PURE__ */ D(
152
152
  "div",
153
153
  {
154
154
  ...r,
@@ -171,15 +171,15 @@ const F = X(null), V = L(function({
171
171
  }
172
172
  ) : null, P = typeof document < "u" ? d ?? document.body : null;
173
173
  return P ? S(B, P) : null;
174
- }), et = L(function({ width: a = 16, height: u = 16, className: c, style: d, ...l }, f) {
174
+ }), et = L(function({ width: a = 16, height: u = 16, className: l, style: d, ...c }, f) {
175
175
  const y = H();
176
176
  return /* @__PURE__ */ D(
177
177
  "div",
178
178
  {
179
- ...l,
179
+ ...c,
180
180
  ref: f,
181
181
  "aria-hidden": !0,
182
- className: z("pointer-events-none", c),
182
+ className: z("pointer-events-none", l),
183
183
  style: {
184
184
  width: a,
185
185
  height: u,
@@ -208,12 +208,12 @@ function R(h, a, u) {
208
208
  return Math.max(a, Math.min(u, h));
209
209
  }
210
210
  function j(h, a, u) {
211
- const { side: c, align: d, sideOffset: l, alignOffset: f, avoidCollisions: y, arrowPadding: p } = u, t = h.getBoundingClientRect(), r = a.getBoundingClientRect(), m = window.innerWidth, e = window.innerHeight;
211
+ const { side: l, align: d, sideOffset: c, alignOffset: f, avoidCollisions: y, arrowPadding: p } = u, t = h.getBoundingClientRect(), r = a.getBoundingClientRect(), m = window.innerWidth, e = window.innerHeight;
212
212
  let o = 0, i = 0;
213
213
  const w = t.left + t.width / 2 - r.width / 2, v = t.left, T = t.right - r.width, b = t.top + t.height / 2 - r.height / 2, C = t.top, x = t.bottom - r.height, B = d === "start" ? v : d === "end" ? T : w, P = d === "start" ? C : d === "end" ? x : b;
214
- c === "top" ? (o = B + f, i = t.top - r.height - l) : c === "bottom" ? (o = B + f, i = t.bottom + l) : c === "left" ? (o = t.left - r.width - l, i = P + f) : (o = t.right + l, i = P + f);
215
- let n = c;
216
- y && (c === "top" && i < 0 ? (n = "bottom", i = t.bottom + l) : c === "bottom" && i + r.height > e ? (n = "top", i = t.top - r.height - l) : c === "left" && o < 0 ? (n = "right", o = t.right + l) : c === "right" && o + r.width > m && (n = "left", o = t.left - r.width - l));
214
+ l === "top" ? (o = B + f, i = t.top - r.height - c) : l === "bottom" ? (o = B + f, i = t.bottom + c) : l === "left" ? (o = t.left - r.width - c, i = P + f) : (o = t.right + c, i = P + f);
215
+ let n = l;
216
+ y && (l === "top" && i < 0 ? (n = "bottom", i = t.bottom + c) : l === "bottom" && i + r.height > e ? (n = "top", i = t.top - r.height - c) : l === "left" && o < 0 ? (n = "right", o = t.right + c) : l === "right" && o + r.width > m && (n = "left", o = t.left - r.width - c));
217
217
  let s = t.left + t.width / 2, O = t.top + t.height / 2;
218
218
  return n === "top" && (O = i + r.height, s = R(t.left + t.width / 2, o + p, o + r.width - p)), n === "bottom" && (O = i, s = R(t.left + t.width / 2, o + p, o + r.width - p)), n === "left" && (s = o + r.width, O = R(t.top + t.height / 2, i + p, i + r.height - p)), n === "right" && (s = o, O = R(t.top + t.height / 2, i + p, i + r.height - p)), a.style.setProperty("--arrow-x", `${s - o}px`), a.style.setProperty("--arrow-y", `${O - i}px`), a.dataset.side = n, { x: o, y: i, placing: n, arrowX: s, arrowY: O };
219
219
  }
package/dist/Tooltip.js CHANGED
@@ -2,13 +2,13 @@
2
2
  import "./styles/main.css";
3
3
  import { jsx as u, jsxs as H } from "react/jsx-runtime";
4
4
  import * as a from "react";
5
- import { c as K, b as W, d as J, a as S, P as Q, e as C, f as Z } from "./index-CA7haECj.js";
6
- import { D as ee } from "./index-cCg4yNa8.js";
7
- import { c as G, R as te, A as oe, a as re, C as ne } from "./index-FeGk8zep.js";
8
- import { P as ae } from "./index-VXXKXen4.js";
9
- import { P as j } from "./index-CBwRmAsQ.js";
10
- import { R as se } from "./index-Cfyte2YO.js";
11
- import { c as ie } from "./twUtils-CRiPKpXj.js";
5
+ import { c as K, u as W, a as S, P as J, b as C, f as Q } from "./index-BhufZRa2.js";
6
+ import { P as Z, D as ee } from "./index-B2oBi8ng.js";
7
+ import { u as te } from "./index-CVSxKOPp.js";
8
+ import { c as G, R as oe, a as re, A as ne, C as ae } from "./index-NzygPVvJ.js";
9
+ import { P as j } from "./index-6Abv_Flm.js";
10
+ import { R as se } from "./index-CGALWSq_.js";
11
+ import { cn as ie } from "./utils/twUtils.js";
12
12
  var [O] = K("Tooltip", [
13
13
  G
14
14
  ]), D = G(), F = "TooltipProvider", le = 700, A = "tooltip.open", [ce, k] = O(F), z = (e) => {
@@ -56,7 +56,7 @@ var R = "Tooltip", [ue, _] = O(R), $ = (e) => {
56
56
  onOpenChange: l,
57
57
  disableHoverableContent: i,
58
58
  delayDuration: v
59
- } = e, s = k(R, e.__scopeTooltip), d = D(o), [c, f] = a.useState(null), h = W(), p = a.useRef(0), m = i ?? s.disableHoverableContent, T = v ?? s.delayDuration, g = a.useRef(!1), [y, x] = J({
59
+ } = e, s = k(R, e.__scopeTooltip), d = D(o), [c, f] = a.useState(null), h = te(), p = a.useRef(0), m = i ?? s.disableHoverableContent, T = v ?? s.delayDuration, g = a.useRef(!1), [y, x] = W({
60
60
  prop: r,
61
61
  defaultProp: n ?? !1,
62
62
  onChange: (N) => {
@@ -74,7 +74,7 @@ var R = "Tooltip", [ue, _] = O(R), $ = (e) => {
74
74
  }, [T, x]);
75
75
  return a.useEffect(() => () => {
76
76
  p.current && (window.clearTimeout(p.current), p.current = 0);
77
- }, []), /* @__PURE__ */ u(te, { ...d, children: /* @__PURE__ */ u(
77
+ }, []), /* @__PURE__ */ u(oe, { ...d, children: /* @__PURE__ */ u(
78
78
  ue,
79
79
  {
80
80
  scope: o,
@@ -100,8 +100,8 @@ $.displayName = R;
100
100
  var L = "TooltipTrigger", B = a.forwardRef(
101
101
  (e, o) => {
102
102
  const { __scopeTooltip: t, ...r } = e, n = _(L, t), l = k(L, t), i = D(t), v = a.useRef(null), s = S(o, v, n.onTriggerChange), d = a.useRef(!1), c = a.useRef(!1), f = a.useCallback(() => d.current = !1, []);
103
- return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ u(re, { asChild: !0, ...i, children: /* @__PURE__ */ u(
104
- Q.button,
103
+ return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ u(ne, { asChild: !0, ...i, children: /* @__PURE__ */ u(
104
+ J.button,
105
105
  {
106
106
  "aria-describedby": n.open ? n.contentId : void 0,
107
107
  "data-state": n.stateAttribute,
@@ -130,7 +130,7 @@ var M = "TooltipPortal", [pe, de] = O(M, {
130
130
  forceMount: void 0
131
131
  }), U = (e) => {
132
132
  const { __scopeTooltip: o, forceMount: t, children: r, container: n } = e, l = _(M, o);
133
- return /* @__PURE__ */ u(pe, { scope: o, forceMount: t, children: /* @__PURE__ */ u(j, { present: t || l.open, children: /* @__PURE__ */ u(ae, { asChild: !0, container: n, children: r }) }) });
133
+ return /* @__PURE__ */ u(pe, { scope: o, forceMount: t, children: /* @__PURE__ */ u(j, { present: t || l.open, children: /* @__PURE__ */ u(Z, { asChild: !0, container: n, children: r }) }) });
134
134
  };
135
135
  U.displayName = M;
136
136
  var b = "TooltipContent", V = a.forwardRef(
@@ -164,7 +164,7 @@ var b = "TooltipContent", V = a.forwardRef(
164
164
  return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
165
165
  }
166
166
  }, [s, c, i, d, h]), /* @__PURE__ */ u(Y, { ...e, ref: l });
167
- }), [ve, he] = O(R, { isInside: !1 }), me = Z("TooltipContent"), Y = a.forwardRef(
167
+ }), [ve, he] = O(R, { isInside: !1 }), me = Q("TooltipContent"), Y = a.forwardRef(
168
168
  (e, o) => {
169
169
  const {
170
170
  __scopeTooltip: t,
@@ -191,7 +191,7 @@ var b = "TooltipContent", V = a.forwardRef(
191
191
  onFocusOutside: (f) => f.preventDefault(),
192
192
  onDismiss: c,
193
193
  children: /* @__PURE__ */ H(
194
- ne,
194
+ ae,
195
195
  {
196
196
  "data-state": s.stateAttribute,
197
197
  ...d,
@@ -222,7 +222,7 @@ var q = "TooltipArrow", X = a.forwardRef(
222
222
  return he(
223
223
  q,
224
224
  t
225
- ).isInside ? null : /* @__PURE__ */ u(oe, { ...n, ...r, ref: o });
225
+ ).isInside ? null : /* @__PURE__ */ u(re, { ...n, ...r, ref: o });
226
226
  }
227
227
  );
228
228
  X.displayName = q;
@@ -0,0 +1,39 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function Button({ children, onClick }: {
3
+ children: ReactNode;
4
+ onClick: () => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export declare function SecondaryButton({ children, onClick, className, }: {
7
+ children: ReactNode;
8
+ onClick: () => void;
9
+ className: string;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ export declare function Header({ icon, title, description }: {
12
+ icon: ReactNode;
13
+ title: string;
14
+ description: string;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ export declare function Phrase({ setView }: {
17
+ setView: (view: string) => void;
18
+ }): import("react/jsx-runtime").JSX.Element;
19
+ export declare function Key({ setView }: {
20
+ setView: (view: string) => void;
21
+ }): import("react/jsx-runtime").JSX.Element;
22
+ export declare function RemoveWallet({ setView }: {
23
+ setView: (view: string) => void;
24
+ }): import("react/jsx-runtime").JSX.Element;
25
+ export declare function DefaultView({ setView }: {
26
+ setView: (view: string) => void;
27
+ }): import("react/jsx-runtime").JSX.Element;
28
+ export declare function RecoveryPhraseIcon(): import("react/jsx-runtime").JSX.Element;
29
+ export declare function ShieldIcon(): import("react/jsx-runtime").JSX.Element;
30
+ export declare function PassIcon(): import("react/jsx-runtime").JSX.Element;
31
+ export declare function BannedIcon(): import("react/jsx-runtime").JSX.Element;
32
+ export declare function FaceIDIcon(): import("react/jsx-runtime").JSX.Element;
33
+ export declare function DangerIcon(): import("react/jsx-runtime").JSX.Element;
34
+ export declare function CloseIcon(): import("react/jsx-runtime").JSX.Element;
35
+ export declare function LockIcon(): import("react/jsx-runtime").JSX.Element;
36
+ export declare function WarningIcon(): import("react/jsx-runtime").JSX.Element;
37
+ export declare function PhraseIcon(): import("react/jsx-runtime").JSX.Element;
38
+ export declare function CrossIcon(): import("react/jsx-runtime").JSX.Element;
39
+ //# sourceMappingURL=TrayStoriesData.d.ts.map