@spear-ai/spectral 1.3.61 → 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.
- package/dist/.js +181 -152
- package/dist/Accordion.d.ts +37 -0
- package/dist/Accordion.js +465 -0
- package/dist/Alert/AlertBase.js +2 -2
- package/dist/Alert.js +4 -3
- package/dist/Avatar.d.ts +12 -0
- package/dist/Avatar.js +88 -1
- package/dist/Badge.d.ts +12 -2
- package/dist/Badge.js +28 -4
- package/dist/Button.js +2 -2
- package/dist/ButtonGroup/ButtonGroupButton.d.ts +13 -0
- package/dist/ButtonGroup/ButtonGroupButton.js +51 -0
- package/dist/ButtonGroup.d.ts +29 -0
- package/dist/ButtonGroup.js +89 -0
- package/dist/ButtonIcon.js +2 -1
- package/dist/Checkbox/CheckboxBase.d.ts +2 -2
- package/dist/Checkbox/CheckboxBase.js +21 -21
- package/dist/Checkbox.d.ts +14 -0
- package/dist/Checkbox.js +98 -0
- package/dist/Dialog/DialogBase.d.ts +1 -1
- package/dist/Dialog/DialogBase.js +2 -2
- package/dist/Dialog.js +4 -4
- package/dist/Drawer.js +24 -1283
- package/dist/HoverCard.d.ts +29 -0
- package/dist/HoverCard.js +207 -0
- package/dist/Icons/CheckmarkIcon.js +9 -9
- package/dist/Icons/MessagesIcon.d.ts +3 -0
- package/dist/Icons/MessagesIcon.js +31 -0
- package/dist/Icons/MinusIcon.js +13 -13
- package/dist/Icons/index.d.ts +1 -0
- package/dist/Icons.js +50 -48
- package/dist/Input.d.ts +2 -0
- package/dist/Input.js +98 -89
- package/dist/InputGroup.d.ts +16 -0
- package/dist/InputGroup.js +129 -0
- package/dist/InputOTP.d.ts +0 -2
- package/dist/InputOTP.js +138 -142
- package/dist/Label.d.ts +3 -7
- package/dist/Label.js +11 -11
- package/dist/MultiSelect/MultiSelectBase.js +22 -22
- package/dist/Popover.d.ts +6 -7
- package/dist/Popover.js +60 -71
- package/dist/RadioButtonGroup/RadioButtonGroupBase.js +1 -1
- package/dist/RadioButtonGroup.js +1 -1
- package/dist/RadioGroup.d.ts +1 -1
- package/dist/RadioGroup.js +141 -134
- package/dist/Select.js +97 -895
- package/dist/Separator.d.ts +12 -0
- package/dist/Separator.js +24 -0
- package/dist/Skeleton.js +3 -3
- package/dist/Slider.d.ts +15 -3
- package/dist/Slider.js +464 -40
- package/dist/Switch/SwitchBase.js +1 -1
- package/dist/Switch.js +2 -2
- package/dist/Tabs/TabsBase.js +1 -1
- package/dist/Tabs.js +16 -16
- package/dist/Textarea.js +41 -42
- package/dist/Toggle.js +2 -2
- package/dist/ToggleGroup.js +1 -1
- package/dist/Tooltip/TooltipBase.js +29 -29
- package/dist/Tooltip.js +15 -15
- package/dist/Tray/TrayStoriesData.d.ts +39 -0
- package/dist/Tray/TrayStoriesData.js +438 -0
- package/dist/Tray.d.ts +28 -0
- package/dist/Tray.js +227 -0
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/components/Accordion/Accordion.d.ts +37 -0
- package/dist/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +12 -0
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts +12 -2
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +29 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
- package/dist/components/ButtonGroup/ButtonGroupButton.d.ts +13 -0
- package/dist/components/ButtonGroup/ButtonGroupButton.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +14 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/CheckboxBase.d.ts +2 -2
- package/dist/components/Checkbox/CheckboxBase.d.ts.map +1 -1
- package/dist/components/Dialog/DialogBase.d.ts +1 -1
- package/dist/components/HoverCard/HoverCard.d.ts +29 -0
- package/dist/components/HoverCard/HoverCard.d.ts.map +1 -0
- package/dist/components/Icons/MessagesIcon.d.ts +3 -0
- package/dist/components/Icons/MessagesIcon.d.ts.map +1 -0
- package/dist/components/Icons/iconTypes.d.ts +1 -0
- package/dist/components/Icons/iconTypes.d.ts.map +1 -1
- package/dist/components/Icons/index.d.ts +1 -0
- package/dist/components/Icons/index.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts +2 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/InputGroup/InputGroup.d.ts +16 -0
- package/dist/components/InputGroup/InputGroup.d.ts.map +1 -0
- package/dist/components/InputOTP/InputOTP.d.ts +0 -2
- package/dist/components/InputOTP/InputOTP.d.ts.map +1 -1
- package/dist/components/Label/Label.d.ts +3 -7
- package/dist/components/Label/Label.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +6 -7
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/Separator/Separator.d.ts +12 -0
- package/dist/components/Separator/Separator.d.ts.map +1 -0
- package/dist/components/Slider/Slider.d.ts +15 -3
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Tray/Tray.d.ts +28 -0
- package/dist/components/Tray/Tray.d.ts.map +1 -0
- package/dist/components/Tray/TrayStoriesData.d.ts +39 -0
- package/dist/components/Tray/TrayStoriesData.d.ts.map +1 -0
- package/dist/features/AuthCard/ForgotPasswordEmailForm.js +4 -3
- package/dist/features/AuthCard/ForgotPasswordResetForm.js +9 -9
- package/dist/features/AuthCard/PasswordInput.js +78 -9
- package/dist/features/AuthCard/SignInForm.js +8 -7
- package/dist/features/AuthCard/SignUpForm.js +8 -7
- package/dist/features/AuthCard.js +2 -2
- package/dist/features/LabelingTools.js +7 -6
- package/dist/features/SensorMetadata.js +3 -2
- package/dist/features/SettingsPopover.js +3 -2
- package/dist/index-0ioNhtNM.js +10 -0
- package/dist/{index-CBwRmAsQ.js → index-6Abv_Flm.js} +1 -1
- package/dist/{index-DUK1rxhf.js → index-B-GQStVW.js} +6 -5
- package/dist/index-B2oBi8ng.js +142 -0
- package/dist/index-BIpuW_o8.js +146 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/index-BhufZRa2.js +232 -0
- package/dist/index-CAKA12cC.js +1265 -0
- package/dist/{index-Cfyte2YO.js → index-CGALWSq_.js} +1 -1
- package/dist/index-CVSxKOPp.js +13 -0
- package/dist/index-CevVJ05e.js +822 -0
- package/dist/{index-CRBC94ik.js → index-D29mdTf5.js} +1 -1
- package/dist/{index-FeGk8zep.js → index-NzygPVvJ.js} +10 -9
- package/dist/index-UEFPWH8U.js +54 -0
- package/dist/index-rKs9bXHr.js +6 -0
- package/dist/{index-Cb7rjMhE.js → index-y6Br5T4h.js} +6 -6
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/linear-cursor-small.png +0 -0
- package/dist/list.yml.webp +0 -0
- package/dist/message-alert-matte-glass-gradient.webp +0 -0
- package/dist/primitives/button.d.ts +10 -0
- package/dist/primitives/button.d.ts.map +1 -0
- package/dist/primitives/button.js +42 -0
- package/dist/primitives/input.d.ts +3 -0
- package/dist/primitives/input.d.ts.map +1 -0
- package/dist/primitives/input.js +18 -0
- package/dist/primitives/select.d.ts +16 -0
- package/dist/primitives/select.d.ts.map +1 -0
- package/dist/primitives/select.js +196 -0
- package/dist/primitives/slot.d.ts.map +1 -1
- package/dist/primitives/slot.js +21 -20
- package/dist/primitives/textarea.d.ts +3 -0
- package/dist/primitives/textarea.d.ts.map +1 -0
- package/dist/primitives/textarea.js +16 -0
- package/dist/{proxy-DD79Ok6n.js → proxy-C9AqCss6.js} +1 -1
- package/dist/speech-bubble-fluid-glass-gradient.webp +0 -0
- package/dist/styles/main.css +1 -1
- package/dist/utils/formFieldUtils.js +1 -1
- package/dist/utils/twUtils.js +2728 -2
- package/package.json +13 -8
- package/dist/Accordion/AccordionBase.d.ts +0 -42
- package/dist/Accordion/AccordionBase.js +0 -225
- package/dist/Badge/BadgeBase.d.ts +0 -13
- package/dist/Badge/BadgeBase.js +0 -35
- package/dist/PasswordInput-ClY_hxuN.js +0 -261
- package/dist/components/Accordion/AccordionBase.d.ts +0 -42
- package/dist/components/Accordion/AccordionBase.d.ts.map +0 -1
- package/dist/components/Badge/BadgeBase.d.ts +0 -13
- package/dist/components/Badge/BadgeBase.d.ts.map +0 -1
- package/dist/index-CA7haECj.js +0 -248
- package/dist/index-CbXx14YO.js +0 -59
- package/dist/index-VXXKXen4.js +0 -15
- package/dist/index-cCg4yNa8.js +0 -132
- package/dist/primitives/label.d.ts +0 -5
- package/dist/primitives/label.d.ts.map +0 -1
- package/dist/primitives/label.js +0 -27
- 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 {
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
97
|
+
className: a(
|
|
98
98
|
"inline-flex w-full items-center justify-start",
|
|
99
|
-
t === "horizontal" &&
|
|
100
|
-
t === "vertical" &&
|
|
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" &&
|
|
104
|
-
t === "vertical" &&
|
|
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:
|
|
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" &&
|
|
116
|
-
t === "vertical" &&
|
|
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" &&
|
|
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" &&
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
53
|
-
import { useFormFieldId as
|
|
54
|
-
import {
|
|
55
|
-
import { forwardRef as
|
|
56
|
-
const
|
|
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
|
|
59
|
-
},
|
|
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:
|
|
66
|
+
id: f,
|
|
66
67
|
label: n,
|
|
67
68
|
placeholder: g,
|
|
68
69
|
value: s = "",
|
|
69
|
-
onFocus:
|
|
70
|
-
onBlur:
|
|
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
|
-
},
|
|
79
|
-
const m =
|
|
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:
|
|
84
|
-
onBlur:
|
|
85
|
-
}), { isDisabled: x, isLoading:
|
|
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(
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
onFocus:
|
|
106
|
-
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
"data-state": t,
|
|
113
|
-
autoCorrect: v,
|
|
114
|
-
"aria-multiline": "true",
|
|
109
|
+
ref: y,
|
|
110
|
+
required: d,
|
|
115
111
|
spellCheck: "true",
|
|
116
|
-
style:
|
|
112
|
+
style: k(),
|
|
113
|
+
value: s,
|
|
114
|
+
...L,
|
|
115
|
+
...c
|
|
117
116
|
}
|
|
118
117
|
),
|
|
119
|
-
|
|
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:
|
|
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-
|
|
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
|
-
|
|
148
|
+
Q.displayName = "Textarea";
|
|
150
149
|
export {
|
|
151
|
-
|
|
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 {
|
|
6
|
-
import { c as d } from "./index-
|
|
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
|
`
|
package/dist/ToggleGroup.js
CHANGED
|
@@ -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 {
|
|
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 {
|
|
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:
|
|
11
|
+
skipDelayDuration: l = 300,
|
|
12
12
|
disableHoverableContent: d = !1
|
|
13
13
|
}) {
|
|
14
|
-
const
|
|
15
|
-
() => ({ delayDuration: u, skipDelayDuration:
|
|
16
|
-
[u,
|
|
14
|
+
const c = Y(
|
|
15
|
+
() => ({ delayDuration: u, skipDelayDuration: l, disableHoverableContent: d }),
|
|
16
|
+
[u, l, d]
|
|
17
17
|
);
|
|
18
|
-
return /* @__PURE__ */ D(F.Provider, { value:
|
|
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:
|
|
23
|
+
onOpenChange: l,
|
|
24
24
|
side: d = "top",
|
|
25
|
-
align:
|
|
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),
|
|
40
|
+
i || o(x), l?.(x);
|
|
41
41
|
},
|
|
42
|
-
[i,
|
|
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:
|
|
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,
|
|
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:
|
|
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
|
-
|
|
73
|
+
l?.(s), (s.pointerType === "mouse" || s.pointerType === "pen") && (o.current = window.setTimeout(() => t.setOpen(!1), 0));
|
|
74
74
|
},
|
|
75
|
-
[
|
|
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
|
-
|
|
83
|
+
c?.(s), T();
|
|
84
84
|
},
|
|
85
|
-
[
|
|
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:
|
|
108
|
+
forceMount: l,
|
|
109
109
|
container: d,
|
|
110
|
-
onPointerEnter:
|
|
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
|
-
|
|
143
|
+
c?.(n), e.provider.disableHoverableContent || e.setOpen(!0);
|
|
144
144
|
},
|
|
145
|
-
[
|
|
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 ||
|
|
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:
|
|
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
|
-
...
|
|
179
|
+
...c,
|
|
180
180
|
ref: f,
|
|
181
181
|
"aria-hidden": !0,
|
|
182
|
-
className: z("pointer-events-none",
|
|
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:
|
|
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
|
-
|
|
215
|
-
let n =
|
|
216
|
-
y && (
|
|
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,
|
|
6
|
-
import { D as ee } from "./index-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { P as j } from "./index-
|
|
10
|
-
import { R as se } from "./index-
|
|
11
|
-
import {
|
|
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 =
|
|
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(
|
|
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(
|
|
104
|
-
|
|
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(
|
|
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 =
|
|
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
|
-
|
|
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(
|
|
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
|