@syscore/ui-library 1.7.8 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import React__default, { useState, useEffect, useCallback, useRef } from "react";
4
- import * as AccordionPrimitive from "@radix-ui/react-accordion";
5
- import { ChevronDown, GripVertical, X as X$1, PanelLeft, Check, Circle, Dot, ChevronLeft, ChevronRight, XIcon, Search, MoreHorizontal, ArrowLeft, ArrowRight } from "lucide-react";
4
+ import { motion, AnimatePresence } from "motion/react";
6
5
  import { clsx } from "clsx";
7
6
  import { twMerge } from "tailwind-merge";
8
- import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
9
7
  import { cva } from "class-variance-authority";
8
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
10
9
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
11
10
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
11
+ import { GripVertical, X as X$1, PanelLeft, Check, Circle, Dot, ChevronLeft, ChevronRight, XIcon, Search, MoreHorizontal, ChevronDown, ArrowLeft, ArrowRight } from "lucide-react";
12
12
  import * as ResizablePrimitive from "react-resizable-panels";
13
13
  import { Slot } from "@radix-ui/react-slot";
14
14
  import * as SheetPrimitive from "@radix-ui/react-dialog";
@@ -28,7 +28,6 @@ import * as ProgressPrimitive from "@radix-ui/react-progress";
28
28
  import { DayPicker } from "react-day-picker";
29
29
  import { Command as Command$1 } from "cmdk";
30
30
  import * as TabsPrimitive from "@radix-ui/react-tabs";
31
- import { AnimatePresence, motion } from "motion/react";
32
31
  import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
33
32
  import * as MenubarPrimitive from "@radix-ui/react-menubar";
34
33
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
@@ -45,39 +44,370 @@ import { Toaster as Toaster$2 } from "sonner";
45
44
  function cn(...inputs) {
46
45
  return twMerge(clsx(inputs));
47
46
  }
