@umami/react-zen 0.219.0 → 0.221.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.mjs CHANGED
@@ -35,7 +35,7 @@ var require_use_sync_external_store_shim_production = __commonJS({
35
35
  }
36
36
  var objectIs = "function" === typeof Object.is ? Object.is : is2;
37
37
  var useState18 = React5.useState;
38
- var useEffect12 = React5.useEffect;
38
+ var useEffect13 = React5.useEffect;
39
39
  var useLayoutEffect3 = React5.useLayoutEffect;
40
40
  var useDebugValue = React5.useDebugValue;
41
41
  function useSyncExternalStore$2(subscribe, getSnapshot) {
@@ -48,7 +48,7 @@ var require_use_sync_external_store_shim_production = __commonJS({
48
48
  },
49
49
  [subscribe, value, getSnapshot]
50
50
  );
51
- useEffect12(
51
+ useEffect13(
52
52
  function() {
53
53
  checkIfSnapshotChanged(inst) && forceUpdate({ inst });
54
54
  return subscribe(function() {
@@ -109,7 +109,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
109
109
  },
110
110
  [subscribe, value, getSnapshot]
111
111
  );
112
- useEffect12(
112
+ useEffect13(
113
113
  function() {
114
114
  checkIfSnapshotChanged(inst) && forceUpdate({ inst });
115
115
  return subscribe(function() {
@@ -135,7 +135,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
135
135
  return getSnapshot();
136
136
  }
137
137
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
138
- var React5 = __import_react2, objectIs = "function" === typeof Object.is ? Object.is : is2, useState18 = React5.useState, useEffect12 = React5.useEffect, useLayoutEffect3 = React5.useLayoutEffect, useDebugValue = React5.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
138
+ var React5 = __import_react2, objectIs = "function" === typeof Object.is ? Object.is : is2, useState18 = React5.useState, useEffect13 = React5.useEffect, useLayoutEffect3 = React5.useLayoutEffect, useDebugValue = React5.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
139
139
  exports.useSyncExternalStore = void 0 !== React5.useSyncExternalStore ? React5.useSyncExternalStore : shim;
140
140
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
141
141
  })();
@@ -30978,6 +30978,38 @@ var gridAutoFlowMap = {
30978
30978
  "row-dense": "grid-flow-row-dense",
30979
30979
  "column-dense": "grid-flow-col-dense"
30980
30980
  };
30981
+ var gridColumnsMap = {
30982
+ "1": "grid-cols-1",
30983
+ "2": "grid-cols-2",
30984
+ "3": "grid-cols-3",
30985
+ "4": "grid-cols-4",
30986
+ "5": "grid-cols-5",
30987
+ "6": "grid-cols-6",
30988
+ "7": "grid-cols-7",
30989
+ "8": "grid-cols-8",
30990
+ "9": "grid-cols-9",
30991
+ "10": "grid-cols-10",
30992
+ "11": "grid-cols-11",
30993
+ "12": "grid-cols-12",
30994
+ none: "grid-cols-none",
30995
+ subgrid: "grid-cols-subgrid"
30996
+ };
30997
+ var gridRowsMap = {
30998
+ "1": "grid-rows-1",
30999
+ "2": "grid-rows-2",
31000
+ "3": "grid-rows-3",
31001
+ "4": "grid-rows-4",
31002
+ "5": "grid-rows-5",
31003
+ "6": "grid-rows-6",
31004
+ "7": "grid-rows-7",
31005
+ "8": "grid-rows-8",
31006
+ "9": "grid-rows-9",
31007
+ "10": "grid-rows-10",
31008
+ "11": "grid-rows-11",
31009
+ "12": "grid-rows-12",
31010
+ none: "grid-rows-none",
31011
+ subgrid: "grid-rows-subgrid"
31012
+ };
30981
31013
  var borderMap = {
30982
31014
  true: "border border-edge",
30983
31015
  none: "border-0",
@@ -31135,6 +31167,12 @@ function mapTextIndent(value) {
31135
31167
  function mapGridAutoFlow(value) {
31136
31168
  return mapResponsive(value, (v) => gridAutoFlowMap[v]);
31137
31169
  }
31170
+ function mapGridColumns(value) {
31171
+ return mapResponsive(value, (v) => gridColumnsMap[v]);
31172
+ }
31173
+ function mapGridRows(value) {
31174
+ return mapResponsive(value, (v) => gridRowsMap[v]);
31175
+ }
31138
31176
  function mapBorder(value) {
31139
31177
  return mapResponsive(value, (v) => borderMap[String(v)]);
31140
31178
  }
@@ -32483,10 +32521,55 @@ function Container({
32483
32521
  }
32484
32522
 
32485
32523
  // src/components/DataCard.tsx
32486
- import { Fragment as Fragment6 } from "react";
32524
+ import { Fragment as Fragment7 } from "react";
32487
32525
 
32488
32526
  // src/components/Grid.tsx
32489
- import { jsx as jsx26 } from "react/jsx-runtime";
32527
+ import { useId as useId2 } from "react";
32528
+ import { Fragment as Fragment6, jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
32529
+ var PRESET_VALUES = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "none", "subgrid"];
32530
+ var BREAKPOINT_QUERIES = {
32531
+ base: "",
32532
+ sm: "@media (min-width: 640px)",
32533
+ md: "@media (min-width: 768px)",
32534
+ lg: "@media (min-width: 1024px)",
32535
+ xl: "@media (min-width: 1280px)",
32536
+ "2xl": "@media (min-width: 1536px)"
32537
+ };
32538
+ function isPresetValue(value) {
32539
+ return PRESET_VALUES.includes(value);
32540
+ }
32541
+ function isResponsiveObject(value) {
32542
+ return value !== void 0 && typeof value !== "string" && typeof value === "object";
32543
+ }
32544
+ function hasCustomResponsiveValues(value) {
32545
+ if (!isResponsiveObject(value)) return false;
32546
+ return Object.values(value).some((v) => typeof v === "string" && !isPresetValue(v));
32547
+ }
32548
+ function generateResponsiveStyles(id, columns, rows) {
32549
+ const styles = [];
32550
+ const breakpoints2 = ["base", "sm", "md", "lg", "xl", "2xl"];
32551
+ for (const bp of breakpoints2) {
32552
+ const rules = [];
32553
+ if (isResponsiveObject(columns)) {
32554
+ const colValue = columns[bp];
32555
+ if (colValue && !isPresetValue(colValue)) {
32556
+ rules.push(`grid-template-columns: ${colValue}`);
32557
+ }
32558
+ }
32559
+ if (isResponsiveObject(rows)) {
32560
+ const rowValue = rows[bp];
32561
+ if (rowValue && !isPresetValue(rowValue)) {
32562
+ rules.push(`grid-template-rows: ${rowValue}`);
32563
+ }
32564
+ }
32565
+ if (rules.length > 0) {
32566
+ const query = BREAKPOINT_QUERIES[bp];
32567
+ const ruleBlock = `.${id} { ${rules.join("; ")}; }`;
32568
+ styles.push(query ? `${query} { ${ruleBlock} }` : ruleBlock);
32569
+ }
32570
+ }
32571
+ return styles.join(" ");
32572
+ }
32490
32573
  function Grid({
32491
32574
  display = "grid",
32492
32575
  justifyContent,
@@ -32505,6 +32588,13 @@ function Grid({
32505
32588
  children,
32506
32589
  ...props
32507
32590
  }) {
32591
+ const reactId = useId2();
32592
+ const id = `zen-grid-${reactId.replace(/:/g, "")}`;
32593
+ const isCustomColumns = typeof columns === "string" && !isPresetValue(columns);
32594
+ const isCustomRows = typeof rows === "string" && !isPresetValue(rows);
32595
+ const hasResponsiveCustomColumns = hasCustomResponsiveValues(columns);
32596
+ const hasResponsiveCustomRows = hasCustomResponsiveValues(rows);
32597
+ const needsStyleTag = hasResponsiveCustomColumns || hasResponsiveCustomRows;
32508
32598
  const classes = cn(
32509
32599
  mapDisplay(display),
32510
32600
  mapJustifyContent(justifyContent),
@@ -32515,16 +32605,22 @@ function Grid({
32515
32605
  mapGap(gapX, "x"),
32516
32606
  mapGap(gapY, "y"),
32517
32607
  mapGridAutoFlow(autoFlow),
32608
+ !isCustomColumns && !hasResponsiveCustomColumns && mapGridColumns(columns),
32609
+ !isCustomRows && !hasResponsiveCustomRows && mapGridRows(rows),
32610
+ needsStyleTag && id,
32518
32611
  className
32519
32612
  );
32520
32613
  const inlineStyles = {
32521
32614
  ...style,
32522
- ...rows && { gridTemplateRows: rows },
32523
- ...columns && { gridTemplateColumns: columns },
32615
+ ...isCustomColumns && { gridTemplateColumns: columns },
32616
+ ...isCustomRows && { gridTemplateRows: rows },
32524
32617
  ...areas && { gridTemplateAreas: areas }
32525
32618
  };
32526
- const hasInlineStyles = Object.keys(inlineStyles).length > (style ? Object.keys(style).length : 0);
32527
- return /* @__PURE__ */ jsx26(Box, { ...props, className: classes, style: hasInlineStyles || style ? inlineStyles : void 0, children });
32619
+ const hasInlineStyles = isCustomColumns || isCustomRows || areas || style && Object.keys(style).length > 0;
32620
+ return /* @__PURE__ */ jsxs12(Fragment6, { children: [
32621
+ needsStyleTag && /* @__PURE__ */ jsx26("style", { children: generateResponsiveStyles(id, columns, rows) }),
32622
+ /* @__PURE__ */ jsx26(Box, { ...props, className: classes, style: hasInlineStyles ? inlineStyles : void 0, children })
32623
+ ] });
32528
32624
  }
32529
32625
 
32530
32626
  // src/lib/utils.ts
@@ -32542,7 +32638,7 @@ function mapIdProperty(data) {
32542
32638
  }
32543
32639
 
32544
32640
  // src/components/DataCard.tsx
32545
- import { jsx as jsx27, jsxs as jsxs12 } from "react/jsx-runtime";
32641
+ import { jsx as jsx27, jsxs as jsxs13 } from "react/jsx-runtime";
32546
32642
  function DataCard({ data = [], labelWidth = "auto", ...props }) {
32547
32643
  const rows = mapIdProperty(data);
32548
32644
  return /* @__PURE__ */ jsx27(
@@ -32555,7 +32651,7 @@ function DataCard({ data = [], labelWidth = "auto", ...props }) {
32555
32651
  padding: "6",
32556
32652
  ...props,
32557
32653
  children: rows.map((row, index) => {
32558
- return /* @__PURE__ */ jsxs12(Fragment6, { children: [
32654
+ return /* @__PURE__ */ jsxs13(Fragment7, { children: [
32559
32655
  /* @__PURE__ */ jsx27(Row, { paddingY: "3", border: "bottom", borderColor: "muted", paddingRight: "6", children: /* @__PURE__ */ jsx27(Text, { weight: "bold", children: row?.label }) }),
32560
32656
  /* @__PURE__ */ jsx27(Row, { paddingY: "3", border: "bottom", children: /* @__PURE__ */ jsx27(Text, { children: row?.value }) })
32561
32657
  ] }, index);
@@ -32651,7 +32747,7 @@ function TableCell({ children, className, align, ...props }) {
32651
32747
  }
32652
32748
 
32653
32749
  // src/components/DataTable.tsx
32654
- import { jsx as jsx29, jsxs as jsxs13 } from "react/jsx-runtime";
32750
+ import { jsx as jsx29, jsxs as jsxs14 } from "react/jsx-runtime";
32655
32751
  import { createElement as createElement5 } from "react";
32656
32752
  function DataTable({
32657
32753
  data = [],
@@ -32679,7 +32775,7 @@ function DataTable({
32679
32775
  return /* @__PURE__ */ jsx29(DataCard, { data: items }, `${row.id}-${index}`);
32680
32776
  }) });
32681
32777
  }
32682
- return /* @__PURE__ */ jsxs13(Table2, { ...props, className: cn("relative text-base", className), children: [
32778
+ return /* @__PURE__ */ jsxs14(Table2, { ...props, className: cn("relative text-base", className), children: [
32683
32779
  /* @__PURE__ */ jsx29(TableHeader, { style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns?.map(({ id, label, as, hidden, width, ...columnProps }) => {
32684
32780
  if (hidden) {
32685
32781
  return null;
@@ -32710,7 +32806,7 @@ function DataColumn(props) {
32710
32806
  }
32711
32807
 
32712
32808
  // src/components/Dots.tsx
32713
- import { jsx as jsx30, jsxs as jsxs14 } from "react/jsx-runtime";
32809
+ import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
32714
32810
  var sizeMap2 = {
32715
32811
  sm: "w-1.5 h-1.5",
32716
32812
  md: "w-2 h-2",
@@ -32725,7 +32821,7 @@ var gapMap2 = {
32725
32821
  lg: "2"
32726
32822
  };
32727
32823
  function Dots({ size = "md", className, color: _color, ...props }) {
32728
- return /* @__PURE__ */ jsxs14(Row, { ...props, alignItems: "center", gap: gapMap2[size], className, children: [
32824
+ return /* @__PURE__ */ jsxs15(Row, { ...props, alignItems: "center", gap: gapMap2[size], className, children: [
32729
32825
  /* @__PURE__ */ jsx30(Dot, { size }),
32730
32826
  /* @__PURE__ */ jsx30(Dot, { size }),
32731
32827
  /* @__PURE__ */ jsx30(Dot, { size })
@@ -32736,16 +32832,29 @@ function Dots({ size = "md", className, color: _color, ...props }) {
32736
32832
  import { useEffect as useEffect2, useState as useState5 } from "react";
32737
32833
 
32738
32834
  // src/components/Tooltip.tsx
32739
- import { jsx as jsx31, jsxs as jsxs15 } from "react/jsx-runtime";
32835
+ import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
32740
32836
  function Tooltip2({ children, className, showArrow, ...props }) {
32741
- return /* @__PURE__ */ jsx31($4e3b923658d69c60$export$28c660c63b792dea, { ...props, className: cn(tooltip(), className), children: /* @__PURE__ */ jsx31(TooltipBubble, { showArrow, children }) });
32742
- }
32743
- function TooltipBubble({ showArrow, children, className, color: _color, ...props }) {
32744
- return /* @__PURE__ */ jsxs15(Box, { ...props, className, children: [
32745
- showArrow && /* @__PURE__ */ jsx31($44f671af83e7d9e0$export$746d02f47f4d381, { className: "fill-surface-inverted", children: /* @__PURE__ */ jsx31("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx31("path", { d: "M0 0 L4 4 L8 0" }) }) }),
32746
- /* @__PURE__ */ jsx31(Box, { children })
32837
+ return /* @__PURE__ */ jsxs16($4e3b923658d69c60$export$28c660c63b792dea, { ...props, className: cn("group", tooltip(), className), children: [
32838
+ showArrow && /* @__PURE__ */ jsx31($44f671af83e7d9e0$export$746d02f47f4d381, { className: "w-2 h-2", children: /* @__PURE__ */ jsx31(
32839
+ "svg",
32840
+ {
32841
+ viewBox: "0 0 8 8",
32842
+ className: cn(
32843
+ "block fill-surface-inverted",
32844
+ "group-data-[placement=bottom]:rotate-180",
32845
+ "group-data-[placement=left]:-rotate-90",
32846
+ "group-data-[placement=right]:rotate-90"
32847
+ ),
32848
+ children: /* @__PURE__ */ jsx31("path", { d: "M0 0 L4 4 L8 0" })
32849
+ }
32850
+ ) }),
32851
+ children,
32852
+ "for"
32747
32853
  ] });
32748
32854
  }
32855
+ function TooltipBubble({ children, className, color: _color, ...props }) {
32856
+ return /* @__PURE__ */ jsx31(Box, { ...props, className, children });
32857
+ }
32749
32858
 
32750
32859
  // src/components/FloatingTooltip.tsx
32751
32860
  import { jsx as jsx32 } from "react/jsx-runtime";
@@ -34807,7 +34916,7 @@ function useForm(props = {}) {
34807
34916
  }
34808
34917
 
34809
34918
  // src/components/forms/Form.tsx
34810
- import { jsx as jsx33, jsxs as jsxs16 } from "react/jsx-runtime";
34919
+ import { jsx as jsx33, jsxs as jsxs17 } from "react/jsx-runtime";
34811
34920
  function Form({
34812
34921
  autoComplete,
34813
34922
  onSubmit,
@@ -34861,7 +34970,7 @@ function Form({
34861
34970
  formValues.reset(void 0, { keepDirty: true, keepValues: true });
34862
34971
  }
34863
34972
  }, [error, formValues]);
34864
- return /* @__PURE__ */ jsxs16(FormProvider, { ...formValues, children: [
34973
+ return /* @__PURE__ */ jsxs17(FormProvider, { ...formValues, children: [
34865
34974
  error && /* @__PURE__ */ jsx33(
34866
34975
  AlertBanner,
34867
34976
  {
@@ -34898,7 +35007,7 @@ function FormController({ children, ...props }) {
34898
35007
 
34899
35008
  // src/components/forms/FormField.tsx
34900
35009
  import { Children as Children2, cloneElement as cloneElement2 } from "react";
34901
- import { jsx as jsx36, jsxs as jsxs17 } from "react/jsx-runtime";
35010
+ import { jsx as jsx36, jsxs as jsxs18 } from "react/jsx-runtime";
34902
35011
  function FormField({
34903
35012
  id,
34904
35013
  name,
@@ -34914,7 +35023,7 @@ function FormField({
34914
35023
  const context = useFormContext();
34915
35024
  const { control } = context;
34916
35025
  const { invalid, error } = context.getFieldState(name);
34917
- return /* @__PURE__ */ jsxs17(Column, { ...props, gap: "1", className, children: [
35026
+ return /* @__PURE__ */ jsxs18(Column, { ...props, gap: "1", className, children: [
34918
35027
  label && /* @__PURE__ */ jsx36(Label2, { htmlFor: fieldId, children: label }),
34919
35028
  /* @__PURE__ */ jsx36(FormController, { name, control, rules, children: ({ field }) => {
34920
35029
  return Children2.map(
@@ -34933,7 +35042,7 @@ function FormField({
34933
35042
  }
34934
35043
 
34935
35044
  // src/components/forms/FormFieldArray.tsx
34936
- import { jsx as jsx37, jsxs as jsxs18 } from "react/jsx-runtime";
35045
+ import { jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
34937
35046
  function FormFieldArray({
34938
35047
  id,
34939
35048
  name,
@@ -34955,7 +35064,7 @@ function FormFieldArray({
34955
35064
  register(name, rules);
34956
35065
  const errors = formState?.errors || {};
34957
35066
  const errorMessage = errors[name]?.message;
34958
- return /* @__PURE__ */ jsxs18(Column, { ...props, gap: "1", className, children: [
35067
+ return /* @__PURE__ */ jsxs19(Column, { ...props, gap: "1", className, children: [
34959
35068
  label && /* @__PURE__ */ jsx37(Label2, { htmlFor: fieldId, children: label }),
34960
35069
  description && /* @__PURE__ */ jsx37(Text, { color: "muted", children: description }),
34961
35070
  errorMessage && /* @__PURE__ */ jsx37(Text, { className: "text-red-500", children: errorMessage }),
@@ -34975,7 +35084,7 @@ function FormResetButton({ values = {}, children, onPress, ...props }) {
34975
35084
  }
34976
35085
 
34977
35086
  // src/components/Spinner.tsx
34978
- import { jsx as jsx39, jsxs as jsxs19 } from "react/jsx-runtime";
35087
+ import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
34979
35088
  var sizeMap3 = {
34980
35089
  sm: "w-4 h-4",
34981
35090
  md: "w-7 h-7",
@@ -34988,7 +35097,7 @@ function Spinner(props) {
34988
35097
  {
34989
35098
  ...domProps,
34990
35099
  className: cn("relative inline-flex justify-center items-center", sizeMap3[size], className),
34991
- children: /* @__PURE__ */ jsxs19("svg", { viewBox: "25 25 50 50", className: "zen-spinner-svg w-full h-full", children: [
35100
+ children: /* @__PURE__ */ jsxs20("svg", { viewBox: "25 25 50 50", className: "zen-spinner-svg w-full h-full", children: [
34992
35101
  !quiet && /* @__PURE__ */ jsx39("circle", { className: "zen-spinner-track stroke-track", cx: "50", cy: "50", r: "20" }),
34993
35102
  /* @__PURE__ */ jsx39(
34994
35103
  "circle",
@@ -35008,7 +35117,7 @@ function Spinner(props) {
35008
35117
  }
35009
35118
 
35010
35119
  // src/components/LoadingButton.tsx
35011
- import { jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
35120
+ import { jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
35012
35121
  function LoadingButton({
35013
35122
  isLoading,
35014
35123
  isDisabled,
@@ -35016,7 +35125,7 @@ function LoadingButton({
35016
35125
  children,
35017
35126
  ...props
35018
35127
  }) {
35019
- return /* @__PURE__ */ jsxs20(Button2, { ...props, isDisabled, children: [
35128
+ return /* @__PURE__ */ jsxs21(Button2, { ...props, isDisabled, children: [
35020
35129
  isLoading && /* @__PURE__ */ jsx40(Icon2, { size: "sm", children: /* @__PURE__ */ jsx40(Spinner, { isDisabled }) }),
35021
35130
  showText && children
35022
35131
  ] });
@@ -35049,7 +35158,7 @@ function FormSubmitButton({
35049
35158
 
35050
35159
  // src/components/HoverTrigger.tsx
35051
35160
  import { useEffect as useEffect4, useRef as useRef2, useState as useState6 } from "react";
35052
- import { Fragment as Fragment7, jsx as jsx42, jsxs as jsxs21 } from "react/jsx-runtime";
35161
+ import { Fragment as Fragment8, jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
35053
35162
  var CLOSE_DELAY = 500;
35054
35163
  function HoverTrigger({
35055
35164
  isOpen,
@@ -35100,7 +35209,7 @@ function HoverTrigger({
35100
35209
  }
35101
35210
  }, closeDelay);
35102
35211
  };
35103
- return /* @__PURE__ */ jsxs21(Fragment7, { children: [
35212
+ return /* @__PURE__ */ jsxs22(Fragment8, { children: [
35104
35213
  /* @__PURE__ */ jsx42("span", { ref: triggerRef, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: triggerElement }),
35105
35214
  /* @__PURE__ */ jsx42(Popover2, { isOpen: open, isNonModal: true, triggerRef, children: /* @__PURE__ */ jsx42("div", { onMouseEnter: handleMenuEnter, onMouseLeave: handleMenuLeave, children: popupElement }) })
35106
35215
  ] });
@@ -38858,7 +38967,7 @@ var animated = host.animated;
38858
38967
  import { useEffect as useEffect10, useState as useState11 } from "react";
38859
38968
 
38860
38969
  // src/components/toast/Toast.tsx
38861
- import { jsx as jsx43, jsxs as jsxs22 } from "react/jsx-runtime";
38970
+ import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
38862
38971
  var TOAST_CLOSE_ACTION = "close";
38863
38972
  function Toast({
38864
38973
  id,
@@ -38874,8 +38983,8 @@ function Toast({
38874
38983
  ...props
38875
38984
  }) {
38876
38985
  const hasActions = actions?.length > 0;
38877
- return /* @__PURE__ */ jsxs22(Row, { ...props, className: cn(toast({ variant }), className), children: [
38878
- /* @__PURE__ */ jsxs22(Column, { flexGrow: 1, gap: "1", children: [
38986
+ return /* @__PURE__ */ jsxs23(Row, { ...props, className: cn(toast({ variant }), className), children: [
38987
+ /* @__PURE__ */ jsxs23(Column, { flexGrow: 1, gap: "1", children: [
38879
38988
  title && /* @__PURE__ */ jsx43(Text, { weight: "semibold", children: title }),
38880
38989
  message && /* @__PURE__ */ jsx43(Text, { color: "muted", children: message })
38881
38990
  ] }),
@@ -38956,10 +39065,10 @@ function Toaster({ duration = 0, position = "bottom-right" }) {
38956
39065
  }
38957
39066
 
38958
39067
  // src/components/toast/ToastProvider.tsx
38959
- import { jsx as jsx45, jsxs as jsxs23 } from "react/jsx-runtime";
39068
+ import { jsx as jsx45, jsxs as jsxs24 } from "react/jsx-runtime";
38960
39069
  var ToastContext = createContext2({});
38961
39070
  function ToastProvider({ children, ...props }) {
38962
- return /* @__PURE__ */ jsxs23(ToastContext.Provider, { value: props, children: [
39071
+ return /* @__PURE__ */ jsxs24(ToastContext.Provider, { value: props, children: [
38963
39072
  children,
38964
39073
  /* @__PURE__ */ jsx45(Toaster, { ...props })
38965
39074
  ] });
@@ -38996,7 +39105,7 @@ function useToast() {
38996
39105
  }
38997
39106
 
38998
39107
  // src/components/IconLabel.tsx
38999
- import { jsx as jsx46, jsxs as jsxs24 } from "react/jsx-runtime";
39108
+ import { jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
39000
39109
  function IconLabel({
39001
39110
  icon,
39002
39111
  label,
@@ -39006,7 +39115,7 @@ function IconLabel({
39006
39115
  children,
39007
39116
  ...props
39008
39117
  }) {
39009
- return /* @__PURE__ */ jsxs24(Row, { alignItems: "center", gap: true, ...props, children: [
39118
+ return /* @__PURE__ */ jsxs25(Row, { alignItems: "center", gap: true, ...props, children: [
39010
39119
  icon && /* @__PURE__ */ jsx46(Icon2, { ...iconProps, children: icon }),
39011
39120
  showLabel && label && /* @__PURE__ */ jsx46(Text, { ...labelProps, children: label }),
39012
39121
  showLabel && children
@@ -39045,7 +39154,7 @@ function Image({
39045
39154
  }
39046
39155
 
39047
39156
  // src/components/Loading.tsx
39048
- import { jsx as jsx48, jsxs as jsxs25 } from "react/jsx-runtime";
39157
+ import { jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
39049
39158
  var placementClasses = {
39050
39159
  absolute: "absolute inset-0 m-auto",
39051
39160
  center: "m-auto",
@@ -39058,7 +39167,7 @@ function Loading({
39058
39167
  className,
39059
39168
  ...props
39060
39169
  }) {
39061
- return /* @__PURE__ */ jsxs25(
39170
+ return /* @__PURE__ */ jsxs26(
39062
39171
  Box,
39063
39172
  {
39064
39173
  ...props,
@@ -39076,7 +39185,7 @@ function Loading({
39076
39185
  }
39077
39186
 
39078
39187
  // src/components/Menu.tsx
39079
- import { Fragment as Fragment9, jsx as jsx49, jsxs as jsxs26 } from "react/jsx-runtime";
39188
+ import { Fragment as Fragment10, jsx as jsx49, jsxs as jsxs27 } from "react/jsx-runtime";
39080
39189
  function Menu2({ className, children, ...props }) {
39081
39190
  return /* @__PURE__ */ jsx49(
39082
39191
  $3674c52c6b3c5bce$export$d9b273488cd8ce6f,
@@ -39111,7 +39220,7 @@ function MenuItem2({
39111
39220
  "data-[selected]:font-semibold",
39112
39221
  className
39113
39222
  ),
39114
- children: ({ isSelected }) => /* @__PURE__ */ jsxs26(Fragment9, { children: [
39223
+ children: ({ isSelected }) => /* @__PURE__ */ jsxs27(Fragment10, { children: [
39115
39224
  /* @__PURE__ */ jsx49(IconLabel, { icon, label, children }),
39116
39225
  showChecked && isSelected && /* @__PURE__ */ jsx49(Icon2, { "aria-hidden": "true", children: /* @__PURE__ */ jsx49(Check, {}) }),
39117
39226
  showSubMenuIcon && /* @__PURE__ */ jsx49(Icon2, { "aria-hidden": "true", children: /* @__PURE__ */ jsx49(ChevronRight, {}) })
@@ -39134,7 +39243,7 @@ function MenuSection({
39134
39243
  maxHeight,
39135
39244
  overflow: maxHeight ? "auto" : void 0
39136
39245
  };
39137
- return /* @__PURE__ */ jsxs26(Fragment9, { children: [
39246
+ return /* @__PURE__ */ jsxs27(Fragment10, { children: [
39138
39247
  title && /* @__PURE__ */ jsx49($72a5793c14baf454$export$8b251419efc915eb, { className: "text-base font-bold px-2 py-1.5", children: title }),
39139
39248
  /* @__PURE__ */ jsx49(
39140
39249
  $3674c52c6b3c5bce$export$4b1545b4f2016d26,
@@ -39190,7 +39299,7 @@ import {
39190
39299
  useContext as useContext5,
39191
39300
  useState as useState12
39192
39301
  } from "react";
39193
- import { jsx as jsx51, jsxs as jsxs27 } from "react/jsx-runtime";
39302
+ import { jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
39194
39303
  var NavbarContext = createContext3(void 0);
39195
39304
  var useNavigationContext = () => {
39196
39305
  const context = useContext5(NavbarContext);
@@ -39218,8 +39327,8 @@ function NavbarItem({
39218
39327
  }) {
39219
39328
  const { activeMenu, setActiveMenu } = useNavigationContext();
39220
39329
  if (label) {
39221
- return /* @__PURE__ */ jsxs27(HoverTrigger, { isOpen: activeMenu === label, onHoverStart: () => setActiveMenu(label), children: [
39222
- /* @__PURE__ */ jsxs27(
39330
+ return /* @__PURE__ */ jsxs28(HoverTrigger, { isOpen: activeMenu === label, onHoverStart: () => setActiveMenu(label), children: [
39331
+ /* @__PURE__ */ jsxs28(
39223
39332
  Row,
39224
39333
  {
39225
39334
  ...props,
@@ -39255,7 +39364,7 @@ function NavbarItem({
39255
39364
 
39256
39365
  // src/components/NavMenu.tsx
39257
39366
  import { createContext as createContext4, useContext as useContext6, useState as useState13 } from "react";
39258
- import { jsx as jsx52, jsxs as jsxs28 } from "react/jsx-runtime";
39367
+ import { jsx as jsx52, jsxs as jsxs29 } from "react/jsx-runtime";
39259
39368
  var NavMenuContext = createContext4(null);
39260
39369
  function NavMenu({ muteItems, onItemClick, className, children, ...props }) {
39261
39370
  return /* @__PURE__ */ jsx52(NavMenuContext.Provider, { value: { onItemClick }, children: /* @__PURE__ */ jsx52(Column, { ...props, color: muteItems ? "muted" : void 0, className, children }) });
@@ -39274,7 +39383,7 @@ function NavMenuGroup({
39274
39383
  setMinimized((state2) => !state2);
39275
39384
  }
39276
39385
  };
39277
- return /* @__PURE__ */ jsxs28(
39386
+ return /* @__PURE__ */ jsxs29(
39278
39387
  Column,
39279
39388
  {
39280
39389
  ...props,
@@ -39284,7 +39393,7 @@ function NavMenuGroup({
39284
39393
  allowMinimize && minimized && "[&_.navmenu-children]:hidden"
39285
39394
  ),
39286
39395
  children: [
39287
- /* @__PURE__ */ jsxs28(
39396
+ /* @__PURE__ */ jsxs29(
39288
39397
  Row,
39289
39398
  {
39290
39399
  paddingY: "2",
@@ -39328,8 +39437,8 @@ function NavMenuItem({ isSelected, className, children, ...props }) {
39328
39437
  import { useState as useState14 } from "react";
39329
39438
 
39330
39439
  // src/components/svg/EyeSlash.tsx
39331
- import { jsx as jsx53, jsxs as jsxs29 } from "react/jsx-runtime";
39332
- var SvgEyeSlash = (props) => /* @__PURE__ */ jsxs29("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 256 256", ...props, children: [
39440
+ import { jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
39441
+ var SvgEyeSlash = (props) => /* @__PURE__ */ jsxs30("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 256 256", ...props, children: [
39333
39442
  /* @__PURE__ */ jsx53("path", { fill: "none", d: "M0 0h256v256H0z" }),
39334
39443
  /* @__PURE__ */ jsx53(
39335
39444
  "path",
@@ -39357,8 +39466,8 @@ var SvgEyeSlash = (props) => /* @__PURE__ */ jsxs29("svg", { xmlns: "http://www.
39357
39466
  var EyeSlash_default = SvgEyeSlash;
39358
39467
 
39359
39468
  // src/components/svg/Eye.tsx
39360
- import { jsx as jsx54, jsxs as jsxs30 } from "react/jsx-runtime";
39361
- var SvgEye = (props) => /* @__PURE__ */ jsxs30("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 256 256", ...props, children: [
39469
+ import { jsx as jsx54, jsxs as jsxs31 } from "react/jsx-runtime";
39470
+ var SvgEye = (props) => /* @__PURE__ */ jsxs31("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 256 256", ...props, children: [
39362
39471
  /* @__PURE__ */ jsx54("path", { fill: "none", d: "M0 0h256v256H0z" }),
39363
39472
  /* @__PURE__ */ jsx54(
39364
39473
  "path",
@@ -39391,17 +39500,17 @@ var Eye_default = SvgEye;
39391
39500
  import { jsx as jsx55 } from "react/jsx-runtime";
39392
39501
 
39393
39502
  // src/components/svg/Logo.tsx
39394
- import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
39503
+ import { jsx as jsx56, jsxs as jsxs32 } from "react/jsx-runtime";
39395
39504
 
39396
39505
  // src/components/PasswordField.tsx
39397
- import { Fragment as Fragment10, jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
39506
+ import { Fragment as Fragment11, jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
39398
39507
  function PasswordField({ label, className, ...props }) {
39399
39508
  const [show, setShow] = useState14(false);
39400
39509
  const type = show ? "text" : "password";
39401
39510
  const handleShowPassword = () => setShow((state2) => !state2);
39402
- return /* @__PURE__ */ jsxs32(Fragment10, { children: [
39511
+ return /* @__PURE__ */ jsxs33(Fragment11, { children: [
39403
39512
  label && /* @__PURE__ */ jsx57(Label2, { children: label }),
39404
- /* @__PURE__ */ jsxs32(
39513
+ /* @__PURE__ */ jsxs33(
39405
39514
  $bcdf0525bf22703d$export$2c73285ae9390cec,
39406
39515
  {
39407
39516
  "aria-label": "Password",
@@ -39423,7 +39532,7 @@ function PasswordField({ label, className, ...props }) {
39423
39532
  }
39424
39533
 
39425
39534
  // src/components/ProgressBar.tsx
39426
- import { Fragment as Fragment11, jsx as jsx58, jsxs as jsxs33 } from "react/jsx-runtime";
39535
+ import { Fragment as Fragment12, jsx as jsx58, jsxs as jsxs34 } from "react/jsx-runtime";
39427
39536
  function Track({ children }) {
39428
39537
  return /* @__PURE__ */ jsx58(Box, { position: "relative", borderRadius: "full", overflow: "hidden", className: "w-full h-2 bg-track", children });
39429
39538
  }
@@ -39443,7 +39552,7 @@ function Fill({ percentage }) {
39443
39552
  }
39444
39553
  function ProgressBar2({ className, showPercentage, ...props }) {
39445
39554
  return /* @__PURE__ */ jsx58($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: cn("flex items-center gap-3 w-full", className), children: ({ percentage = 0, valueText }) => {
39446
- return /* @__PURE__ */ jsxs33(Fragment11, { children: [
39555
+ return /* @__PURE__ */ jsxs34(Fragment12, { children: [
39447
39556
  /* @__PURE__ */ jsx58(Track, { children: /* @__PURE__ */ jsx58(Fill, { percentage }) }),
39448
39557
  showPercentage && /* @__PURE__ */ jsx58(Text, { className: "tabular-nums", children: valueText })
39449
39558
  ] });
@@ -39451,14 +39560,14 @@ function ProgressBar2({ className, showPercentage, ...props }) {
39451
39560
  }
39452
39561
 
39453
39562
  // src/components/ProgressCircle.tsx
39454
- import { Fragment as Fragment12, jsx as jsx59, jsxs as jsxs34 } from "react/jsx-runtime";
39563
+ import { Fragment as Fragment13, jsx as jsx59, jsxs as jsxs35 } from "react/jsx-runtime";
39455
39564
  function ProgressCircle({ className, showPercentage, ...props }) {
39456
39565
  return /* @__PURE__ */ jsx59($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: cn("relative flex justify-center items-center", className), children: ({ percentage = 0, valueText }) => {
39457
39566
  const radius = 45;
39458
39567
  const circumference = radius * 2 * Math.PI;
39459
39568
  const offset = circumference - percentage / 100 * circumference;
39460
- return /* @__PURE__ */ jsxs34(Fragment12, { children: [
39461
- /* @__PURE__ */ jsxs34(
39569
+ return /* @__PURE__ */ jsxs35(Fragment13, { children: [
39570
+ /* @__PURE__ */ jsxs35(
39462
39571
  "svg",
39463
39572
  {
39464
39573
  viewBox: "0 0 100 100",
@@ -39486,9 +39595,9 @@ function ProgressCircle({ className, showPercentage, ...props }) {
39486
39595
  }
39487
39596
 
39488
39597
  // src/components/RadioGroup.tsx
39489
- import { jsx as jsx60, jsxs as jsxs35 } from "react/jsx-runtime";
39598
+ import { jsx as jsx60, jsxs as jsxs36 } from "react/jsx-runtime";
39490
39599
  function RadioGroup2({ label, children, className, ...props }) {
39491
- return /* @__PURE__ */ jsxs35(
39600
+ return /* @__PURE__ */ jsxs36(
39492
39601
  $b6c3ddc6086f204d$export$a98f0dcb43a68a25,
39493
39602
  {
39494
39603
  "aria-label": "RadioGroup",
@@ -39522,7 +39631,7 @@ function Radio2({ children, className, ...props }) {
39522
39631
 
39523
39632
  // src/components/SearchField.tsx
39524
39633
  import { useEffect as useEffect11, useState as useState15 } from "react";
39525
- import { Fragment as Fragment13, jsx as jsx61, jsxs as jsxs36 } from "react/jsx-runtime";
39634
+ import { Fragment as Fragment14, jsx as jsx61, jsxs as jsxs37 } from "react/jsx-runtime";
39526
39635
  function SearchField2({
39527
39636
  label,
39528
39637
  placeholder,
@@ -39553,7 +39662,7 @@ function SearchField2({
39553
39662
  onSearch?.(searchValue);
39554
39663
  }
39555
39664
  }, [searchValue, delay]);
39556
- return /* @__PURE__ */ jsxs36(Fragment13, { children: [
39665
+ return /* @__PURE__ */ jsxs37(Fragment14, { children: [
39557
39666
  label && /* @__PURE__ */ jsx61(Label2, { children: label }),
39558
39667
  /* @__PURE__ */ jsx61(
39559
39668
  $440f4836bcb56932$export$b94867ecbd698f21,
@@ -39562,7 +39671,7 @@ function SearchField2({
39562
39671
  ...props,
39563
39672
  className: cn("relative", className),
39564
39673
  onChange: handleChange,
39565
- children: /* @__PURE__ */ jsxs36(
39674
+ children: /* @__PURE__ */ jsxs37(
39566
39675
  $a049562f99e7db0e$export$eb2fcfdbd7ba97d4,
39567
39676
  {
39568
39677
  className: cn(
@@ -39590,7 +39699,7 @@ function SearchField2({
39590
39699
 
39591
39700
  // src/components/Select.tsx
39592
39701
  import { useState as useState16 } from "react";
39593
- import { jsx as jsx62, jsxs as jsxs37 } from "react/jsx-runtime";
39702
+ import { jsx as jsx62, jsxs as jsxs38 } from "react/jsx-runtime";
39594
39703
  function Select2({
39595
39704
  items = [],
39596
39705
  value,
@@ -39623,7 +39732,7 @@ function Select2({
39623
39732
  setSearch("");
39624
39733
  onSearch?.("");
39625
39734
  };
39626
- return /* @__PURE__ */ jsxs37(
39735
+ return /* @__PURE__ */ jsxs38(
39627
39736
  $82d7e5349645de74$export$ef9b1a59e592288f,
39628
39737
  {
39629
39738
  "aria-label": "Select",
@@ -39634,11 +39743,11 @@ function Select2({
39634
39743
  onChange: handleChange,
39635
39744
  children: [
39636
39745
  label && /* @__PURE__ */ jsx62(Label2, { children: label }),
39637
- /* @__PURE__ */ jsx62(Button2, { variant: "outline", ...buttonProps, className: cn("w-full", buttonProps?.className), children: /* @__PURE__ */ jsxs37(Row, { flexGrow: 1, alignItems: "center", justifyContent: "space-between", children: [
39746
+ /* @__PURE__ */ jsx62(Button2, { variant: "outline", ...buttonProps, className: cn("w-full", buttonProps?.className), children: /* @__PURE__ */ jsxs38(Row, { flexGrow: 1, alignItems: "center", justifyContent: "space-between", children: [
39638
39747
  /* @__PURE__ */ jsx62($82d7e5349645de74$export$e288731fd71264f0, { children: renderValue }),
39639
39748
  /* @__PURE__ */ jsx62(Icon2, { rotate: 90, "aria-hidden": "true", size: "sm", children: /* @__PURE__ */ jsx62(ChevronRight, {}) })
39640
39749
  ] }) }),
39641
- /* @__PURE__ */ jsx62(Popover2, { ...popoverProps, onOpenChange: handleOpenChange, isFullscreen, children: /* @__PURE__ */ jsxs37(
39750
+ /* @__PURE__ */ jsx62(Popover2, { ...popoverProps, onOpenChange: handleOpenChange, isFullscreen, children: /* @__PURE__ */ jsxs38(
39642
39751
  Column,
39643
39752
  {
39644
39753
  gap: "2",
@@ -39685,7 +39794,7 @@ function Select2({
39685
39794
 
39686
39795
  // src/components/Sidebar.tsx
39687
39796
  import { createContext as createContext5, useContext as useContext7 } from "react";
39688
- import { jsx as jsx63, jsxs as jsxs38 } from "react/jsx-runtime";
39797
+ import { jsx as jsx63, jsxs as jsxs39 } from "react/jsx-runtime";
39689
39798
  var SidebarContext = createContext5(null);
39690
39799
  function Sidebar({ isCollapsed, muteItems, className, children, ...props }) {
39691
39800
  return /* @__PURE__ */ jsx63(SidebarContext.Provider, { value: { isCollapsed }, children: /* @__PURE__ */ jsx63(
@@ -39709,7 +39818,7 @@ function SidebarSection({
39709
39818
  children,
39710
39819
  ...props
39711
39820
  }) {
39712
- return /* @__PURE__ */ jsxs38(Column, { ...props, paddingY: "2", className, children: [
39821
+ return /* @__PURE__ */ jsxs39(Column, { ...props, paddingY: "2", className, children: [
39713
39822
  title && /* @__PURE__ */ jsx63(Box, { paddingX: "4", paddingY: "2", children: /* @__PURE__ */ jsx63(Text, { size: "xs", weight: "semibold", transform: "uppercase", color: "muted", children: title }) }),
39714
39823
  /* @__PURE__ */ jsx63(Column, { children })
39715
39824
  ] });
@@ -39721,7 +39830,7 @@ function SidebarHeader({
39721
39830
  children,
39722
39831
  ...props
39723
39832
  }) {
39724
- return /* @__PURE__ */ jsxs38(Row, { ...props, paddingX: "4", paddingY: "3", gap: "3", alignItems: "center", className, children: [
39833
+ return /* @__PURE__ */ jsxs39(Row, { ...props, paddingX: "4", paddingY: "3", gap: "3", alignItems: "center", className, children: [
39725
39834
  icon && /* @__PURE__ */ jsx63(Icon2, { size: "sm", children: icon }),
39726
39835
  label && /* @__PURE__ */ jsx63(Text, { weight: "semibold", children: label }),
39727
39836
  children
@@ -39736,8 +39845,8 @@ function SidebarItem({
39736
39845
  ...props
39737
39846
  }) {
39738
39847
  const { isCollapsed } = useContext7(SidebarContext);
39739
- return /* @__PURE__ */ jsxs38($4e3b923658d69c60$export$8c610744efcf8a1d, { delay: 0, closeDelay: 0, isDisabled: !isCollapsed, children: [
39740
- /* @__PURE__ */ jsx63($f645667febf57a63$export$35a3bebf7ef2d934, { children: /* @__PURE__ */ jsxs38(
39848
+ return /* @__PURE__ */ jsxs39($4e3b923658d69c60$export$8c610744efcf8a1d, { delay: 0, closeDelay: 0, isDisabled: !isCollapsed, children: [
39849
+ /* @__PURE__ */ jsx63($f645667febf57a63$export$35a3bebf7ef2d934, { children: /* @__PURE__ */ jsxs39(
39741
39850
  Row,
39742
39851
  {
39743
39852
  ...props,
@@ -39765,7 +39874,7 @@ function SidebarItem({
39765
39874
  }
39766
39875
 
39767
39876
  // src/components/Slider.tsx
39768
- import { Fragment as Fragment14, jsx as jsx64, jsxs as jsxs39 } from "react/jsx-runtime";
39877
+ import { Fragment as Fragment15, jsx as jsx64, jsxs as jsxs40 } from "react/jsx-runtime";
39769
39878
  function Fill2({ percentage }) {
39770
39879
  const width = `calc(10px + ${percentage}% - ${percentage * 0.2}px)`;
39771
39880
  return /* @__PURE__ */ jsx64("div", { className: "absolute inset-y-0 left-0 rounded-full bg-track-fill", style: { width } });
@@ -39784,14 +39893,14 @@ function Thumb({ percentage }) {
39784
39893
  );
39785
39894
  }
39786
39895
  function Slider2({ className, showValue = true, label, ...props }) {
39787
- return /* @__PURE__ */ jsxs39($6f909507e6374d18$export$472062a354075cee, { ...props, className: cn("flex flex-col gap-2 w-full", className), children: [
39788
- /* @__PURE__ */ jsxs39(Row, { justifyContent: "space-between", alignItems: "center", children: [
39896
+ return /* @__PURE__ */ jsxs40($6f909507e6374d18$export$472062a354075cee, { ...props, className: cn("flex flex-col gap-2 w-full", className), children: [
39897
+ /* @__PURE__ */ jsxs40(Row, { justifyContent: "space-between", alignItems: "center", children: [
39789
39898
  label && /* @__PURE__ */ jsx64(Label2, { children: label }),
39790
39899
  showValue && /* @__PURE__ */ jsx64($6f909507e6374d18$export$a590f758a961cb5b, { className: "text-base tabular-nums" })
39791
39900
  ] }),
39792
39901
  /* @__PURE__ */ jsx64($6f909507e6374d18$export$105594979f116971, { className: "relative h-5 w-full", children: ({ state: state2 }) => {
39793
39902
  const percentage = state2.getThumbPercent(0) * 100;
39794
- return /* @__PURE__ */ jsxs39(Fragment14, { children: [
39903
+ return /* @__PURE__ */ jsxs40(Fragment15, { children: [
39795
39904
  /* @__PURE__ */ jsx64("div", { className: "absolute inset-x-0 top-1/2 -translate-y-1/2 h-1 rounded-full bg-track overflow-hidden", children: /* @__PURE__ */ jsx64(Fill2, { percentage }) }),
39796
39905
  /* @__PURE__ */ jsx64(Thumb, { percentage })
39797
39906
  ] });
@@ -39800,7 +39909,7 @@ function Slider2({ className, showValue = true, label, ...props }) {
39800
39909
  }
39801
39910
 
39802
39911
  // src/components/StatusLight.tsx
39803
- import { jsx as jsx65, jsxs as jsxs40 } from "react/jsx-runtime";
39912
+ import { jsx as jsx65, jsxs as jsxs41 } from "react/jsx-runtime";
39804
39913
  var variantColors = {
39805
39914
  success: "bg-green-500",
39806
39915
  warning: "bg-yellow-500",
@@ -39821,19 +39930,19 @@ function StatusDot({ color, variant }) {
39821
39930
  }
39822
39931
  function StatusLight(props) {
39823
39932
  const { color, variant = "inactive", children, className, ...domProps } = props;
39824
- return /* @__PURE__ */ jsxs40(Row, { ...domProps, alignItems: "center", gap: "2", className, children: [
39933
+ return /* @__PURE__ */ jsxs41(Row, { ...domProps, alignItems: "center", gap: "2", className, children: [
39825
39934
  /* @__PURE__ */ jsx65(StatusDot, { color, variant }),
39826
39935
  children
39827
39936
  ] });
39828
39937
  }
39829
39938
 
39830
39939
  // src/components/Switch.tsx
39831
- import { jsx as jsx66, jsxs as jsxs41 } from "react/jsx-runtime";
39940
+ import { jsx as jsx66, jsxs as jsxs42 } from "react/jsx-runtime";
39832
39941
  function Switch2({ label, children, className, ...props }) {
39833
39942
  const styles = switchVariant();
39834
- return /* @__PURE__ */ jsxs41(Column, { children: [
39943
+ return /* @__PURE__ */ jsxs42(Column, { children: [
39835
39944
  label && /* @__PURE__ */ jsx66(Label2, { children: label }),
39836
- /* @__PURE__ */ jsxs41($8e59e948500a8fe1$export$b5d5cf8927ab7262, { ...props, className: cn(styles.root(), className), children: [
39945
+ /* @__PURE__ */ jsxs42($8e59e948500a8fe1$export$b5d5cf8927ab7262, { ...props, className: cn(styles.root(), className), children: [
39837
39946
  /* @__PURE__ */ jsx66(Box, { className: styles.track(), children: /* @__PURE__ */ jsx66(Box, { className: styles.thumb() }) }),
39838
39947
  children
39839
39948
  ] })
@@ -39880,8 +39989,11 @@ function TabPanel2({ children, className, ...props }) {
39880
39989
  }
39881
39990
 
39882
39991
  // src/components/ThemeButton.tsx
39883
- import { useState as useState17 } from "react";
39884
- import { jsx as jsx68, jsxs as jsxs42 } from "react/jsx-runtime";
39992
+ import { useEffect as useEffect12, useRef as useRef7, useState as useState17 } from "react";
39993
+ import { jsx as jsx68, jsxs as jsxs43 } from "react/jsx-runtime";
39994
+ function getElement(target) {
39995
+ return "current" in target ? target.current : target;
39996
+ }
39885
39997
  function applyTheme2(element, theme) {
39886
39998
  element.setAttribute("data-theme", theme);
39887
39999
  if (theme === "dark") {
@@ -39898,9 +40010,20 @@ function ThemeButton({
39898
40010
  ...props
39899
40011
  }) {
39900
40012
  const globalTheme = useTheme();
39901
- const [localTheme, setLocalTheme] = useState17("light");
40013
+ const [localTheme, setLocalTheme] = useState17(null);
40014
+ const initializedRef = useRef7(false);
39902
40015
  const isLocal = !!target;
39903
- const theme = isLocal ? localTheme : globalTheme.theme;
40016
+ useEffect12(() => {
40017
+ if (isLocal && target && !initializedRef.current) {
40018
+ const element = getElement(target);
40019
+ if (element) {
40020
+ initializedRef.current = true;
40021
+ setLocalTheme(globalTheme.theme);
40022
+ applyTheme2(element, globalTheme.theme);
40023
+ }
40024
+ }
40025
+ }, [isLocal, target, globalTheme.theme]);
40026
+ const theme = isLocal ? localTheme ?? globalTheme.theme : globalTheme.theme;
39904
40027
  const transitions = useTransition(theme, {
39905
40028
  initial: { opacity: 1 },
39906
40029
  from: {
@@ -39915,8 +40038,8 @@ function ThemeButton({
39915
40038
  });
39916
40039
  function handleClick(e) {
39917
40040
  const newTheme = theme === "light" ? "dark" : "light";
39918
- if (isLocal) {
39919
- const element = "current" in target ? target.current : target;
40041
+ if (isLocal && target) {
40042
+ const element = getElement(target);
39920
40043
  if (element) {
39921
40044
  applyTheme2(element, newTheme);
39922
40045
  setLocalTheme(newTheme);
@@ -39926,7 +40049,7 @@ function ThemeButton({
39926
40049
  }
39927
40050
  onPress?.(e);
39928
40051
  }
39929
- return /* @__PURE__ */ jsxs42(
40052
+ return /* @__PURE__ */ jsxs43(
39930
40053
  Button2,
39931
40054
  {
39932
40055
  ...props,
@@ -39948,10 +40071,10 @@ function ThemeButton({
39948
40071
  }
39949
40072
 
39950
40073
  // src/components/Toggle.tsx
39951
- import { Fragment as Fragment15, jsx as jsx69, jsxs as jsxs43 } from "react/jsx-runtime";
40074
+ import { Fragment as Fragment16, jsx as jsx69, jsxs as jsxs44 } from "react/jsx-runtime";
39952
40075
  function Toggle({ label, children, className, ...props }) {
39953
40076
  const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
39954
- return /* @__PURE__ */ jsxs43(Fragment15, { children: [
40077
+ return /* @__PURE__ */ jsxs44(Fragment16, { children: [
39955
40078
  label && /* @__PURE__ */ jsx69(Label2, { children: label }),
39956
40079
  /* @__PURE__ */ jsx69(
39957
40080
  $efde0372d7a700fe$export$d2b052e7b4be1756,
@@ -39972,7 +40095,7 @@ function Toggle({ label, children, className, ...props }) {
39972
40095
  }
39973
40096
 
39974
40097
  // src/components/ToggleGroup.tsx
39975
- import { jsx as jsx70, jsxs as jsxs44 } from "react/jsx-runtime";
40098
+ import { jsx as jsx70, jsxs as jsxs45 } from "react/jsx-runtime";
39976
40099
  function ToggleGroup({
39977
40100
  label,
39978
40101
  value,
@@ -39991,7 +40114,7 @@ function ToggleGroup({
39991
40114
  onSelectionChange?.(keys);
39992
40115
  onChange?.(Array.from(keys).map((k) => k.toString()));
39993
40116
  };
39994
- return /* @__PURE__ */ jsxs44(
40117
+ return /* @__PURE__ */ jsxs45(
39995
40118
  $eaf9e70818b436db$export$67ea30858aaf75e3,
39996
40119
  {
39997
40120
  ...props,