@embeddable.com/remarkable-ui 2.0.30 → 2.0.32

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.js CHANGED
@@ -2163,11 +2163,29 @@ var Dropdown = ({
2163
2163
  };
2164
2164
 
2165
2165
  // src/components/editors/selects/shared/SelectFieldTrigger/SelectFieldTrigger.tsx
2166
- import styles14 from "./SelectFieldTrigger.module-M6BRE7IY.module.css";
2166
+ import styles15 from "./SelectFieldTrigger.module-M6BRE7IY.module.css";
2167
2167
  import { IconCaretDownFilled as IconCaretDownFilled3, IconLoader2, IconX } from "@tabler/icons-react";
2168
- import clsx11 from "clsx";
2168
+ import clsx12 from "clsx";
2169
2169
  import { forwardRef as forwardRef3 } from "react";
2170
+
2171
+ // src/components/shared/GhostButton/GhostButton.tsx
2172
+ import React3 from "react";
2173
+ import clsx11 from "clsx";
2174
+ import styles14 from "./GhostButton.module-43KOFC6W.module.css";
2170
2175
  import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
2176
+ var GhostButton = React3.forwardRef(
2177
+ ({ startIcon: StartIcon, endIcon: EndIcon, children, className, ...props }, ref) => {
2178
+ return /* @__PURE__ */ jsxs12("button", { ref, className: clsx11(styles14.ghostButton, className), ...props, children: [
2179
+ StartIcon && /* @__PURE__ */ jsx20(StartIcon, {}),
2180
+ /* @__PURE__ */ jsx20("span", { children }),
2181
+ EndIcon && /* @__PURE__ */ jsx20(EndIcon, {})
2182
+ ] });
2183
+ }
2184
+ );
2185
+ GhostButton.displayName = "GhostButton";
2186
+
2187
+ // src/components/editors/selects/shared/SelectFieldTrigger/SelectFieldTrigger.tsx
2188
+ import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
2171
2189
  var SelectFieldTrigger = forwardRef3(
2172
2190
  ({
2173
2191
  startIcon: StartIcon,
@@ -2177,6 +2195,7 @@ var SelectFieldTrigger = forwardRef3(
2177
2195
  isLoading,
2178
2196
  onClear,
2179
2197
  error = false,
2198
+ variant = "default",
2180
2199
  ...props
2181
2200
  }, ref) => {
2182
2201
  const displayValue = valueLabel || placeholder;
@@ -2186,21 +2205,27 @@ var SelectFieldTrigger = forwardRef3(
2186
2205
  e.preventDefault();
2187
2206
  onClear?.();
2188
2207
  };
2189
- return /* @__PURE__ */ jsxs12(
2208
+ if (variant === "ghost") {
2209
+ return /* @__PURE__ */ jsxs13(GhostButton, { ref, endIcon: isLoading ? IconLoader2 : IconCaretDownFilled3, ...props, children: [
2210
+ displayValue,
2211
+ showClearButton && /* @__PURE__ */ jsx21(IconX, { onPointerDown: handleClear })
2212
+ ] });
2213
+ }
2214
+ return /* @__PURE__ */ jsxs13(
2190
2215
  "button",
2191
2216
  {
2192
2217
  ref,
2193
- className: clsx11(
2194
- styles14.selectFieldTrigger,
2195
- valueLabel && styles14.filled,
2196
- error && styles14.error
2218
+ className: clsx12(
2219
+ styles15.selectFieldTrigger,
2220
+ valueLabel && styles15.filled,
2221
+ error && styles15.error
2197
2222
  ),
2198
2223
  ...props,
2199
2224
  children: [
2200
- StartIcon && /* @__PURE__ */ jsx20(StartIcon, {}),
2201
- /* @__PURE__ */ jsx20("span", { children: displayValue }),
2202
- showClearButton && /* @__PURE__ */ jsx20(IconX, { onPointerDown: handleClear }),
2203
- isLoading ? /* @__PURE__ */ jsx20(IconLoader2, { className: styles14.loading }) : /* @__PURE__ */ jsx20(IconCaretDownFilled3, {})
2225
+ StartIcon && /* @__PURE__ */ jsx21(StartIcon, {}),
2226
+ /* @__PURE__ */ jsx21("span", { children: displayValue }),
2227
+ showClearButton && /* @__PURE__ */ jsx21(IconX, { onPointerDown: handleClear }),
2228
+ isLoading ? /* @__PURE__ */ jsx21(IconLoader2, { className: styles15.loading }) : /* @__PURE__ */ jsx21(IconCaretDownFilled3, {})
2204
2229
  ]
2205
2230
  }
2206
2231
  );
@@ -2210,9 +2235,9 @@ SelectFieldTrigger.displayName = "SelectFieldTrigger";
2210
2235
 
2211
2236
  // src/components/editors/selects/shared/SelectFieldContent/SelectFieldContent.tsx
2212
2237
  import { useEffect as useEffect6, useRef as useRef9 } from "react";
2213
- import styles15 from "./SelectFieldContent.module-GZYJOPUB.module.css";
2214
- import clsx12 from "clsx";
2215
- import { jsx as jsx21 } from "react/jsx-runtime";
2238
+ import styles16 from "./SelectFieldContent.module-GZYJOPUB.module.css";
2239
+ import clsx13 from "clsx";
2240
+ import { jsx as jsx22 } from "react/jsx-runtime";
2216
2241
  var SelectFieldContent = ({
2217
2242
  children,
2218
2243
  autoFocus,
@@ -2266,33 +2291,33 @@ var SelectFieldContent = ({
2266
2291
  container.removeEventListener("keydown", onKeyDown);
2267
2292
  };
2268
2293
  }, [autoFocus, children]);
2269
- return /* @__PURE__ */ jsx21(
2294
+ return /* @__PURE__ */ jsx22(
2270
2295
  "div",
2271
2296
  {
2272
2297
  ref: containerRef,
2273
2298
  tabIndex: -1,
2274
- className: clsx12(styles15.selectFieldContent, fitContent && styles15.fitContent, className),
2299
+ className: clsx13(styles16.selectFieldContent, fitContent && styles16.fitContent, className),
2275
2300
  ...props,
2276
2301
  children
2277
2302
  }
2278
2303
  );
2279
2304
  };
2280
2305
  var SelectFieldContentList = ({ children, disabled }) => {
2281
- return /* @__PURE__ */ jsx21("div", { className: clsx12(styles15.selectFieldContentList, disabled && styles15.disabled), children });
2306
+ return /* @__PURE__ */ jsx22("div", { className: clsx13(styles16.selectFieldContentList, disabled && styles16.disabled), children });
2282
2307
  };
2283
2308
 
2284
2309
  // src/components/shared/Field/FieldFeedback.tsx
2285
- import clsx13 from "clsx";
2286
- import styles16 from "./FieldFeedback.module-F7Z33KCS.module.css";
2287
- import { jsx as jsx22 } from "react/jsx-runtime";
2310
+ import clsx14 from "clsx";
2311
+ import styles17 from "./FieldFeedback.module-F7Z33KCS.module.css";
2312
+ import { jsx as jsx23 } from "react/jsx-runtime";
2288
2313
  var FieldFeedback = ({ message, variant, className }) => {
2289
- return /* @__PURE__ */ jsx22("p", { className: clsx13(styles16.fieldFeedback, variant && styles16[variant], className), children: message });
2314
+ return /* @__PURE__ */ jsx23("p", { className: clsx14(styles17.fieldFeedback, variant && styles17[variant], className), children: message });
2290
2315
  };
2291
2316
 
2292
2317
  // src/components/shared/Button/Button.tsx
2293
- import styles17 from "./Button.module-GOXSST7L.module.css";
2294
- import clsx14 from "clsx";
2295
- import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
2318
+ import styles18 from "./Button.module-GOXSST7L.module.css";
2319
+ import clsx15 from "clsx";
2320
+ import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
2296
2321
  var Button = ({
2297
2322
  children,
2298
2323
  variant = "primary",
@@ -2302,16 +2327,16 @@ var Button = ({
2302
2327
  className,
2303
2328
  ...props
2304
2329
  }) => {
2305
- return /* @__PURE__ */ jsxs13("button", { className: clsx14(styles17.button, styles17[variant], styles17[size], className), ...props, children: [
2306
- StartIcon && /* @__PURE__ */ jsx23(StartIcon, {}),
2307
- /* @__PURE__ */ jsx23("span", { children }),
2308
- EndIcon && /* @__PURE__ */ jsx23(EndIcon, {})
2330
+ return /* @__PURE__ */ jsxs14("button", { className: clsx15(styles18.button, styles18[variant], styles18[size], className), ...props, children: [
2331
+ StartIcon && /* @__PURE__ */ jsx24(StartIcon, {}),
2332
+ /* @__PURE__ */ jsx24("span", { children }),
2333
+ EndIcon && /* @__PURE__ */ jsx24(EndIcon, {})
2309
2334
  ] });
2310
2335
  };
2311
2336
 
2312
2337
  // src/components/editors/dates/DateRangePickerField/DateRangePickerField.tsx
2313
- import styles18 from "./DateRangePickerField.module-CURG3KIS.module.css";
2314
- import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
2338
+ import styles19 from "./DateRangePickerField.module-CURG3KIS.module.css";
2339
+ import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
2315
2340
  var getDateRangePickerLabel = (dateRange, displayValue) => {
2316
2341
  if (!dateRange) return void 0;
2317
2342
  if (displayValue || displayValue === "") return displayValue;
@@ -2357,16 +2382,16 @@ var DateRangePickerField = ({
2357
2382
  setIsOpen(false);
2358
2383
  };
2359
2384
  const isSubmitDisabled = isSameDateRange(currentDateRange, value);
2360
- return /* @__PURE__ */ jsxs14("div", { children: [
2361
- /* @__PURE__ */ jsx24(FieldHeader, { label, required }),
2362
- /* @__PURE__ */ jsx24(
2385
+ return /* @__PURE__ */ jsxs15("div", { children: [
2386
+ /* @__PURE__ */ jsx25(FieldHeader, { label, required }),
2387
+ /* @__PURE__ */ jsx25(
2363
2388
  Dropdown,
2364
2389
  {
2365
2390
  open: isOpen,
2366
2391
  onOpenChange: handleOpenChange,
2367
2392
  disabled,
2368
2393
  avoidCollisions,
2369
- triggerComponent: /* @__PURE__ */ jsx24(
2394
+ triggerComponent: /* @__PURE__ */ jsx25(
2370
2395
  SelectFieldTrigger,
2371
2396
  {
2372
2397
  startIcon,
@@ -2379,8 +2404,8 @@ var DateRangePickerField = ({
2379
2404
  error: hasError
2380
2405
  }
2381
2406
  ),
2382
- children: /* @__PURE__ */ jsxs14(SelectFieldContent, { fitContent: true, children: [
2383
- /* @__PURE__ */ jsx24(
2407
+ children: /* @__PURE__ */ jsxs15(SelectFieldContent, { fitContent: true, children: [
2408
+ /* @__PURE__ */ jsx25(
2384
2409
  DateRangePicker,
2385
2410
  {
2386
2411
  locale,
@@ -2389,11 +2414,11 @@ var DateRangePickerField = ({
2389
2414
  onChange: setCurrentDateRange
2390
2415
  }
2391
2416
  ),
2392
- /* @__PURE__ */ jsx24(
2417
+ /* @__PURE__ */ jsx25(
2393
2418
  Button,
2394
2419
  {
2395
2420
  size: "small",
2396
- className: styles18.submitButton,
2421
+ className: styles19.submitButton,
2397
2422
  onClick: handleChange,
2398
2423
  disabled: isSubmitDisabled,
2399
2424
  children: submitLabel
@@ -2402,7 +2427,7 @@ var DateRangePickerField = ({
2402
2427
  ] })
2403
2428
  }
2404
2429
  ),
2405
- errorMessage && /* @__PURE__ */ jsx24(FieldFeedback, { message: errorMessage, variant: "error" })
2430
+ errorMessage && /* @__PURE__ */ jsx25(FieldFeedback, { message: errorMessage, variant: "error" })
2406
2431
  ] });
2407
2432
  };
2408
2433
 
@@ -2411,10 +2436,10 @@ import { forwardRef as forwardRef5 } from "react";
2411
2436
 
2412
2437
  // src/components/editors/inputs/shared/InputField/InputField.tsx
2413
2438
  import { IconX as IconX2 } from "@tabler/icons-react";
2414
- import styles19 from "./InputField.module-LDLOMDBK.module.css";
2415
- import clsx15 from "clsx";
2439
+ import styles20 from "./InputField.module-LDLOMDBK.module.css";
2440
+ import clsx16 from "clsx";
2416
2441
  import { forwardRef as forwardRef4 } from "react";
2417
- import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
2442
+ import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
2418
2443
  var InputField = forwardRef4(
2419
2444
  ({
2420
2445
  label,
@@ -2436,11 +2461,11 @@ var InputField = forwardRef4(
2436
2461
  }, ref) => {
2437
2462
  const showClearButton = value && clearable;
2438
2463
  const hasError = error || errorMessage;
2439
- return /* @__PURE__ */ jsxs15("div", { className, children: [
2440
- /* @__PURE__ */ jsx25(FieldHeader, { label, required, requiredLabel }),
2441
- /* @__PURE__ */ jsxs15("div", { className: clsx15(styles19.input, hasError && styles19.error), children: [
2442
- StartIcon && /* @__PURE__ */ jsx25(StartIcon, {}),
2443
- /* @__PURE__ */ jsx25(
2464
+ return /* @__PURE__ */ jsxs16("div", { className, children: [
2465
+ /* @__PURE__ */ jsx26(FieldHeader, { label, required, requiredLabel }),
2466
+ /* @__PURE__ */ jsxs16("div", { className: clsx16(styles20.input, hasError && styles20.error), children: [
2467
+ StartIcon && /* @__PURE__ */ jsx26(StartIcon, {}),
2468
+ /* @__PURE__ */ jsx26(
2444
2469
  "input",
2445
2470
  {
2446
2471
  ref,
@@ -2454,23 +2479,23 @@ var InputField = forwardRef4(
2454
2479
  ...props
2455
2480
  }
2456
2481
  ),
2457
- /* @__PURE__ */ jsx25(
2482
+ /* @__PURE__ */ jsx26(
2458
2483
  IconX2,
2459
2484
  {
2460
- className: clsx15(styles19.clearIcon, showClearButton && styles19.clearIconVisible),
2485
+ className: clsx16(styles20.clearIcon, showClearButton && styles20.clearIconVisible),
2461
2486
  onClick: () => onChange("")
2462
2487
  }
2463
2488
  ),
2464
- EndIcon && /* @__PURE__ */ jsx25(EndIcon, {})
2489
+ EndIcon && /* @__PURE__ */ jsx26(EndIcon, {})
2465
2490
  ] }),
2466
- errorMessage && /* @__PURE__ */ jsx25(FieldFeedback, { variant: "error", message: errorMessage })
2491
+ errorMessage && /* @__PURE__ */ jsx26(FieldFeedback, { variant: "error", message: errorMessage })
2467
2492
  ] });
2468
2493
  }
2469
2494
  );
2470
2495
  InputField.displayName = "InputField";
2471
2496
 
2472
2497
  // src/components/editors/inputs/NumberField/NumberField.tsx
2473
- import { jsx as jsx26 } from "react/jsx-runtime";
2498
+ import { jsx as jsx27 } from "react/jsx-runtime";
2474
2499
  var NumberField = forwardRef5(
2475
2500
  ({
2476
2501
  value = null,
@@ -2491,7 +2516,7 @@ var NumberField = forwardRef5(
2491
2516
  onChange?.(numericValue);
2492
2517
  }
2493
2518
  };
2494
- return /* @__PURE__ */ jsx26(
2519
+ return /* @__PURE__ */ jsx27(
2495
2520
  InputField,
2496
2521
  {
2497
2522
  ...props,
@@ -2511,11 +2536,11 @@ NumberField.displayName = "NumberField";
2511
2536
 
2512
2537
  // src/components/editors/inputs/TextField/TextField.tsx
2513
2538
  import { forwardRef as forwardRef6 } from "react";
2514
- import { Fragment as Fragment3, jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
2539
+ import { Fragment as Fragment3, jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
2515
2540
  var TextField = forwardRef6(
2516
2541
  ({ value = "", placeholder = "Enter text", maxLength, error, errorMessage, ...props }, ref) => {
2517
- return /* @__PURE__ */ jsxs16(Fragment3, { children: [
2518
- /* @__PURE__ */ jsx27(
2542
+ return /* @__PURE__ */ jsxs17(Fragment3, { children: [
2543
+ /* @__PURE__ */ jsx28(
2519
2544
  InputField,
2520
2545
  {
2521
2546
  value,
@@ -2528,7 +2553,7 @@ var TextField = forwardRef6(
2528
2553
  ...props
2529
2554
  }
2530
2555
  ),
2531
- maxLength && /* @__PURE__ */ jsx27(FieldFeedback, { message: `${value?.length}/${maxLength} Characters` })
2556
+ maxLength && /* @__PURE__ */ jsx28(FieldFeedback, { message: `${value?.length}/${maxLength} Characters` })
2532
2557
  ] });
2533
2558
  }
2534
2559
  );
@@ -2539,9 +2564,9 @@ import { Fragment as Fragment4, useEffect as useEffect8, useMemo as useMemo4, us
2539
2564
 
2540
2565
  // src/components/editors/selects/shared/SelectFieldContent/SelectFieldOptions/SelectFieldOption/SelectFieldOption.tsx
2541
2566
  import * as DropdownMenu2 from "@radix-ui/react-dropdown-menu";
2542
- import styles20 from "./SelectFieldOption.module-SH3TOVNB.module.css";
2543
- import clsx16 from "clsx";
2544
- import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
2567
+ import styles21 from "./SelectFieldOption.module-SH3TOVNB.module.css";
2568
+ import clsx17 from "clsx";
2569
+ import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
2545
2570
  var SelectListOption = ({
2546
2571
  value,
2547
2572
  isSelected,
@@ -2552,23 +2577,23 @@ var SelectListOption = ({
2552
2577
  disabled,
2553
2578
  ...props
2554
2579
  }) => {
2555
- return /* @__PURE__ */ jsxs17(
2580
+ return /* @__PURE__ */ jsxs18(
2556
2581
  DropdownMenu2.Item,
2557
2582
  {
2558
- className: clsx16(
2559
- styles20.selectFieldOption,
2560
- disabled && styles20.disabled,
2561
- isSelected && styles20.selected
2583
+ className: clsx17(
2584
+ styles21.selectFieldOption,
2585
+ disabled && styles21.disabled,
2586
+ isSelected && styles21.selected
2562
2587
  ),
2563
2588
  "data-value": value,
2564
2589
  ...props,
2565
2590
  children: [
2566
- /* @__PURE__ */ jsxs17("span", { className: styles20.leftContent, children: [
2591
+ /* @__PURE__ */ jsxs18("span", { className: styles21.leftContent, children: [
2567
2592
  startIcon,
2568
- /* @__PURE__ */ jsx28("span", { title: label, children: label })
2593
+ /* @__PURE__ */ jsx29("span", { title: label, children: label })
2569
2594
  ] }),
2570
- /* @__PURE__ */ jsxs17("span", { className: styles20.rightContent, children: [
2571
- /* @__PURE__ */ jsx28("span", { title: rightLabel, children: rightLabel }),
2595
+ /* @__PURE__ */ jsxs18("span", { className: styles21.rightContent, children: [
2596
+ /* @__PURE__ */ jsx29("span", { title: rightLabel, children: rightLabel }),
2572
2597
  endIcon
2573
2598
  ] })
2574
2599
  ]
@@ -2593,7 +2618,7 @@ var groupOptionsByCategory = (options) => {
2593
2618
 
2594
2619
  // src/components/editors/selects/MultiSelectField/MultiSelectField.tsx
2595
2620
  import { IconSearch, IconSquare, IconSquareCheckFilled } from "@tabler/icons-react";
2596
- import styles22 from "./selects.module-MRJADSDF.module.css";
2621
+ import styles23 from "./selects.module-MRJADSDF.module.css";
2597
2622
 
2598
2623
  // src/components/editors/selects/shared/useSelectSearchFocus.hook.ts
2599
2624
  import { useEffect as useEffect7 } from "react";
@@ -2608,10 +2633,10 @@ var useSelectSearchFocus = (isOpen, searchFieldRef) => {
2608
2633
  };
2609
2634
 
2610
2635
  // src/components/editors/selects/shared/SelectFieldContent/SelectFieldOptions/SelectFieldCategory/SelectFieldCategory.tsx
2611
- import styles21 from "./SelectFieldCategory.module-FMZMX5V2.module.css";
2612
- import { jsx as jsx29 } from "react/jsx-runtime";
2636
+ import styles22 from "./SelectFieldCategory.module-FMZMX5V2.module.css";
2637
+ import { jsx as jsx30 } from "react/jsx-runtime";
2613
2638
  var SelectFieldCategory = ({ label }) => {
2614
- return /* @__PURE__ */ jsx29("span", { className: styles21.selectFieldCategory, children: label });
2639
+ return /* @__PURE__ */ jsx30("span", { className: styles22.selectFieldCategory, children: label });
2615
2640
  };
2616
2641
 
2617
2642
  // src/utils/debounce.utils.ts
@@ -2626,7 +2651,7 @@ function debounce(fn, delay = 300) {
2626
2651
  }
2627
2652
 
2628
2653
  // src/components/editors/selects/MultiSelectField/MultiSelectField.tsx
2629
- import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
2654
+ import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
2630
2655
  var MultiSelectField = ({
2631
2656
  startIcon,
2632
2657
  label,
@@ -2677,7 +2702,7 @@ var MultiSelectField = ({
2677
2702
  const isSubmitDisabled = preValues.every((preValue) => values.includes(preValue)) && values.every((value) => preValues.includes(value));
2678
2703
  const handleSelectOption = (e, newValue) => {
2679
2704
  e.preventDefault();
2680
- if (newValue == null) return;
2705
+ if (!newValue) return;
2681
2706
  if (preValues.includes(newValue)) {
2682
2707
  setPreValues(preValues.filter((v) => v !== newValue));
2683
2708
  } else {
@@ -2700,16 +2725,16 @@ var MultiSelectField = ({
2700
2725
  onChange([]);
2701
2726
  };
2702
2727
  const hasError = error || !!errorMessage;
2703
- return /* @__PURE__ */ jsxs18("div", { children: [
2704
- /* @__PURE__ */ jsx30(FieldHeader, { label, required }),
2705
- /* @__PURE__ */ jsx30(
2728
+ return /* @__PURE__ */ jsxs19("div", { children: [
2729
+ /* @__PURE__ */ jsx31(FieldHeader, { label, required }),
2730
+ /* @__PURE__ */ jsx31(
2706
2731
  Dropdown,
2707
2732
  {
2708
2733
  open: isOpen,
2709
2734
  onOpenChange: setIsOpen,
2710
2735
  disabled,
2711
2736
  avoidCollisions,
2712
- triggerComponent: /* @__PURE__ */ jsx30(
2737
+ triggerComponent: /* @__PURE__ */ jsx31(
2713
2738
  SelectFieldTrigger,
2714
2739
  {
2715
2740
  startIcon,
@@ -2723,8 +2748,8 @@ var MultiSelectField = ({
2723
2748
  error: hasError
2724
2749
  }
2725
2750
  ),
2726
- children: /* @__PURE__ */ jsxs18(SelectFieldContent, { children: [
2727
- isSearchable && /* @__PURE__ */ jsx30(
2751
+ children: /* @__PURE__ */ jsxs19(SelectFieldContent, { children: [
2752
+ isSearchable && /* @__PURE__ */ jsx31(
2728
2753
  TextField,
2729
2754
  {
2730
2755
  ref: searchFieldRef,
@@ -2735,36 +2760,36 @@ var MultiSelectField = ({
2735
2760
  value: searchValue,
2736
2761
  onKeyDown: (e) => e.stopPropagation(),
2737
2762
  onChange: handleSearch,
2738
- className: styles22.searchField
2763
+ className: styles23.searchField
2739
2764
  }
2740
2765
  ),
2741
- /* @__PURE__ */ jsxs18(SelectFieldContentList, { disabled: isLoading, children: [
2742
- groupedOptions ? Object.entries(groupedOptions).map(([category, categoryOptions]) => /* @__PURE__ */ jsxs18(Fragment4, { children: [
2743
- /* @__PURE__ */ jsx30(SelectFieldCategory, { label: category }),
2744
- categoryOptions.map((option) => /* @__PURE__ */ jsx30(
2766
+ /* @__PURE__ */ jsxs19(SelectFieldContentList, { disabled: isLoading, children: [
2767
+ groupedOptions ? Object.entries(groupedOptions).map(([category, categoryOptions]) => /* @__PURE__ */ jsxs19(Fragment4, { children: [
2768
+ /* @__PURE__ */ jsx31(SelectFieldCategory, { label: category }),
2769
+ categoryOptions.map((option) => /* @__PURE__ */ jsx31(
2745
2770
  SelectListOption,
2746
2771
  {
2747
2772
  onClick: (e) => handleSelectOption(e, option.value),
2748
- startIcon: preValues.includes(option.value) ? /* @__PURE__ */ jsx30(IconSquareCheckFilled, {}) : /* @__PURE__ */ jsx30(IconSquare, {}),
2773
+ startIcon: preValues.includes(option.value) ? /* @__PURE__ */ jsx31(IconSquareCheckFilled, {}) : /* @__PURE__ */ jsx31(IconSquare, {}),
2749
2774
  ...option
2750
2775
  },
2751
- option?.value ? option.value.toString() : option.label
2776
+ option?.value ?? option.label
2752
2777
  ))
2753
- ] }, category)) : displayOptions.map((option) => /* @__PURE__ */ jsx30(
2778
+ ] }, category)) : displayOptions.map((option) => /* @__PURE__ */ jsx31(
2754
2779
  SelectListOption,
2755
2780
  {
2756
2781
  onClick: (e) => handleSelectOption(e, option.value),
2757
- startIcon: preValues.includes(option.value) ? /* @__PURE__ */ jsx30(IconSquareCheckFilled, {}) : /* @__PURE__ */ jsx30(IconSquare, {}),
2782
+ startIcon: preValues.includes(option.value) ? /* @__PURE__ */ jsx31(IconSquareCheckFilled, {}) : /* @__PURE__ */ jsx31(IconSquare, {}),
2758
2783
  ...option
2759
2784
  },
2760
- option?.value ? option.value.toString() : option.label
2785
+ option?.value ?? option.label
2761
2786
  )),
2762
- noOptionsMessage && displayOptions.length === 0 && /* @__PURE__ */ jsx30(SelectListOption, { disabled: true, value: "empty", label: noOptionsMessage })
2787
+ noOptionsMessage && displayOptions.length === 0 && /* @__PURE__ */ jsx31(SelectListOption, { disabled: true, value: "empty", label: noOptionsMessage })
2763
2788
  ] }),
2764
- /* @__PURE__ */ jsx30(
2789
+ /* @__PURE__ */ jsx31(
2765
2790
  Button,
2766
2791
  {
2767
- className: styles22.submitButton,
2792
+ className: styles23.submitButton,
2768
2793
  disabled: isSubmitDisabled || isLoading,
2769
2794
  variant: "primary",
2770
2795
  size: "medium",
@@ -2776,19 +2801,19 @@ var MultiSelectField = ({
2776
2801
  ] })
2777
2802
  }
2778
2803
  ),
2779
- errorMessage && /* @__PURE__ */ jsx30(FieldFeedback, { message: errorMessage, variant: "error" })
2804
+ errorMessage && /* @__PURE__ */ jsx31(FieldFeedback, { message: errorMessage, variant: "error" })
2780
2805
  ] });
2781
2806
  };
2782
2807
 
2783
2808
  // src/components/editors/selects/SingleSelectField/SingleSelectField.tsx
2784
2809
  import { Fragment as Fragment5, useEffect as useEffect9, useMemo as useMemo5, useRef as useRef11, useState as useState8 } from "react";
2785
2810
  import { IconSearch as IconSearch2 } from "@tabler/icons-react";
2786
- import styles23 from "./selects.module-MRJADSDF.module.css";
2787
- import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
2811
+ import styles24 from "./selects.module-MRJADSDF.module.css";
2812
+ import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
2788
2813
  var SingleSelectField = ({
2789
2814
  label,
2790
2815
  required,
2791
- value,
2816
+ value = "",
2792
2817
  startIcon,
2793
2818
  options,
2794
2819
  disabled,
@@ -2801,23 +2826,24 @@ var SingleSelectField = ({
2801
2826
  onChange,
2802
2827
  onSearch,
2803
2828
  error = false,
2804
- errorMessage
2829
+ errorMessage,
2830
+ side,
2831
+ align,
2832
+ variant
2805
2833
  }) => {
2806
2834
  const [isOpen, setIsOpen] = useState8(false);
2807
2835
  const [searchValue, setSearchValue] = useState8("");
2808
- const [selectedLabel, setSelectedLabel] = useState8(value?.toString() ?? "");
2836
+ const [selectedLabel, setSelectedLabel] = useState8(value);
2809
2837
  const searchFieldRef = useRef11(null);
2810
2838
  useSelectSearchFocus(isOpen, searchFieldRef);
2811
2839
  useEffect9(() => {
2812
- if (value == null) {
2840
+ if (!value) {
2813
2841
  setSelectedLabel("");
2814
2842
  return;
2815
2843
  }
2816
- const selectedOption = options.find((opt) => opt.value === value);
2817
- if (selectedOption) {
2818
- setSelectedLabel(selectedOption.label);
2819
- } else {
2820
- setSelectedLabel("");
2844
+ const option = options.find((opt) => opt.value === value);
2845
+ if (option) {
2846
+ setSelectedLabel(option.label);
2821
2847
  }
2822
2848
  }, [value, options]);
2823
2849
  const debouncedSearch = useMemo5(() => onSearch ? debounce(onSearch) : void 0, [onSearch]);
@@ -2825,13 +2851,13 @@ var SingleSelectField = ({
2825
2851
  const groupedOptions = useMemo5(() => groupOptionsByCategory(displayOptions), [displayOptions]);
2826
2852
  const handleChange = (newValue) => {
2827
2853
  setSearchValue("");
2828
- onChange(newValue);
2854
+ onChange(newValue ?? "");
2829
2855
  onSearch?.("");
2830
- const selectedOption = options.find((opt) => opt.value === newValue);
2831
- if (selectedOption) {
2832
- setSelectedLabel(selectedOption.label);
2833
- } else {
2856
+ if (newValue === "") {
2834
2857
  setSelectedLabel("");
2858
+ } else {
2859
+ const option = options.find((opt) => opt.value === newValue);
2860
+ if (option) setSelectedLabel(option.label);
2835
2861
  }
2836
2862
  };
2837
2863
  const handleSearch = (newSearch) => {
@@ -2839,16 +2865,18 @@ var SingleSelectField = ({
2839
2865
  debouncedSearch?.(newSearch);
2840
2866
  };
2841
2867
  const hasError = error || !!errorMessage;
2842
- return /* @__PURE__ */ jsxs19("div", { children: [
2843
- /* @__PURE__ */ jsx31(FieldHeader, { label, required }),
2844
- /* @__PURE__ */ jsx31(
2868
+ return /* @__PURE__ */ jsxs20("div", { children: [
2869
+ /* @__PURE__ */ jsx32(FieldHeader, { label, required }),
2870
+ /* @__PURE__ */ jsx32(
2845
2871
  Dropdown,
2846
2872
  {
2847
2873
  open: isOpen,
2848
2874
  onOpenChange: setIsOpen,
2849
2875
  disabled,
2850
2876
  avoidCollisions,
2851
- triggerComponent: /* @__PURE__ */ jsx31(
2877
+ side,
2878
+ align,
2879
+ triggerComponent: /* @__PURE__ */ jsx32(
2852
2880
  SelectFieldTrigger,
2853
2881
  {
2854
2882
  startIcon,
@@ -2856,14 +2884,15 @@ var SingleSelectField = ({
2856
2884
  placeholder,
2857
2885
  disabled,
2858
2886
  valueLabel: selectedLabel,
2859
- onClear: () => handleChange(void 0),
2887
+ onClear: () => handleChange(""),
2860
2888
  isClearable: clearable,
2861
2889
  isLoading,
2862
- error: hasError
2890
+ error: hasError,
2891
+ variant
2863
2892
  }
2864
2893
  ),
2865
- children: /* @__PURE__ */ jsxs19(SelectFieldContent, { children: [
2866
- searchable && /* @__PURE__ */ jsx31(
2894
+ children: /* @__PURE__ */ jsxs20(SelectFieldContent, { children: [
2895
+ searchable && /* @__PURE__ */ jsx32(
2867
2896
  TextField,
2868
2897
  {
2869
2898
  ref: searchFieldRef,
@@ -2874,43 +2903,43 @@ var SingleSelectField = ({
2874
2903
  value: searchValue,
2875
2904
  onKeyDown: (e) => e.stopPropagation(),
2876
2905
  onChange: handleSearch,
2877
- className: styles23.searchField
2906
+ className: styles24.searchField
2878
2907
  }
2879
2908
  ),
2880
- /* @__PURE__ */ jsxs19(SelectFieldContentList, { disabled: isLoading, children: [
2881
- groupedOptions ? Object.entries(groupedOptions).map(([category, categoryOptions]) => /* @__PURE__ */ jsxs19(Fragment5, { children: [
2882
- /* @__PURE__ */ jsx31(SelectFieldCategory, { label: category }),
2883
- categoryOptions.map((option) => /* @__PURE__ */ jsx31(
2909
+ /* @__PURE__ */ jsxs20(SelectFieldContentList, { disabled: isLoading, children: [
2910
+ groupedOptions ? Object.entries(groupedOptions).map(([category, categoryOptions]) => /* @__PURE__ */ jsxs20(Fragment5, { children: [
2911
+ /* @__PURE__ */ jsx32(SelectFieldCategory, { label: category }),
2912
+ categoryOptions.map((option) => /* @__PURE__ */ jsx32(
2884
2913
  SelectListOption,
2885
2914
  {
2886
2915
  onClick: () => handleChange(option?.value),
2887
2916
  isSelected: option.value === value,
2888
2917
  ...option
2889
2918
  },
2890
- option?.value ? option.value.toString() : option.label
2919
+ option?.value ?? option.label
2891
2920
  ))
2892
- ] }, category)) : displayOptions.map((option) => /* @__PURE__ */ jsx31(
2921
+ ] }, category)) : displayOptions.map((option) => /* @__PURE__ */ jsx32(
2893
2922
  SelectListOption,
2894
2923
  {
2895
2924
  onClick: () => handleChange(option?.value),
2896
2925
  isSelected: option.value === value,
2897
2926
  ...option
2898
2927
  },
2899
- option?.value ? option.value.toString() : option.label
2928
+ option?.value ?? option.label
2900
2929
  )),
2901
- options.length === 0 && /* @__PURE__ */ jsx31(SelectListOption, { disabled: true, value: "empty", label: noOptionsMessage })
2930
+ options.length === 0 && /* @__PURE__ */ jsx32(SelectListOption, { disabled: true, value: "empty", label: noOptionsMessage })
2902
2931
  ] })
2903
2932
  ] })
2904
2933
  }
2905
2934
  ),
2906
- errorMessage && /* @__PURE__ */ jsx31(FieldFeedback, { message: errorMessage, variant: "error" })
2935
+ errorMessage && /* @__PURE__ */ jsx32(FieldFeedback, { message: errorMessage, variant: "error" })
2907
2936
  ] });
2908
2937
  };
2909
2938
 
2910
2939
  // src/components/editors/Switch/Switch.tsx
2911
- import clsx17 from "clsx";
2912
- import styles24 from "./Switch.module-MXKS66UI.module.css";
2913
- import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
2940
+ import clsx18 from "clsx";
2941
+ import styles25 from "./Switch.module-MXKS66UI.module.css";
2942
+ import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
2914
2943
  var Switch = ({
2915
2944
  checked,
2916
2945
  onChange,
@@ -2929,17 +2958,17 @@ var Switch = ({
2929
2958
  "Switch component requires either a label prop or aria-label prop for accessibility"
2930
2959
  );
2931
2960
  }
2932
- return /* @__PURE__ */ jsxs20(
2961
+ return /* @__PURE__ */ jsxs21(
2933
2962
  "label",
2934
2963
  {
2935
- className: clsx17(
2964
+ className: clsx18(
2936
2965
  className,
2937
- styles24.switch,
2938
- checked && styles24.checked,
2939
- disabled && styles24.disabled
2966
+ styles25.switch,
2967
+ checked && styles25.checked,
2968
+ disabled && styles25.disabled
2940
2969
  ),
2941
2970
  children: [
2942
- /* @__PURE__ */ jsx32(
2971
+ /* @__PURE__ */ jsx33(
2943
2972
  "input",
2944
2973
  {
2945
2974
  type: "checkbox",
@@ -2952,17 +2981,17 @@ var Switch = ({
2952
2981
  ...props
2953
2982
  }
2954
2983
  ),
2955
- /* @__PURE__ */ jsx32("span", { className: styles24.switchTrack, "aria-hidden": "true", children: /* @__PURE__ */ jsx32("span", { className: styles24.switchThumb, "aria-hidden": "true" }) }),
2956
- label && /* @__PURE__ */ jsx32("span", { className: clsx17(styles24.switchLabel), children: label })
2984
+ /* @__PURE__ */ jsx33("span", { className: styles25.switchTrack, "aria-hidden": "true", children: /* @__PURE__ */ jsx33("span", { className: styles25.switchThumb, "aria-hidden": "true" }) }),
2985
+ label && /* @__PURE__ */ jsx33("span", { className: clsx18(styles25.switchLabel), children: label })
2957
2986
  ]
2958
2987
  }
2959
2988
  );
2960
2989
  };
2961
2990
 
2962
2991
  // src/components/shared/ButtonIcon/ButtonIcon.tsx
2963
- import clsx18 from "clsx";
2964
- import styles25 from "./ButtonIcon.module-JHFZQSMJ.module.css";
2965
- import { jsx as jsx33 } from "react/jsx-runtime";
2992
+ import clsx19 from "clsx";
2993
+ import styles26 from "./ButtonIcon.module-JHFZQSMJ.module.css";
2994
+ import { jsx as jsx34 } from "react/jsx-runtime";
2966
2995
  var ButtonIcon = ({
2967
2996
  icon: Icon,
2968
2997
  size = "medium",
@@ -2970,24 +2999,24 @@ var ButtonIcon = ({
2970
2999
  className,
2971
3000
  ...props
2972
3001
  }) => {
2973
- return /* @__PURE__ */ jsx33(
3002
+ return /* @__PURE__ */ jsx34(
2974
3003
  "button",
2975
3004
  {
2976
- className: clsx18(styles25.buttonIcon, styles25[variant], styles25[size], className),
3005
+ className: clsx19(styles26.buttonIcon, styles26[variant], styles26[size], className),
2977
3006
  ...props,
2978
- children: /* @__PURE__ */ jsx33(Icon, {})
3007
+ children: /* @__PURE__ */ jsx34(Icon, {})
2979
3008
  }
2980
3009
  );
2981
3010
  };
2982
3011
 
2983
3012
  // src/components/shared/Card/Card.tsx
2984
- import React3 from "react";
2985
- import styles26 from "./Card.module-YJV4R6DV.module.css";
2986
- import clsx19 from "clsx";
2987
- import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
2988
- var Card = React3.forwardRef(
3013
+ import React4 from "react";
3014
+ import styles27 from "./Card.module-YJV4R6DV.module.css";
3015
+ import clsx20 from "clsx";
3016
+ import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
3017
+ var Card = React4.forwardRef(
2989
3018
  ({ children, className, ...props }, ref) => {
2990
- return /* @__PURE__ */ jsx34("div", { className: clsx19(styles26.card, className), ref, ...props, children });
3019
+ return /* @__PURE__ */ jsx35("div", { className: clsx20(styles27.card, className), ref, ...props, children });
2991
3020
  }
2992
3021
  );
2993
3022
  Card.displayName = "Card";
@@ -2995,22 +3024,22 @@ var CardHeader = ({ title, subtitle }) => {
2995
3024
  if (!title && !subtitle) {
2996
3025
  return null;
2997
3026
  }
2998
- return /* @__PURE__ */ jsxs21("div", { className: styles26.cardHeader, children: [
2999
- title && /* @__PURE__ */ jsx34("h1", { children: title }),
3000
- subtitle && /* @__PURE__ */ jsx34("p", { children: subtitle })
3027
+ return /* @__PURE__ */ jsxs22("div", { className: styles27.cardHeader, children: [
3028
+ title && /* @__PURE__ */ jsx35("h1", { children: title }),
3029
+ subtitle && /* @__PURE__ */ jsx35("p", { children: subtitle })
3001
3030
  ] });
3002
3031
  };
3003
- var CardContent = React3.forwardRef(
3032
+ var CardContent = React4.forwardRef(
3004
3033
  ({ children }, ref) => {
3005
- return /* @__PURE__ */ jsx34("div", { className: styles26.cardContent, ref, children });
3034
+ return /* @__PURE__ */ jsx35("div", { className: styles27.cardContent, ref, children });
3006
3035
  }
3007
3036
  );
3008
3037
  CardContent.displayName = "CardContent";
3009
3038
 
3010
3039
  // src/components/shared/Card/CardFeedback/CardFeedback.tsx
3011
- import clsx20 from "clsx";
3012
- import styles27 from "./CardFeedback.module-WCSHLBSM.module.css";
3013
- import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
3040
+ import clsx21 from "clsx";
3041
+ import styles28 from "./CardFeedback.module-WCSHLBSM.module.css";
3042
+ import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
3014
3043
  var CardFeedback = ({
3015
3044
  icon: Icon,
3016
3045
  title,
@@ -3018,28 +3047,10 @@ var CardFeedback = ({
3018
3047
  className,
3019
3048
  variant = "info"
3020
3049
  }) => {
3021
- return /* @__PURE__ */ jsxs22("div", { className: clsx20(styles27.feedback, styles27[variant], className), children: [
3022
- Icon && /* @__PURE__ */ jsx35(Icon, {}),
3023
- /* @__PURE__ */ jsx35("h2", { children: title }),
3024
- /* @__PURE__ */ jsx35("p", { children: message })
3025
- ] });
3026
- };
3027
-
3028
- // src/components/shared/GhostButton/GhostButton.tsx
3029
- import clsx21 from "clsx";
3030
- import styles28 from "./GhostButton.module-43KOFC6W.module.css";
3031
- import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
3032
- var GhostButton = ({
3033
- startIcon: StartIcon,
3034
- endIcon: EndIcon,
3035
- children,
3036
- className,
3037
- ...props
3038
- }) => {
3039
- return /* @__PURE__ */ jsxs23("button", { className: clsx21(styles28.ghostButton, className), ...props, children: [
3040
- StartIcon && /* @__PURE__ */ jsx36(StartIcon, {}),
3041
- /* @__PURE__ */ jsx36("span", { children }),
3042
- EndIcon && /* @__PURE__ */ jsx36(EndIcon, {})
3050
+ return /* @__PURE__ */ jsxs23("div", { className: clsx21(styles28.feedback, styles28[variant], className), children: [
3051
+ Icon && /* @__PURE__ */ jsx36(Icon, {}),
3052
+ /* @__PURE__ */ jsx36("h2", { children: title }),
3053
+ /* @__PURE__ */ jsx36("p", { children: message })
3043
3054
  ] });
3044
3055
  };
3045
3056