48
- const Accordion = AccordionPrimitive.Root;
49
- const AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
50
- AccordionPrimitive.Item,
47
+ function capitalize(str) {
48
+ if (!str) return str;
49
+ return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
50
+ }
51
+ const buttonVariants = cva(
52
+ "button",
51
53
  {
52
- ref,
53
- className: cn("accordion-item", className),
54
+ variants: {
55
+ variant: {
56
+ // CTA variants
57
+ clear: "button--clear",
58
+ default: "button--default",
59
+ "primary-gradient": "button--primary-gradient",
60
+ "primary-dark": "button--primary-dark",
61
+ "secondary-light": "button--secondary-light",
62
+ "tertiary-light": "button--tertiary-light",
63
+ // Utility variants
64
+ "general-primary": "button--general-primary",
65
+ "general-secondary": "button--general-secondary",
66
+ "general-tertiary": "button--general-tertiary",
67
+ "transparent-tertiary": "button--transparent-tertiary",
68
+ "tooltip-primary": "button--tooltip-primary",
69
+ "tooltip-secondary": "button--tooltip-secondary"
70
+ },
71
+ size: {
72
+ xlarge: "button--xlarge",
73
+ large: "button--large",
74
+ utility: "button--utility",
75
+ icon: "button--icon"
76
+ }
77
+ },
78
+ defaultVariants: {
79
+ variant: "default",
80
+ size: "large"
81
+ }
82
+ }
83
+ );
84
+ const sizeTextClasses = {
85
+ xlarge: "body-large",
86
+ large: "body-base",
87
+ utility: "body-small",
88
+ icon: ""
89
+ };
90
+ const Button = React.forwardRef(
91
+ ({ className, variant: variant2, size, ftMadeFont, mazzardSoftFont, children, style, ...props }, ref) => {
92
+ const textClass = sizeTextClasses[size || "large"];
93
+ return /* @__PURE__ */ jsx(
94
+ "button",
95
+ {
96
+ className: cn(
97
+ buttonVariants({ variant: variant2, size }),
98
+ ftMadeFont && "font-ftMade",
99
+ mazzardSoftFont && "font-mazzardSoft",
100
+ className
101
+ ),
102
+ style,
103
+ ref,
104
+ ...props,
105
+ children: size === "icon" ? children : /* @__PURE__ */ jsx("span", { className: cn("button-text", textClass), children })
106
+ }
107
+ );
108
+ }
109
+ );
110
+ Button.displayName = "Button";
111
+ const UtilityChevronDown = ({
112
+ className
113
+ }) => {
114
+ return /* @__PURE__ */ jsx(
115
+ "div",
116
+ {
117
+ className: cn(
118
+ "size-4 flex items-center justify-center text-gray-500",
119
+ className
120
+ ),
121
+ children: /* @__PURE__ */ jsx(
122
+ "svg",
123
+ {
124
+ xmlns: "http://www.w3.org/2000/svg",
125
+ width: "12",
126
+ height: "6",
127
+ viewBox: "0 0 12 6",
128
+ fill: "none",
129
+ className: cn("text-inherit"),
130
+ children: /* @__PURE__ */ jsx(
131
+ "path",
132
+ {
133
+ d: "M11 0.75L6 5.25L1 0.75",
134
+ stroke: "currentColor",
135
+ strokeWidth: "1.5",
136
+ strokeLinecap: "round",
137
+ strokeLinejoin: "round"
138
+ }
139
+ )
140
+ }
141
+ )
142
+ }
143
+ );
144
+ };
145
+ const AccordionContext = React.createContext(
146
+ null
147
+ );
148
+ const AccordionItemContext = React.createContext(null);
149
+ function useAccordion() {
150
+ const context = React.useContext(AccordionContext);
151
+ if (!context) {
152
+ throw new Error("Accordion components must be used within <Accordion>");
153
+ }
154
+ return context;
155
+ }
156
+ function useAccordionItem() {
157
+ const context = React.useContext(AccordionItemContext);
158
+ if (!context) {
159
+ throw new Error(
160
+ "AccordionTrigger and AccordionContent must be used within <AccordionItem>"
161
+ );
162
+ }
163
+ return context;
164
+ }
165
+ function useAccordionState(options = {}) {
166
+ const { allowMultiple = false, defaultExpanded } = options;
167
+ const getInitialExpanded = () => {
168
+ if (!defaultExpanded) return /* @__PURE__ */ new Set();
169
+ if (Array.isArray(defaultExpanded)) return new Set(defaultExpanded);
170
+ return /* @__PURE__ */ new Set([defaultExpanded]);
171
+ };
172
+ const [expandedValues, setExpandedValues] = React.useState(getInitialExpanded);
173
+ const [isAllExpanded, setIsAllExpanded] = React.useState(false);
174
+ const hasAnyExpanded = React.useMemo(
175
+ () => isAllExpanded || expandedValues.size > 0,
176
+ [isAllExpanded, expandedValues]
177
+ );
178
+ const toggleAll = React.useCallback(() => {
179
+ if (hasAnyExpanded) {
180
+ setIsAllExpanded(false);
181
+ setExpandedValues(/* @__PURE__ */ new Set());
182
+ } else {
183
+ setIsAllExpanded(true);
184
+ setExpandedValues(/* @__PURE__ */ new Set());
185
+ }
186
+ }, [hasAnyExpanded]);
187
+ return {
188
+ expandedValues,
189
+ setExpandedValues,
190
+ hasAnyExpanded,
191
+ toggleAll
192
+ };
193
+ }
194
+ const Accordion = React.forwardRef(
195
+ ({
196
+ allowMultiple = false,
197
+ defaultExpanded,
198
+ expandedValues: controlledExpandedValues,
199
+ onExpandedChange,
200
+ children,
201
+ className,
54
202
  ...props
203
+ }, ref) => {
204
+ const getInitialExpanded = () => {
205
+ if (!defaultExpanded) return /* @__PURE__ */ new Set();
206
+ if (Array.isArray(defaultExpanded)) return new Set(defaultExpanded);
207
+ return /* @__PURE__ */ new Set([defaultExpanded]);
208
+ };
209
+ const [uncontrolledExpandedValues, setUncontrolledExpandedValues] = React.useState(getInitialExpanded);
210
+ const [isAllExpanded, setIsAllExpanded] = React.useState(false);
211
+ const isControlled = controlledExpandedValues !== void 0;
212
+ const expandedValues = isControlled ? controlledExpandedValues : uncontrolledExpandedValues;
213
+ const hasAnyExpanded = React.useMemo(
214
+ () => isAllExpanded || expandedValues.size > 0,
215
+ [isAllExpanded, expandedValues]
216
+ );
217
+ const isExpanded = React.useCallback(
218
+ (value) => isAllExpanded || expandedValues.has(value),
219
+ [isAllExpanded, expandedValues]
220
+ );
221
+ const toggle = React.useCallback(
222
+ (value) => {
223
+ const newValues = new Set(expandedValues);
224
+ if (newValues.has(value)) {
225
+ newValues.delete(value);
226
+ } else {
227
+ if (!allowMultiple) {
228
+ newValues.clear();
229
+ }
230
+ newValues.add(value);
231
+ }
232
+ if (!isControlled) {
233
+ setUncontrolledExpandedValues(newValues);
234
+ }
235
+ onExpandedChange == null ? void 0 : onExpandedChange(newValues);
236
+ setIsAllExpanded(false);
237
+ },
238
+ [allowMultiple, expandedValues, isControlled, onExpandedChange]
239
+ );
240
+ const expandAll = React.useCallback(() => {
241
+ setIsAllExpanded(true);
242
+ const emptySet = /* @__PURE__ */ new Set();
243
+ if (!isControlled) {
244
+ setUncontrolledExpandedValues(emptySet);
245
+ }
246
+ onExpandedChange == null ? void 0 : onExpandedChange(emptySet);
247
+ }, [isControlled, onExpandedChange]);
248
+ const collapseAll = React.useCallback(() => {
249
+ setIsAllExpanded(false);
250
+ const emptySet = /* @__PURE__ */ new Set();
251
+ if (!isControlled) {
252
+ setUncontrolledExpandedValues(emptySet);
253
+ }
254
+ onExpandedChange == null ? void 0 : onExpandedChange(emptySet);
255
+ }, [isControlled, onExpandedChange]);
256
+ const contextValue = React.useMemo(
257
+ () => ({
258
+ expandedValues,
259
+ isExpanded,
260
+ toggle,
261
+ expandAll,
262
+ collapseAll,
263
+ hasAnyExpanded,
264
+ allowMultiple
265
+ }),
266
+ [
267
+ expandedValues,
268
+ isExpanded,
269
+ toggle,
270
+ expandAll,
271
+ collapseAll,
272
+ hasAnyExpanded,
273
+ allowMultiple
274
+ ]
275
+ );
276
+ return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("div", { ref, className: cn(className), ...props, children }) });
55
277
  }
