@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spear-ai/spectral",
3
- "version": "1.3.62",
3
+ "version": "1.3.63",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "repository": {
@@ -51,17 +51,23 @@
51
51
  "**/*.css"
52
52
  ],
53
53
  "dependencies": {
54
+ "@radix-ui/react-accordion": "^1.2.12",
55
+ "@radix-ui/react-hover-card": "^1.1.15",
54
56
  "@radix-ui/react-popover": "^1.1.15",
55
57
  "@radix-ui/react-radio-group": "^1.3.8",
56
58
  "@radix-ui/react-select": "^2.2.6",
59
+ "@radix-ui/react-slider": "^1.3.6",
57
60
  "@radix-ui/react-tooltip": "^1.2.8",
58
61
  "class-variance-authority": "^0.7.1",
59
62
  "clsx": "^2.1.1",
60
63
  "cmdk": "^1.1.1",
64
+ "framer-motion": "^12.23.24",
61
65
  "input-otp": "^1.4.2",
62
66
  "lucide-react": "^0.542.0",
63
67
  "motion": "^12.23.22",
64
68
  "react-day-picker": "^9.9.0",
69
+ "react-router": "^7.9.4",
70
+ "react-use-measure": "^2.1.7",
65
71
  "sonner": "^2.0.7",
66
72
  "tailwind-merge": "^3.3.1",
67
73
  "unicornstudio-react": "^1.4.31",
@@ -71,12 +77,11 @@
71
77
  "@changesets/cli": "^2.29.6",
72
78
  "@chromatic-com/storybook": "^4.1.1",
73
79
  "@prettier/plugin-oxc": "^0.0.4",
74
- "@storybook/addon-docs": "^9.1.3",
75
- "@storybook/addon-themes": "^9.1.3",
76
- "@storybook/addon-vitest": "^9.1.3",
77
- "@storybook/builder-vite": "^9.1.3",
78
- "@storybook/react": "^9.1.4",
79
- "@storybook/react-vite": "^9.1.3",
80
+ "@storybook/addon-docs": "^9.1.10",
81
+ "@storybook/addon-themes": "^9.1.10",
82
+ "@storybook/addon-vitest": "^9.1.10",
83
+ "@storybook/builder-vite": "^9.1.10",
84
+ "@storybook/react-vite": "^9.1.10",
80
85
  "@tailwindcss/vite": "^4.1.12",
81
86
  "@testing-library/jest-dom": "^6.8.0",
82
87
  "@testing-library/react": "^16.3.0",
@@ -94,7 +99,7 @@
94
99
  "prettier": "^3.6.2",
95
100
  "prettier-plugin-sort-imports": "^1.8.8",
96
101
  "prettier-plugin-tailwindcss": "^0.6.14",
97
- "storybook": "^9.1.3",
102
+ "storybook": "^9.1.10",
98
103
  "tailwindcss": "^4.1.11",
99
104
  "tw-animate-css": "^1.3.7",
100
105
  "typescript": "^5.9.2",
@@ -1,42 +0,0 @@
1
- import { AsChildProp } from '../../primitives/slot';
2
- import { ButtonHTMLAttributes, HTMLAttributes } from 'react';
3
- type Dir = 'ltr' | 'rtl';
4
- type AccordionType = 'single' | 'multiple';
5
- export type AccordionProps = HTMLAttributes<HTMLDivElement> & {
6
- type?: AccordionType;
7
- value?: string | string[];
8
- defaultValue?: string | string[];
9
- onValueChange?: (value: string | string[]) => void;
10
- collapsible?: boolean;
11
- dir?: Dir;
12
- disabled?: boolean;
13
- rovingFocus?: boolean;
14
- };
15
- export declare const Accordion: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
16
- type?: AccordionType;
17
- value?: string | string[];
18
- defaultValue?: string | string[];
19
- onValueChange?: (value: string | string[]) => void;
20
- collapsible?: boolean;
21
- dir?: Dir;
22
- disabled?: boolean;
23
- rovingFocus?: boolean;
24
- } & import('react').RefAttributes<HTMLDivElement>>;
25
- export type AccordionItemProps = HTMLAttributes<HTMLDivElement> & {
26
- value: string;
27
- disabled?: boolean;
28
- };
29
- export declare const AccordionItem: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
30
- value: string;
31
- disabled?: boolean;
32
- } & import('react').RefAttributes<HTMLDivElement>>;
33
- export type AccordionTriggerProps = ButtonHTMLAttributes<HTMLButtonElement> & AsChildProp;
34
- export declare const AccordionTrigger: import('react').ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & AsChildProp & import('react').RefAttributes<HTMLButtonElement>>;
35
- export type AccordionContentProps = HTMLAttributes<HTMLDivElement> & AsChildProp & {
36
- forceMount?: boolean;
37
- };
38
- export declare const AccordionContent: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & AsChildProp & {
39
- forceMount?: boolean;
40
- } & import('react').RefAttributes<HTMLDivElement>>;
41
- export {};
42
- //# sourceMappingURL=AccordionBase.d.ts.map
@@ -1,225 +0,0 @@
1
- "use client";
2
- import "../styles/main.css";
3
- import { jsx as x } from "react/jsx-runtime";
4
- import { useControllableState as P } from "../hooks/useControllableState.js";
5
- import { Slot as M } from "../primitives/slot.js";
6
- import { createContext as j, forwardRef as E, useRef as S, useState as T, useCallback as R, useEffect as O, useContext as D, useId as H, useLayoutEffect as L } from "react";
7
- function N(...g) {
8
- return g.filter(Boolean).join(" ");
9
- }
10
- const V = j(null), z = E(
11
- ({
12
- className: g,
13
- children: u,
14
- type: i = "single",
15
- value: f,
16
- defaultValue: l,
17
- onValueChange: a,
18
- collapsible: s = !1,
19
- dir: o = "ltr",
20
- disabled: r = !1,
21
- rovingFocus: n = !0,
22
- ...I
23
- }, d) => {
24
- const [v, c] = P({
25
- value: typeof f == "string" ? f : void 0,
26
- defaultValue: typeof l == "string" ? l : (Array.isArray(l) && l.length > 0, void 0),
27
- onChange: (t) => a?.(i === "single" ? t ?? "" : [])
28
- }), [A, C] = P({
29
- value: Array.isArray(f) ? f : void 0,
30
- defaultValue: Array.isArray(l) ? l : [],
31
- onChange: (t) => a?.(i === "multiple" ? t : "")
32
- }), h = S([]), [k, p] = T(void 0), F = R(
33
- (t) => i === "single" ? v === t : A.includes(t),
34
- [i, v, A]
35
- ), e = R(
36
- (t) => {
37
- if (!r) {
38
- if (i === "single") {
39
- v === t ? s && c(void 0) : c(t);
40
- return;
41
- }
42
- C((b) => {
43
- const y = new Set(b);
44
- return y.has(t) ? y.delete(t) : y.add(t), Array.from(y);
45
- });
46
- }
47
- },
48
- [s, r, C, c, i, v]
49
- ), m = R((t) => (h.current.push(t), () => {
50
- h.current = h.current.filter((b) => b.value !== t.value);
51
- }), []);
52
- O(() => {
53
- if (k) return;
54
- const t = h.current.find((b) => !b.disabled);
55
- t && p(t.value);
56
- }, [k]);
57
- const w = {
58
- type: i,
59
- dir: o,
60
- collapsible: s,
61
- disabled: r,
62
- itemsRef: h,
63
- registerItem: m,
64
- isItemOpen: F,
65
- toggleItem: e,
66
- focusValue: n ? k : void 0,
67
- setFocusValue: (t) => {
68
- n && p(t);
69
- }
70
- };
71
- return /* @__PURE__ */ x(V.Provider, { value: w, children: /* @__PURE__ */ x("div", { ref: d, className: N("divide-border divide-y", g), ...I, children: u }) });
72
- }
73
- );
74
- z.displayName = "Accordion";
75
- const $ = j(null), B = E(
76
- ({ className: g, value: u, disabled: i = !1, children: f, ...l }, a) => {
77
- const s = D(V);
78
- if (!s) throw new Error("AccordionItem must be used within Accordion");
79
- const o = s.isItemOpen(u), r = S(null);
80
- return O(() => {
81
- const n = { value: u, disabled: i, triggerRef: r };
82
- return s.registerItem(n);
83
- }, [s, u, i]), /* @__PURE__ */ x($.Provider, { value: { value: u, open: o, disabled: i || s.disabled }, children: /* @__PURE__ */ x(
84
- "div",
85
- {
86
- ref: a,
87
- "data-state": o ? "open" : "closed",
88
- "data-disabled": i || s.disabled ? "" : void 0,
89
- className: N("outline-none", g),
90
- ...l,
91
- children: f
92
- }
93
- ) });
94
- }
95
- );
96
- B.displayName = "AccordionItem";
97
- const K = E(
98
- ({ asChild: g, className: u, onClick: i, onKeyDown: f, disabled: l, id: a, ...s }, o) => {
99
- const r = D(V), n = D($);
100
- if (!r || !n) throw new Error("AccordionTrigger must be used within AccordionItem");
101
- const I = a ?? `act-${H()}`, d = l || n.disabled || r.disabled, v = n.open, c = g ? M : "button", A = (e) => {
102
- if (n && "value" in n) {
103
- const m = r.itemsRef.current.find((w) => w.value === n.value);
104
- m && (m.triggerRef.current = e);
105
- }
106
- typeof o == "function" ? o(e) : o && "current" in o && (o.current = e);
107
- }, h = (r.focusValue === void 0 ? !0 : r.focusValue === n.value && !d) ? 0 : -1, k = R(
108
- (e) => {
109
- i?.(e), !e.defaultPrevented && (d || (r.toggleItem(n.value), r.setFocusValue(n.value)));
110
- },
111
- [d, n.value, i, r]
112
- ), p = R(
113
- (e) => {
114
- const m = r.itemsRef.current.filter((y) => !y.disabled);
115
- if (!m.length) return;
116
- const w = m.findIndex((y) => y.value === n.value);
117
- let t = w;
118
- e === "first" ? t = 0 : e === "last" ? t = m.length - 1 : e === "prev" ? t = Math.max(0, w - 1) : t = Math.min(m.length - 1, w + 1);
119
- const b = m[t];
120
- b && (r.setFocusValue(b.value), b.triggerRef.current?.focus());
121
- },
122
- [n.value, r]
123
- ), F = R(
124
- (e) => {
125
- if (f?.(e), !e.defaultPrevented) {
126
- if (e.key === "Home") {
127
- e.preventDefault(), p("first");
128
- return;
129
- }
130
- if (e.key === "End") {
131
- e.preventDefault(), p("last");
132
- return;
133
- }
134
- if (e.key === "ArrowUp" || e.key === "ArrowLeft") {
135
- e.preventDefault(), p(r.dir === "rtl" ? "next" : "prev");
136
- return;
137
- }
138
- if (e.key === "ArrowDown" || e.key === "ArrowRight") {
139
- e.preventDefault(), p(r.dir === "rtl" ? "prev" : "next");
140
- return;
141
- }
142
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), d || r.toggleItem(n.value));
143
- }
144
- },
145
- [d, n.value, p, f, r]
146
- );
147
- return /* @__PURE__ */ x(
148
- c,
149
- {
150
- id: I,
151
- ref: A,
152
- type: "button",
153
- "aria-expanded": v,
154
- "aria-controls": `acc-content-${n.value}`,
155
- "aria-disabled": d || void 0,
156
- "data-state": v ? "open" : "closed",
157
- "data-disabled": d ? "" : void 0,
158
- tabIndex: h,
159
- onClick: k,
160
- onKeyDown: F,
161
- className: N(
162
- "flex w-full items-center justify-between py-3 text-left",
163
- "focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
164
- "disabled:cursor-not-allowed disabled:opacity-50",
165
- u
166
- ),
167
- ...s
168
- }
169
- );
170
- }
171
- );
172
- K.displayName = "AccordionTrigger";
173
- const U = E(
174
- ({ asChild: g, className: u, forceMount: i, id: f, ...l }, a) => {
175
- const s = D(V), o = D($);
176
- if (!s || !o) throw new Error("AccordionContent must be used within AccordionItem");
177
- const r = o.open, n = f ?? `acc-content-${o.value}`, I = S(null), d = (c) => {
178
- I.current = c, typeof a == "function" ? a(c) : a && "current" in a && (a.current = c);
179
- };
180
- L(() => {
181
- const c = I.current;
182
- if (!c) return;
183
- const A = () => {
184
- c.style.setProperty("--radix-accordion-content-height", `${c.scrollHeight}px`);
185
- };
186
- A();
187
- const C = new ResizeObserver(A);
188
- return C.observe(c), () => C.disconnect();
189
- }, []);
190
- const v = g ? M : "div";
191
- return !r && !i ? /* @__PURE__ */ x(
192
- v,
193
- {
194
- id: n,
195
- role: "region",
196
- "aria-labelledby": `act-${o.value}`,
197
- hidden: !0,
198
- "data-state": "closed",
199
- "data-disabled": o.disabled || s.disabled ? "" : void 0,
200
- className: N(u),
201
- ref: d,
202
- ...l
203
- }
204
- ) : /* @__PURE__ */ x(
205
- v,
206
- {
207
- id: n,
208
- role: "region",
209
- "aria-labelledby": `act-${o.value}`,
210
- "data-state": r ? "open" : "closed",
211
- "data-disabled": o.disabled || s.disabled ? "" : void 0,
212
- className: N("overflow-hidden", u),
213
- ref: d,
214
- ...l
215
- }
216
- );
217
- }
218
- );
219
- U.displayName = "AccordionContent";
220
- export {
221
- z as Accordion,
222
- U as AccordionContent,
223
- B as AccordionItem,
224
- K as AccordionTrigger
225
- };
@@ -1,13 +0,0 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- import { ComponentProps } from 'react';
3
- export type BadgeProps = ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
4
- asChild?: boolean;
5
- };
6
- declare const badgeVariants: (props?: ({
7
- variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
8
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
- declare function BadgeBase({ className, variant, asChild, ...props }: ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
10
- asChild?: boolean;
11
- }): import("react/jsx-runtime").JSX.Element;
12
- export { BadgeBase, badgeVariants };
13
- //# sourceMappingURL=BadgeBase.d.ts.map
@@ -1,35 +0,0 @@
1
- import "../styles/main.css";
2
- import { jsx as n } from "react/jsx-runtime";
3
- import { Slot as t } from "../primitives/slot.js";
4
- import { c as o } from "../twUtils-CRiPKpXj.js";
5
- import { c as s } from "../index-CRBC94ik.js";
6
- const d = s(
7
- `inline-flex items-center justify-center rounded-sm px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none
8
- focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-danger-100/20 dark:aria-invalid:ring-danger-100/40 aria-invalid:border-danger-200
9
- transition-[color,box-shadow] overflow-hidden`,
10
- {
11
- variants: {
12
- variant: {
13
- default: "bg-badge-primary-bg text-text-primary [a&]:hover:bg-badge-primary-bg--hover group-data-[state=on]:bg-badge-primary-bg--active",
14
- secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
15
- destructive: "bg-danger-100 text-white [a&]:hover:bg-danger-100/90 focus-visible:ring-danger-100/20 dark:focus-visible:ring-danger-100/40 dark:bg-danger-100/60",
16
- outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
17
- }
18
- },
19
- defaultVariants: {
20
- variant: "default"
21
- }
22
- }
23
- );
24
- function l({
25
- className: r,
26
- variant: e,
27
- asChild: a = !1,
28
- ...i
29
- }) {
30
- return /* @__PURE__ */ n(a ? t : "span", { "data-slot": "badge", className: o(d({ variant: e }), r), ...i });
31
- }
32
- export {
33
- l as BadgeBase,
34
- d as badgeVariants
35
- };
@@ -1,261 +0,0 @@
1
- import "./styles/main.css";
2
- import { jsx as p, Fragment as K, jsxs as I } from "react/jsx-runtime";
3
- import "./Icons/AnnotationsIcon.js";
4
- import "./Icons/CalendarIcon.js";
5
- import "./Icons/CheckCircleIcon.js";
6
- import "./Icons/CheckSquareIcon.js";
7
- import "./Icons/CheckmarkIcon.js";
8
- import "./Icons/ChevronDownIcon.js";
9
- import "./Icons/ChevronUpIcon.js";
10
- import "./Icons/ClockIcon.js";
11
- import "./Icons/CloseCircleIcon.js";
12
- import "./Icons/CloseIcon.js";
13
- import "./Icons/DashboardIcon.js";
14
- import "./Icons/DeleteIcon.js";
15
- import "./Icons/DurationIcon.js";
16
- import "./Icons/EmailIcon.js";
17
- import "./Icons/EraserIcon.js";
18
- import "./Icons/ErrorIcon.js";
19
- import { EyeClosedIcon as U } from "./Icons/EyeClosedIcon.js";
20
- import "./Icons/EyeClosedIcon2.js";
21
- import { EyeOpenIcon as V } from "./Icons/EyeOpenIcon.js";
22
- import "./Icons/GoToFirstIcon.js";
23
- import "./Icons/GoToLastIcon.js";
24
- import "./Icons/HarmonicCursorsIcon.js";
25
- import "./Icons/InfoIcon.js";
26
- import "./Icons/LabelIcon.js";
27
- import "./Icons/LassoIcon.js";
28
- import "./Icons/LineToolIcon.js";
29
- import "./Icons/LiveViewIcon.js";
30
- import "./Icons/LoaderIcon.js";
31
- import "./Icons/LocationIcon.js";
32
- import "./Icons/LogoutIcon.js";
33
- import "./Icons/MetadataIcon.js";
34
- import "./Icons/MinusIcon.js";
35
- import "./Icons/OntologyIcon.js";
36
- import "./Icons/PanelIconClose.js";
37
- import "./Icons/PanelIconOpen.js";
38
- import "./Icons/PlayIcon.js";
39
- import "./Icons/PlusIcon.js";
40
- import "./Icons/ResetIcon.js";
41
- import "./Icons/ScissorsIcon.js";
42
- import "./Icons/SettingsIcon.js";
43
- import "./Icons/TrashIcon.js";
44
- import "./Icons/UndoIcon.js";
45
- import "./Icons/UserIcon.js";
46
- import "./Icons/WarningIcon.js";
47
- import "./Icons/ZoomAllIcon.js";
48
- import "./Icons/ZoomXIcon.js";
49
- import "./Icons/ZoomYIcon.js";
50
- import { Input as X } from "./Input.js";
51
- import { calculatePasswordStrength as _ } from "./utils/sharedUtils.js";
52
- import * as b from "react";
53
- import { useId as A, useRef as E, useContext as T, useInsertionEffect as B, useMemo as k, Children as F, isValidElement as G, useState as M } from "react";
54
- import { M as Y, i as q, u as D, P as J, a as Q, b as Z, L as tt, m as L } from "./proxy-DD79Ok6n.js";
55
- function S(t, r) {
56
- if (typeof t == "function")
57
- return t(r);
58
- t != null && (t.current = r);
59
- }
60
- function et(...t) {
61
- return (r) => {
62
- let e = !1;
63
- const i = t.map((s) => {
64
- const o = S(s, r);
65
- return !e && typeof o == "function" && (e = !0), o;
66
- });
67
- if (e)
68
- return () => {
69
- for (let s = 0; s < i.length; s++) {
70
- const o = i[s];
71
- typeof o == "function" ? o() : S(t[s], null);
72
- }
73
- };
74
- };
75
- }
76
- function ot(...t) {
77
- return b.useCallback(et(...t), t);
78
- }
79
- class nt extends b.Component {
80
- getSnapshotBeforeUpdate(r) {
81
- const e = this.props.childRef.current;
82
- if (e && r.isPresent && !this.props.isPresent) {
83
- const i = e.offsetParent, s = q(i) && i.offsetWidth || 0, o = this.props.sizeRef.current;
84
- o.height = e.offsetHeight || 0, o.width = e.offsetWidth || 0, o.top = e.offsetTop, o.left = e.offsetLeft, o.right = s - o.width - o.left;
85
- }
86
- return null;
87
- }
88
- /**
89
- * Required with getSnapshotBeforeUpdate to stop React complaining.
90
- */
91
- componentDidUpdate() {
92
- }
93
- render() {
94
- return this.props.children;
95
- }
96
- }
97
- function rt({ children: t, isPresent: r, anchorX: e, root: i }) {
98
- const s = A(), o = E(null), f = E({
99
- width: 0,
100
- height: 0,
101
- top: 0,
102
- left: 0,
103
- right: 0
104
- }), { nonce: u } = T(Y), g = ot(o, t?.ref);
105
- return B(() => {
106
- const { width: n, height: C, top: l, left: m, right: d } = f.current;
107
- if (r || !o.current || !n || !C)
108
- return;
109
- const y = e === "left" ? `left: ${m}` : `right: ${d}`;
110
- o.current.dataset.motionPopId = s;
111
- const a = document.createElement("style");
112
- u && (a.nonce = u);
113
- const P = i ?? document.head;
114
- return P.appendChild(a), a.sheet && a.sheet.insertRule(`
115
- [data-motion-pop-id="${s}"] {
116
- position: absolute !important;
117
- width: ${n}px !important;
118
- height: ${C}px !important;
119
- ${y}px !important;
120
- top: ${l}px !important;
121
- }
122
- `), () => {
123
- P.contains(a) && P.removeChild(a);
124
- };
125
- }, [r]), p(nt, { isPresent: r, childRef: o, sizeRef: f, children: b.cloneElement(t, { ref: g }) });
126
- }
127
- const it = ({ children: t, initial: r, isPresent: e, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: f, anchorX: u, root: g }) => {
128
- const n = D(st), C = A();
129
- let l = !0, m = k(() => (l = !1, {
130
- id: C,
131
- initial: r,
132
- isPresent: e,
133
- custom: s,
134
- onExitComplete: (d) => {
135
- n.set(d, !0);
136
- for (const y of n.values())
137
- if (!y)
138
- return;
139
- i && i();
140
- },
141
- register: (d) => (n.set(d, !1), () => n.delete(d))
142
- }), [e, n, i]);
143
- return o && l && (m = { ...m }), k(() => {
144
- n.forEach((d, y) => n.set(y, !1));
145
- }, [e]), b.useEffect(() => {
146
- !e && !n.size && i && i();
147
- }, [e]), f === "popLayout" && (t = p(rt, { isPresent: e, anchorX: u, root: g, children: t })), p(J.Provider, { value: m, children: t });
148
- };
149
- function st() {
150
- return /* @__PURE__ */ new Map();
151
- }
152
- const R = (t) => t.key || "";
153
- function j(t) {
154
- const r = [];
155
- return F.forEach(t, (e) => {
156
- G(e) && r.push(e);
157
- }), r;
158
- }
159
- const lt = ({ children: t, custom: r, initial: e = !0, onExitComplete: i, presenceAffectsLayout: s = !0, mode: o = "sync", propagate: f = !1, anchorX: u = "left", root: g }) => {
160
- const [n, C] = Q(f), l = k(() => j(t), [t]), m = f && !n ? [] : l.map(R), d = E(!0), y = E(l), a = D(() => /* @__PURE__ */ new Map()), [P, O] = M(l), [w, $] = M(l);
161
- Z(() => {
162
- d.current = !1, y.current = l;
163
- for (let h = 0; h < w.length; h++) {
164
- const c = R(w[h]);
165
- m.includes(c) ? a.delete(c) : a.get(c) !== !0 && a.set(c, !1);
166
- }
167
- }, [w, m.length, m.join("-")]);
168
- const v = [];
169
- if (l !== P) {
170
- let h = [...l];
171
- for (let c = 0; c < w.length; c++) {
172
- const x = w[c], N = R(x);
173
- m.includes(N) || (h.splice(c, 0, x), v.push(x));
174
- }
175
- return o === "wait" && v.length && (h = v), $(j(h)), O(l), null;
176
- }
177
- process.env.NODE_ENV !== "production" && o === "wait" && w.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
178
- const { forceRender: W } = T(tt);
179
- return p(K, { children: w.map((h) => {
180
- const c = R(h), x = f && !n ? !1 : l === w || m.includes(c), N = () => {
181
- if (a.has(c))
182
- a.set(c, !0);
183
- else
184
- return;
185
- let z = !0;
186
- a.forEach((H) => {
187
- H || (z = !1);
188
- }), z && (W?.(), $(y.current), f && C?.(), i && i());
189
- };
190
- return p(it, { isPresent: x, initial: !d.current || e ? void 0 : !1, custom: r, presenceAffectsLayout: s, mode: o, root: g, onExitComplete: x ? void 0 : N, anchorX: u, children: h }, c);
191
- }) });
192
- }, se = ({
193
- value: t,
194
- onChange: r,
195
- id: e,
196
- label: i,
197
- placeholder: s = "••••••••",
198
- showStrength: o = !1,
199
- className: f = ""
200
- }) => {
201
- const [u, g] = M(!1), n = t && o ? _(t) : null;
202
- return /* @__PURE__ */ I("div", { children: [
203
- /* @__PURE__ */ p(
204
- X,
205
- {
206
- type: u ? "text" : "password",
207
- value: t,
208
- onChange: (C) => r(C.target.value),
209
- className: f,
210
- id: e,
211
- label: i,
212
- placeholder: s,
213
- endIcon: u ? /* @__PURE__ */ p(
214
- U,
215
- {
216
- size: 22,
217
- onClick: () => g(!u),
218
- className: "absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer transition-colors"
219
- }
220
- ) : /* @__PURE__ */ p(
221
- V,
222
- {
223
- size: 22,
224
- onClick: () => g(!u),
225
- className: "absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer transition-colors"
226
- }
227
- )
228
- }
229
- ),
230
- /* @__PURE__ */ p(lt, { children: n && t.length > 0 && /* @__PURE__ */ I(
231
- L.div,
232
- {
233
- initial: { opacity: 0, height: 0 },
234
- animate: { opacity: 1, height: "auto" },
235
- exit: { opacity: 0, height: 0 },
236
- transition: { duration: 0.2 },
237
- className: "mt-2",
238
- children: [
239
- /* @__PURE__ */ I("div", { className: "mb-1 flex items-center justify-between", children: [
240
- /* @__PURE__ */ p("span", { className: "text-text-secondary text-xs", children: "Password strength" }),
241
- /* @__PURE__ */ p("span", { className: "text-xs font-medium", style: { color: n.color }, children: n.label })
242
- ] }),
243
- /* @__PURE__ */ p("div", { className: "h-1.5 overflow-hidden rounded-full bg-white/5", children: /* @__PURE__ */ p(
244
- L.div,
245
- {
246
- className: "h-full rounded-full",
247
- style: { backgroundColor: n.color },
248
- initial: { width: 0 },
249
- animate: { width: `${n.score / 5 * 100}%` },
250
- transition: { duration: 0.3, ease: "easeOut" }
251
- }
252
- ) })
253
- ]
254
- }
255
- ) })
256
- ] });
257
- };
258
- export {
259
- lt as A,
260
- se as P
261
- };
@@ -1,42 +0,0 @@
1
- import { AsChildProp } from '../../primitives/slot';
2
- import { ButtonHTMLAttributes, HTMLAttributes } from 'react';
3
- type Dir = 'ltr' | 'rtl';
4
- type AccordionType = 'single' | 'multiple';
5
- export type AccordionProps = HTMLAttributes<HTMLDivElement> & {
6
- type?: AccordionType;
7
- value?: string | string[];
8
- defaultValue?: string | string[];
9
- onValueChange?: (value: string | string[]) => void;
10
- collapsible?: boolean;
11
- dir?: Dir;
12
- disabled?: boolean;
13
- rovingFocus?: boolean;
14
- };
15
- export declare const Accordion: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
16
- type?: AccordionType;
17
- value?: string | string[];
18
- defaultValue?: string | string[];
19
- onValueChange?: (value: string | string[]) => void;
20
- collapsible?: boolean;
21
- dir?: Dir;
22
- disabled?: boolean;
23
- rovingFocus?: boolean;
24
- } & import('react').RefAttributes<HTMLDivElement>>;
25
- export type AccordionItemProps = HTMLAttributes<HTMLDivElement> & {
26
- value: string;
27
- disabled?: boolean;
28
- };
29
- export declare const AccordionItem: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
30
- value: string;
31
- disabled?: boolean;
32
- } & import('react').RefAttributes<HTMLDivElement>>;
33
- export type AccordionTriggerProps = ButtonHTMLAttributes<HTMLButtonElement> & AsChildProp;
34
- export declare const AccordionTrigger: import('react').ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & AsChildProp & import('react').RefAttributes<HTMLButtonElement>>;
35
- export type AccordionContentProps = HTMLAttributes<HTMLDivElement> & AsChildProp & {
36
- forceMount?: boolean;
37
- };
38
- export declare const AccordionContent: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & AsChildProp & {
39
- forceMount?: boolean;
40
- } & import('react').RefAttributes<HTMLDivElement>>;
41
- export {};
42
- //# sourceMappingURL=AccordionBase.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AccordionBase.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionBase.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAUL,KAAK,oBAAoB,EAEzB,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAA;AAMd,KAAK,GAAG,GAAG,KAAK,GAAG,KAAK,CAAA;AACxB,KAAK,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAA;AAyB1C,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC5D,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAChC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAA;IAClD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,SAAS;WAVb,aAAa;YACZ,MAAM,GAAG,MAAM,EAAE;mBACV,MAAM,GAAG,MAAM,EAAE;oBAChB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI;kBACpC,OAAO;UACf,GAAG;eACE,OAAO;kBACJ,OAAO;kDAyGtB,CAAA;AAKD,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAChE,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAID,eAAO,MAAM,aAAa;WANjB,MAAM;eACF,OAAO;kDAgCnB,CAAA;AAKD,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG,WAAW,CAAA;AAEzF,eAAO,MAAM,gBAAgB,qJA8G5B,CAAA;AAKD,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,cAAc,CAAC,GAChE,WAAW,GAAG;IACZ,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAEH,eAAO,MAAM,gBAAgB;iBAHZ,OAAO;kDAkEvB,CAAA"}