56
- ));
278
+ );
279
+ Accordion.displayName = "Accordion";
280
+ const AccordionSectionHeader = React.forwardRef(({ title, hasExpanded, onToggleAll, className }, ref) => {
281
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn(className), children: [
282
+ /* @__PURE__ */ jsx("h2", { children: title }),
283
+ onToggleAll && /* @__PURE__ */ jsx(
284
+ motion.div,
285
+ {
286
+ animate: { rotate: hasExpanded ? 180 : 0 },
287
+ transition: { duration: 0.2 },
288
+ children: /* @__PURE__ */ jsx(Button, { size: "icon", onClick: onToggleAll, children: /* @__PURE__ */ jsx(UtilityChevronDown, {}) })
289
+ }
290
+ )
291
+ ] });
292
+ });
293
+ AccordionSectionHeader.displayName = "AccordionSectionHeader";
294
+ const AccordionHeaderRow = React.forwardRef(({ title, className }, ref) => {
295
+ const { hasAnyExpanded, expandAll, collapseAll } = useAccordion();
296
+ const handleToggleAll = React.useCallback(() => {
297
+ if (hasAnyExpanded) {
298
+ collapseAll();
299
+ } else {
300
+ expandAll();
301
+ }
302
+ }, [hasAnyExpanded, collapseAll, expandAll]);
303
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn(className), children: [
304
+ /* @__PURE__ */ jsx("h2", { children: title }),
305
+ /* @__PURE__ */ jsx(
306
+ motion.div,
307
+ {
308
+ animate: { rotate: hasAnyExpanded ? 180 : 0 },
309
+ transition: { duration: 0.2 },
310
+ style: { willChange: "transform" },
311
+ children: /* @__PURE__ */ jsx(Button, { size: "icon", onClick: handleToggleAll, children: /* @__PURE__ */ jsx(UtilityChevronDown, {}) })
312
+ }
313
+ )
314
+ ] });
315
+ });
316
+ AccordionHeaderRow.displayName = "AccordionHeaderRow";
317
+ const AccordionItem = React.forwardRef(
318
+ ({ value, children, className, ...props }, ref) => {
319
+ const { isExpanded: isExpandedFn } = useAccordion();
320
+ const isExpanded = isExpandedFn(value);
321
+ const itemContextValue = React.useMemo(
322
+ () => ({ value, isExpanded }),
323
+ [value, isExpanded]
324
+ );
325
+ return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: itemContextValue, children: /* @__PURE__ */ jsx("div", { ref, className: cn(className), ...props, children }) });
326
+ }
327
+ );
57
328
  AccordionItem.displayName = "AccordionItem";
58
- const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "accordion-header", children: /* @__PURE__ */ jsxs(
59
- AccordionPrimitive.Trigger,
60
- {
61
- ref,
62
- className: cn("accordion-trigger", className),
63
- ...props,
64
- children: [
65
- children,
66
- /* @__PURE__ */ jsx(ChevronDown, { className: "accordion-chevron" })
67
- ]
329
+ const AccordionHeader = React.forwardRef(
330
+ ({ children, className, onClick, ...props }, ref) => {
331
+ return /* @__PURE__ */ jsx("div", { ref, onClick, className: cn(className), ...props, children });
68
332
  }
69
- ) }));
70
- AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
71
- const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
72
- AccordionPrimitive.Content,
73
- {
74
- ref,
75
- className: "accordion-content",
76
- ...props,
77
- children: /* @__PURE__ */ jsx("div", { className: cn("accordion-content-inner", className), children })
333
+ );
334
+ AccordionHeader.displayName = "AccordionHeader";
335
+ const AccordionTrigger = React.forwardRef(({ className, onClick, ...props }, ref) => {
336
+ const { toggle } = useAccordion();
337
+ const { value, isExpanded } = useAccordionItem();
338
+ const handleClick = React.useCallback(
339
+ (e) => {
340
+ e.stopPropagation();
341
+ toggle(value);
342
+ onClick == null ? void 0 : onClick(e);
343
+ },
344
+ [toggle, value, onClick]
345
+ );
346
+ return /* @__PURE__ */ jsx(
347
+ motion.div,
348
+ {
349
+ animate: { rotate: isExpanded ? 180 : 0 },
350
+ transition: { duration: 0.2 },
351
+ style: { willChange: "transform" },
352
+ children: /* @__PURE__ */ jsx(
353
+ Button,
354
+ {
355
+ ref,
356
+ size: "icon",
357
+ variant: "clear",
358
+ onClick: handleClick,
359
+ className: cn(className),
360
+ ...props,
361
+ children: /* @__PURE__ */ jsx(UtilityChevronDown, {})
362
+ }
363
+ )
364
+ }
365
+ );
366
+ });
367
+ AccordionTrigger.displayName = "AccordionTrigger";
368
+ const AccordionContent = React.forwardRef(
369
+ ({ children, className, ...props }, ref) => {
370
+ const { isExpanded } = useAccordionItem();
371
+ return /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: isExpanded && /* @__PURE__ */ jsx(
372
+ motion.div,
373
+ {
374
+ initial: { height: 0, opacity: 0 },
375
+ animate: { height: "auto", opacity: 1 },
376
+ exit: { height: 0, opacity: 0 },
377
+ transition: { duration: 0.3, ease: [0.25, 0.46, 0.45, 0.94] },
378
+ className: cn(className),
379
+ style: { willChange: "opacity" },
380
+ children: /* @__PURE__ */ jsx("div", { ref, ...props, children })
381
+ }
382
+ ) });
78
383
  }
79
- ));
80
- AccordionContent.displayName = AccordionPrimitive.Content.displayName;
384
+ );
385
+ AccordionContent.displayName = "AccordionContent";
386
+ const AccordionListRow = React.forwardRef(
387
+ ({
388
+ icon,
389
+ badge,
390
+ title,
391
+ titleClassName,
392
+ rightContent,
393
+ onClick,
394
+ className,
395
+ variant: variant2 = "default",
396
+ ...props
397
+ }, ref) => {
398
+ return /* @__PURE__ */ jsxs("div", { ref, onClick, className: cn(className), ...props, children: [
399
+ icon,
400
+ badge,
401
+ /* @__PURE__ */ jsx("span", { className: cn(titleClassName), children: title }),
402
+ rightContent
403
+ ] });
404
+ }
405
+ );
406
+ AccordionListRow.displayName = "AccordionListRow";
407
+ const AccordionContainer = React.forwardRef(({ children, className, ...props }, ref) => {
408
+ return /* @__PURE__ */ jsx("section", { ref, className: cn(className), ...props, children });
409
+ });
410
+ AccordionContainer.displayName = "AccordionContainer";
81
411
  const AspectRatio = AspectRatioPrimitive.Root;
82
412
  const typographyVariants = cva("", {
83
413
  variants: {
@@ -385,66 +715,6 @@ function useIsMobile() {
385
715
  }, []);
386
716
  return !!isMobile;
387
717
  }
388
- const buttonVariants = cva(
389
- "button",
390
- {
391
- variants: {
392
- variant: {
393
- // CTA variants
394
- clear: "button--clear",
395
- default: "button--default",
396
- "primary-gradient": "button--primary-gradient",
397
- "primary-dark": "button--primary-dark",
398
- "secondary-light": "button--secondary-light",
399
- "tertiary-light": "button--tertiary-light",
400
- // Utility variants
401
- "general-primary": "button--general-primary",
402
- "general-secondary": "button--general-secondary",
403
- "general-tertiary": "button--general-tertiary",
404
- "transparent-tertiary": "button--transparent-tertiary",
405
- "tooltip-primary": "button--tooltip-primary",
406
- "tooltip-secondary": "button--tooltip-secondary"
407
- },
408
- size: {
409
- xlarge: "button--xlarge",
410
- large: "button--large",
411
- utility: "button--utility",
412
- icon: "button--icon"
413
- }
414
- },
415
- defaultVariants: {
416
- variant: "default",
417
- size: "large"
418
- }
419
- }
420
- );
421
- const sizeTextClasses = {
422
- xlarge: "body-large",
423
- large: "body-base",
424
- utility: "body-small",
425
- icon: ""
426
- };
427
- const Button = React.forwardRef(
428
- ({ className, variant: variant2, size, ftMadeFont, mazzardSoftFont, children, style, ...props }, ref) => {
429
- const textClass = sizeTextClasses[size || "large"];
430
- return /* @__PURE__ */ jsx(
431
- "button",
432
- {
433
- className: cn(
434
- buttonVariants({ variant: variant2, size }),
435
- ftMadeFont && "font-ftMade",
436
- mazzardSoftFont && "font-mazzardSoft",
437
- className
438
- ),
439
- style,
440
- ref,
441
- ...props,
442
- children: size === "icon" ? children : /* @__PURE__ */ jsx("span", { className: cn("button-text", textClass), children })
443
- }
444
- );
445
- }
446
- );
447
- Button.displayName = "Button";
448
718
  const Input = React.forwardRef(
449
719
  ({ className, type, startIcon, endIcon, ...props }, ref) => {
450
720
  const isReadOnly = props.readOnly;
@@ -1277,7 +1547,10 @@ const Label = React.forwardRef(({ className, children, ...props }, ref) => /* @_
1277
1547
  ref,
1278
1548
  className: cn(labelVariants(), className),
1279
1549
  ...props,
1280
- children: /* @__PURE__ */ jsx("span", { className: "overline-medium", children })
1550
+ children: /* @__PURE__ */ jsxs("div", { className: "overline-medium", children: [
1551
+ " ",
1552
+ children
1553
+ ] })
1281
1554
  }
1282
1555
  ));
1283
1556
  Label.displayName = LabelPrimitive.Root.displayName;
@@ -1385,40 +1658,6 @@ const InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
1385
1658
  InputOTPSlot.displayName = "InputOTPSlot";
1386
1659
  const InputOTPSeparator = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx(Dot, {}) }));
1387
1660
  InputOTPSeparator.displayName = "InputOTPSeparator";
1388
- const UtilityChevronDown = ({
1389
- className
1390
- }) => {
1391
- return /* @__PURE__ */ jsx(
1392
- "div",
1393
- {
1394
- className: cn(
1395
- "size-4 flex items-center justify-center text-gray-500",
1396
- className
1397
- ),
1398
- children: /* @__PURE__ */ jsx(
1399
- "svg",
1400
- {
1401
- xmlns: "http://www.w3.org/2000/svg",
1402
- width: "12",
1403
- height: "6",
1404
- viewBox: "0 0 12 6",
1405
- fill: "none",
1406
- className: cn("text-inherit"),
1407
- children: /* @__PURE__ */ jsx(
1408
- "path",
1409
- {
1410
- d: "M11 0.75L6 5.25L1 0.75",
1411
- stroke: "currentColor",
1412
- strokeWidth: "1.5",
1413
- strokeLinecap: "round",
1414
- strokeLinejoin: "round"
1415
- }
1416
- )
1417
- }
1418
- )
1419
- }
1420
- );
1421
- };
1422
1661
  const Select = SelectPrimitive.Root;
1423
1662
  const SelectGroup = SelectPrimitive.Group;
1424
1663
  const SelectValue = SelectPrimitive.Value;
@@ -1669,26 +1908,23 @@ function useSegmentedControl({
1669
1908
  onValueChange: handleValueChange
1670
1909
  };
1671
1910
  }
1672
- cva(
1673
- "toggle",
1674
- {
1675
- variants: {
1676
- variant: {
1677
- default: "toggle--default",
1678
- outline: "toggle--outline"
1679
- },
1680
- size: {
1681
- default: "toggle--size-default",
1682
- sm: "toggle--size-sm",
1683
- lg: "toggle--size-lg"
1684
- }
1911
+ cva("toggle", {
1912
+ variants: {
1913
+ variant: {
1914
+ default: "toggle--default",
1915
+ outline: "toggle--outline"
1685
1916
  },
1686
- defaultVariants: {
1687
- variant: "default",
1688
- size: "default"
1917
+ size: {
1918
+ default: "toggle--size-default",
1919
+ sm: "toggle--size-sm",
1920
+ lg: "toggle--size-lg"
1689
1921
  }
1922
+ },
1923
+ defaultVariants: {
1924
+ variant: "default",
1925
+ size: "default"
1690
1926
  }
1691
- );
1927
+ });
1692
1928
  const SegmentedControlInner = React.forwardRef(
1693
1929
  ({ className, options, value, defaultValue, onValueChange, ...props }, ref) => {
1694
1930
  var _a;
@@ -1698,19 +1934,18 @@ const SegmentedControlInner = React.forwardRef(
1698
1934
  onValueChange
1699
1935
  });
1700
1936
  return /* @__PURE__ */ jsx("div", { ref, className: cn("segmented-control", className), ...props, children: options.map((option) => {
1701
- const isReactElement = React.isValidElement(option.label);
1702
1937
  const isActive = selectedValue === option.value;
1703
1938
  return /* @__PURE__ */ jsx(
1704
1939
  "button",
1705
1940
  {
1706
1941
  className: cn(
1707
- "segmented-control-button",
1942
+ "segmented-control-button body-small",
1708
1943
  isActive ? "segmented-control-button--active" : "segmented-control-button--inactive"
1709
1944
  ),
1710
1945
  onClick: () => handleValueChange(option.value),
1711
1946
  type: "button",
1712
1947
  "data-active": isActive,
1713
- children: isReactElement ? option.label : /* @__PURE__ */ jsx("span", { className: "body-small font-medium", children: option.label })
1948
+ children: option.label
1714
1949
  },
1715
1950
  option.value
1716
1951
  );
@@ -2314,29 +2549,45 @@ const SearchField = ({
2314
2549
  ) })
2315
2550
  ] });
2316
2551
  };
2317
- const getStatusClass = (status, variant2 = "light") => {
2318
- return `status-tag tag--${variant2}-${status}`;
2552
+ const getStatusClass = (status, colorScheme = "light") => {
2553
+ return `status-tag tag--${colorScheme}-${status}`;
2319
2554
  };
2320
2555
  const Tag = React.forwardRef(
2321
2556
  ({
2322
2557
  children,
2558
+ variant: variant2 = "text",
2323
2559
  active = false,
2324
2560
  status,
2325
- variant: variant2 = "light",
2561
+ colorScheme = "light",
2326
2562
  className,
2563
+ style,
2327
2564
  onClick,
2328
2565
  ...props
2329
2566
  }, ref) => {
2330
2567
  if (status) {
2331
- const statusClass = getStatusClass(status, variant2);
2568
+ const statusClass = getStatusClass(status, colorScheme);
2569
+ return /* @__PURE__ */ jsx(
2570
+ "button",
2571
+ {
2572
+ ref,
2573
+ onClick,
2574
+ className: cn("overline-medium", statusClass, className),
2575
+ style,
2576
+ ...props,
2577
+ children
2578
+ }
2579
+ );
2580
+ }
2581
+ if (variant2 === "code") {
2332
2582
  return /* @__PURE__ */ jsx(
2333
2583
  "button",
2334
2584
  {
2335
2585
  ref,
2336
2586
  onClick,
2337
- className: cn(statusClass, className),
2587
+ className: cn("tag-code", className),
2588
+ style,
2338
2589
  ...props,
2339
- children: /* @__PURE__ */ jsx("span", { className: "overline-medium", children })
2590
+ children: /* @__PURE__ */ jsx("span", { className: "number-small font-semibold", style: { color: "inherit" }, children })
2340
2591
  }
2341
2592
  );
2342
2593
  }
@@ -2346,12 +2597,13 @@ const Tag = React.forwardRef(
2346
2597
  ref,
2347
2598
  onClick,
2348
2599
  className: cn(
2349
- "tag-general",
2600
+ "tag-general body-small",
2350
2601
  active ? "tag-general--active" : "tag-general--inactive",
2351
2602
  className
2352
2603
  ),
2604
+ style,
2353
2605
  ...props,
2354
- children: /* @__PURE__ */ jsx("span", { className: "body-small font-semibold", children })
2606
+ children
2355
2607
  }
2356
2608
  );
2357
2609
  }
@@ -3668,18 +3920,6 @@ function getPayloadConfigFromPayload(config, payload, key) {
3668
3920
  }
3669
3921
  return configLabelKey in config ? config[configLabelKey] : config[key];
3670
3922
  }
3671
- const CodeBadge = ({ code, className, style }) => {
3672
- return /* @__PURE__ */ jsx(
3673
- "div",
3674
- {
3675
- className: cn("code-badge", className),
3676
- style: {
3677
- ...style
3678
- },
3679
- children: /* @__PURE__ */ jsx("span", { className: "number-small font-semibold", style: { color: "inherit" }, children: code })
3680
- }
3681
- );
3682
- };
3683
3923
  const PageHeader = React.forwardRef(
3684
3924
  ({ children, className, ...props }, ref) => {
3685
3925
  return /* @__PURE__ */ jsx("header", { ref, className: cn("page-header", className), ...props, children });
@@ -3747,296 +3987,6 @@ const PageHeaderDescription = React.forwardRef(({ children, className, ...props
3747
3987
  );
3748
3988
  });
3749
3989
  PageHeaderDescription.displayName = "PageHeaderDescription";
3750
- const StandardTableContext = React.createContext(null);
3751
- const StandardTableRowContext = React.createContext(null);
3752
- function useStandardTable() {
3753
- const context = React.useContext(StandardTableContext);
3754
- if (!context) {
3755
- throw new Error(
3756
- "StandardTable components must be used within <StandardTable>"
3757
- );
3758
- }
3759
- return context;
3760
- }
3761
- function useStandardTableRow() {
3762
- const context = React.useContext(StandardTableRowContext);
3763
- if (!context) {
3764
- throw new Error(
3765
- "StandardTableTrigger and StandardTableContent must be used within <StandardTableRow>"
3766
- );
3767
- }
3768
- return context;
3769
- }
3770
- const StandardTable = React.forwardRef(
3771
- ({
3772
- allowMultiple = false,
3773
- defaultExpanded,
3774
- expandedValues: controlledExpandedValues,
3775
- onExpandedChange,
3776
- children,
3777
- className,
3778
- ...props
3779
- }, ref) => {
3780
- const getInitialExpanded = () => {
3781
- if (!defaultExpanded) return /* @__PURE__ */ new Set();
3782
- if (Array.isArray(defaultExpanded)) return new Set(defaultExpanded);
3783
- return /* @__PURE__ */ new Set([defaultExpanded]);
3784
- };
3785
- const [uncontrolledExpandedValues, setUncontrolledExpandedValues] = React.useState(getInitialExpanded);
3786
- const [isAllExpanded, setIsAllExpanded] = React.useState(false);
3787
- const isControlled = controlledExpandedValues !== void 0;
3788
- const expandedValues = isControlled ? controlledExpandedValues : uncontrolledExpandedValues;
3789
- const hasAnyExpanded = React.useMemo(
3790
- () => isAllExpanded || expandedValues.size > 0,
3791
- [isAllExpanded, expandedValues]
3792
- );
3793
- const isExpanded = React.useCallback(
3794
- (value) => isAllExpanded || expandedValues.has(value),
3795
- [isAllExpanded, expandedValues]
3796
- );
3797
- const toggle = React.useCallback(
3798
- (value) => {
3799
- const newValues = new Set(expandedValues);
3800
- if (newValues.has(value)) {
3801
- newValues.delete(value);
3802
- } else {
3803
- if (!allowMultiple) {
3804
- newValues.clear();
3805
- }
3806
- newValues.add(value);
3807
- }
3808
- if (!isControlled) {
3809
- setUncontrolledExpandedValues(newValues);
3810
- }
3811
- onExpandedChange == null ? void 0 : onExpandedChange(newValues);
3812
- setIsAllExpanded(false);
3813
- },
3814
- [allowMultiple, expandedValues, isControlled, onExpandedChange]
3815
- );
3816
- const expandAll = React.useCallback(() => {
3817
- setIsAllExpanded(true);
3818
- const emptySet = /* @__PURE__ */ new Set();
3819
- if (!isControlled) {
3820
- setUncontrolledExpandedValues(emptySet);
3821
- }
3822
- onExpandedChange == null ? void 0 : onExpandedChange(emptySet);
3823
- }, [isControlled, onExpandedChange]);
3824
- const collapseAll = React.useCallback(() => {
3825
- setIsAllExpanded(false);
3826
- const emptySet = /* @__PURE__ */ new Set();
3827
- if (!isControlled) {
3828
- setUncontrolledExpandedValues(emptySet);
3829
- }
3830
- onExpandedChange == null ? void 0 : onExpandedChange(emptySet);
3831
- }, [isControlled, onExpandedChange]);
3832
- const contextValue = React.useMemo(
3833
- () => ({
3834
- expandedValues,
3835
- isExpanded,
3836
- toggle,
3837
- expandAll,
3838
- collapseAll,
3839
- hasAnyExpanded,
3840
- allowMultiple
3841
- }),
3842
- [
3843
- expandedValues,
3844
- isExpanded,
3845
- toggle,
3846
- expandAll,
3847
- collapseAll,
3848
- hasAnyExpanded,
3849
- allowMultiple
3850
- ]
3851
- );
3852
- return /* @__PURE__ */ jsx(StandardTableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
3853
- "div",
3854
- {
3855
- ref,
3856
- className: cn(
3857
- "border border-blue-200 rounded-xl overflow-hidden",
3858
- className
3859
- ),
3860
- ...props,
3861
- children
3862
- }
3863
- ) });
3864
- }
3865
- );
3866
- StandardTable.displayName = "StandardTable";
3867
- const StandardTableHeader = React.forwardRef(({ title, hasExpanded, onToggleAll, className }, ref) => {
3868
- return /* @__PURE__ */ jsxs("div", { ref, className: cn("standard-table-header", className), children: [
3869
- /* @__PURE__ */ jsx("h2", { className: "standard-table-header__title body-large", children: title }),
3870
- onToggleAll && /* @__PURE__ */ jsx(
3871
- motion.div,
3872
- {
3873
- animate: { rotate: hasExpanded ? 180 : 0 },
3874
- transition: { duration: 0.2 },
3875
- className: "mx-6",
3876
- children: /* @__PURE__ */ jsx(Button, { size: "icon", onClick: onToggleAll, children: /* @__PURE__ */ jsx(UtilityChevronDown, {}) })
3877
- }
3878
- )
3879
- ] });
3880
- });
3881
- StandardTableHeader.displayName = "StandardTableHeader";
3882
- const StandardTableHeaderRow = React.forwardRef(({ title, className }, ref) => {
3883
- const { hasAnyExpanded, expandAll, collapseAll } = useStandardTable();
3884
- const handleToggleAll = React.useCallback(() => {
3885
- if (hasAnyExpanded) {
3886
- collapseAll();
3887
- } else {
3888
- expandAll();
3889
- }
3890
- }, [hasAnyExpanded, collapseAll, expandAll]);
3891
- return /* @__PURE__ */ jsxs("div", { ref, className: cn("standard-table-header", className), children: [
3892
- /* @__PURE__ */ jsx("h2", { className: "standard-table-header__title body-large", children: title }),
3893
- /* @__PURE__ */ jsx(
3894
- motion.div,
3895
- {
3896
- animate: { rotate: hasAnyExpanded ? 180 : 0 },
3897
- transition: { duration: 0.2 },
3898
- style: { willChange: "transform" },
3899
- children: /* @__PURE__ */ jsx(Button, { size: "icon", onClick: handleToggleAll, children: /* @__PURE__ */ jsx(UtilityChevronDown, {}) })
3900
- }
3901
- )
3902
- ] });
3903
- });
3904
- StandardTableHeaderRow.displayName = "StandardTableHeaderRow";
3905
- const StandardTableRow = React.forwardRef(({ value, children, className, ...props }, ref) => {
3906
- const { isExpanded: isExpandedFn } = useStandardTable();
3907
- const isExpanded = isExpandedFn(value);
3908
- const rowContextValue = React.useMemo(
3909
- () => ({ value, isExpanded }),
3910
- [value, isExpanded]
3911
- );
3912
- return /* @__PURE__ */ jsx(StandardTableRowContext.Provider, { value: rowContextValue, children: /* @__PURE__ */ jsx("div", { ref, className: cn("standard-table-row", className), ...props, children }) });
3913
- });
3914
- StandardTableRow.displayName = "StandardTableRow";
3915
- const StandardTableRowHeader = React.forwardRef(({ children, className, onClick, ...props }, ref) => {
3916
- return /* @__PURE__ */ jsx(
3917
- "div",
3918
- {
3919
- ref,
3920
- onClick,
3921
- className: cn("standard-table-row-header", className),
3922
- ...props,
3923
- children
3924
- }
3925
- );
3926
- });
3927
- StandardTableRowHeader.displayName = "StandardTableRowHeader";
3928
- const StandardTableTrigger = React.forwardRef(({ className, onClick, ...props }, ref) => {
3929
- const { toggle } = useStandardTable();
3930
- const { value, isExpanded } = useStandardTableRow();
3931
- const handleClick = React.useCallback(
3932
- (e) => {
3933
- e.stopPropagation();
3934
- toggle(value);
3935
- onClick == null ? void 0 : onClick(e);
3936
- },
3937
- [toggle, value, onClick]
3938
- );
3939
- return /* @__PURE__ */ jsx(
3940
- motion.div,
3941
- {
3942
- animate: { rotate: isExpanded ? 180 : 0 },
3943
- transition: { duration: 0.2 },
3944
- style: { willChange: "transform" },
3945
- children: /* @__PURE__ */ jsx(
3946
- Button,
3947
- {
3948
- ref,
3949
- size: "icon",
3950
- variant: "clear",
3951
- onClick: handleClick,
3952
- className: cn("standard-table-trigger", className),
3953
- ...props,
3954
- children: /* @__PURE__ */ jsx(UtilityChevronDown, {})
3955
- }
3956
- )
3957
- }
3958
- );
3959
- });
3960
- StandardTableTrigger.displayName = "StandardTableTrigger";
3961
- const StandardTableContent = React.forwardRef(({ children, className, ...props }, ref) => {
3962
- const { isExpanded } = useStandardTableRow();
3963
- return /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: isExpanded && /* @__PURE__ */ jsx(
3964
- motion.div,
3965
- {
3966
- initial: { height: 0, opacity: 0 },
3967
- animate: { height: "auto", opacity: 1 },
3968
- exit: { height: 0, opacity: 0 },
3969
- transition: { duration: 0.3, ease: [0.25, 0.46, 0.45, 0.94] },
3970
- className: cn("standard-table-content", className),
3971
- style: { willChange: "opacity" },
3972
- children: /* @__PURE__ */ jsx(
3973
- "div",
3974
- {
3975
- ref,
3976
- className: "standard-table-content__inner",
3977
- ...props,
3978
- children
3979
- }
3980
- )
3981
- }
3982
- ) });
3983
- });
3984
- StandardTableContent.displayName = "StandardTableContent";
3985
- const StandardTableListRow = React.forwardRef(
3986
- ({
3987
- icon,
3988
- badge,
3989
- title,
3990
- titleClassName,
3991
- rightContent,
3992
- onClick,
3993
- className,
3994
- variant: variant2 = "default",
3995
- ...props
3996
- }, ref) => {
3997
- return /* @__PURE__ */ jsxs(
3998
- "div",
3999
- {
4000
- ref,
4001
- onClick,
4002
- className: cn(
4003
- "standard-table-list-row",
4004
- variant2 === "default" ? "standard-table-list-row--default" : "standard-table-list-row--nested",
4005
- className
4006
- ),
4007
- ...props,
4008
- children: [
4009
- icon,
4010
- badge,
4011
- /* @__PURE__ */ jsx(
4012
- "span",
4013
- {
4014
- className: cn(
4015
- "standard-table-list-row__title",
4016
- titleClassName || "body-large"
4017
- ),
4018
- children: title
4019
- }
4020
- ),
4021
- rightContent
4022
- ]
4023
- }
4024
- );
4025
- }
4026
- );
4027
- StandardTableListRow.displayName = "StandardTableListRow";
4028
- const StandardTableContainer = React.forwardRef(({ children, className, ...props }, ref) => {
4029
- return /* @__PURE__ */ jsx(
4030
- "section",
4031
- {
4032
- ref,
4033
- className: cn("standard-table-container", className),
4034
- ...props,
4035
- children
4036
- }
4037
- );
4038
- });
4039
- StandardTableContainer.displayName = "StandardTableContainer";
4040
3990
  const NavLogo = ({ dark = false }) => {
4041
3991
  return /* @__PURE__ */ jsxs(
4042
3992
  "svg",
@@ -9587,8 +9537,13 @@ function AlphaIcon({ dark = false }) {
9587
9537
  }
9588
9538
  export {
9589
9539
  Accordion,
9540
+ AccordionContainer,
9590
9541
  AccordionContent,
9542
+ AccordionHeader,
9543
+ AccordionHeaderRow,
9591
9544
  AccordionItem,
9545
+ AccordionListRow,
9546
+ AccordionSectionHeader,
9592
9547
  AccordionTrigger,
9593
9548
  Alert,
9594
9549
  AlertDescription,
@@ -9639,7 +9594,6 @@ export {
9639
9594
  ChartTooltip,
9640
9595
  ChartTooltipContent,
9641
9596
  Checkbox,
9642
- CodeBadge,
9643
9597
  Collapsible,
9644
9598
  CollapsibleContent,
9645
9599
  CollapsibleTrigger,
@@ -9834,15 +9788,6 @@ export {
9834
9788
  Toaster as Sonner,
9835
9789
  StandardLogo,
9836
9790
  StandardNavigation,
9837
- StandardTable,
9838
- StandardTableContainer,
9839
- StandardTableContent,
9840
- StandardTableHeader,
9841
- StandardTableHeaderRow,
9842
- StandardTableListRow,
9843
- StandardTableRow,
9844
- StandardTableRowHeader,
9845
- StandardTableTrigger,
9846
9791
  Switch,
9847
9792
  Table,
9848
9793
  TableBody,
@@ -9903,9 +9848,13 @@ export {
9903
9848
  X,
9904
9849
  badgeVariants,
9905
9850
  buttonVariants,
9851
+ capitalize,
9906
9852
  cn,
9907
9853
  conceptColors,
9908
9854
  navigationMenuTriggerStyle,
9855
+ useAccordion,
9856
+ useAccordionItem,
9857
+ useAccordionState,
9909
9858
  useIsMobile,
9910
9859
  useSegmentedControl,
9911
9860
  useTabs,