@sustaina/shared-ui 1.59.2 → 1.61.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
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import React__default, { forwardRef, isValidElement, useMemo, useRef, useEffect, useCallback, useLayoutEffect, useState, createElement } from 'react';
2
+ import React__default, { forwardRef, memo, isValidElement, useMemo, useRef, useEffect, useCallback, useLayoutEffect, useState, createElement } from 'react';
3
3
  import { useRouter } from '@tanstack/react-router';
4
4
  import { create } from 'zustand';
5
5
  import clsx2, { clsx } from 'clsx';
@@ -18,7 +18,7 @@ import * as LabelPrimitive from '@radix-ui/react-label';
18
18
  import { format, isValid, parse, parseISO, isAfter, compareAsc } from 'date-fns';
19
19
  import * as PopoverPrimitive from '@radix-ui/react-popover';
20
20
  import { Command as Command$1 } from 'cmdk';
21
- import * as SheetPrimitive from '@radix-ui/react-dialog';
21
+ import * as DialogPrimitive2 from '@radix-ui/react-dialog';
22
22
  import { useVirtualizer } from '@tanstack/react-virtual';
23
23
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
24
24
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
@@ -4903,7 +4903,7 @@ var ConditionTextInput = ({ row, control, onClear }) => /* @__PURE__ */ jsx(
4903
4903
  }
4904
4904
  }
4905
4905
  );
4906
- var ConditionNumberInput = ({ row, control, onClear }) => /* @__PURE__ */ jsx(
4906
+ var ConditionNumberInput = ({ row, control, onClear, fieldSchema }) => /* @__PURE__ */ jsx(
4907
4907
  FormField,
4908
4908
  {
4909
4909
  control,
@@ -4923,6 +4923,17 @@ var ConditionNumberInput = ({ row, control, onClear }) => /* @__PURE__ */ jsx(
4923
4923
  value: field.value ?? "",
4924
4924
  autoComplete: "off",
4925
4925
  inputMode: "numeric",
4926
+ min: fieldSchema?.min,
4927
+ max: fieldSchema?.max,
4928
+ onKeyDown: (e) => {
4929
+ const blocked = ["e", "E"];
4930
+ if (fieldSchema?.min !== void 0 && fieldSchema.min >= 0) {
4931
+ blocked.push("-");
4932
+ }
4933
+ if (blocked.includes(e.key)) {
4934
+ e.preventDefault();
4935
+ }
4936
+ },
4926
4937
  className: "w-full h-9 rounded-md bg-white pr-8 text-sm text-gray-700 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 "
4927
4938
  }
4928
4939
  ) }),
@@ -5472,6 +5483,7 @@ var ConditionDateInput = ({
5472
5483
  onClear,
5473
5484
  shortDateFormat = fallbackShortDateFormat
5474
5485
  }) => {
5486
+ const dateFormat = /D/i.test(shortDateFormat) ? shortDateFormat : fallbackShortDateFormat;
5475
5487
  const isBetween = row.operator === "between";
5476
5488
  const buildAriaLabel = (isEnd) => {
5477
5489
  if (isEnd) return "Select end date";
@@ -5503,11 +5515,11 @@ var ConditionDateInput = ({
5503
5515
  ...field,
5504
5516
  value: field.value || void 0,
5505
5517
  onValueChange: handleValueChange,
5506
- placeholder: shortDateFormat,
5518
+ placeholder: dateFormat,
5507
5519
  ariaLabel: buildAriaLabel(options?.isEnd),
5508
5520
  clearAriaLabel: buildClearLabel(options?.isEnd),
5509
5521
  invalid: Boolean(fieldState.error),
5510
- displayFormatter: (d) => formatISODate(d, shortDateFormat),
5522
+ displayFormatter: (d) => formatISODate(d, dateFormat),
5511
5523
  wrapperClassName: "min-w-0",
5512
5524
  "data-testid": "advsearch-date-value"
5513
5525
  }
@@ -6051,14 +6063,14 @@ var ConditionMonthInput = ({ row, control, onClear }) => {
6051
6063
  return renderPicker(`value_${row.id}`, "value");
6052
6064
  };
6053
6065
  function Dialog({ ...props }) {
6054
- return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "dialog", ...props });
6066
+ return /* @__PURE__ */ jsx(DialogPrimitive2.Root, { "data-slot": "dialog", ...props });
6055
6067
  }
6056
6068
  function DialogPortal({ ...props }) {
6057
- return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
6069
+ return /* @__PURE__ */ jsx(DialogPrimitive2.Portal, { "data-slot": "dialog-portal", ...props });
6058
6070
  }
6059
6071
  function DialogOverlay({ className, ...props }) {
6060
6072
  return /* @__PURE__ */ jsx(
6061
- SheetPrimitive.Overlay,
6073
+ DialogPrimitive2.Overlay,
6062
6074
  {
6063
6075
  "data-slot": "dialog-overlay",
6064
6076
  className: cn(
@@ -6078,7 +6090,7 @@ function DialogContent({
6078
6090
  return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
6079
6091
  /* @__PURE__ */ jsx(DialogOverlay, {}),
6080
6092
  /* @__PURE__ */ jsxs(
6081
- SheetPrimitive.Content,
6093
+ DialogPrimitive2.Content,
6082
6094
  {
6083
6095
  "data-slot": "dialog-content",
6084
6096
  className: cn(
@@ -6089,7 +6101,7 @@ function DialogContent({
6089
6101
  children: [
6090
6102
  children,
6091
6103
  showCloseButton && /* @__PURE__ */ jsxs(
6092
- SheetPrimitive.Close,
6104
+ DialogPrimitive2.Close,
6093
6105
  {
6094
6106
  "data-slot": "dialog-close",
6095
6107
  className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
@@ -6116,7 +6128,7 @@ function DialogHeader({ className, ...props }) {
6116
6128
  }
6117
6129
  function DialogTitle({ className, ...props }) {
6118
6130
  return /* @__PURE__ */ jsx(
6119
- SheetPrimitive.Title,
6131
+ DialogPrimitive2.Title,
6120
6132
  {
6121
6133
  "data-slot": "dialog-title",
6122
6134
  className: cn("text-lg leading-none font-semibold", className),
@@ -6129,7 +6141,7 @@ function DialogDescription({
6129
6141
  ...props
6130
6142
  }) {
6131
6143
  return /* @__PURE__ */ jsx(
6132
- SheetPrimitive.Description,
6144
+ DialogPrimitive2.Description,
6133
6145
  {
6134
6146
  "data-slot": "dialog-description",
6135
6147
  className: cn("text-muted-foreground text-sm", className),
@@ -7863,7 +7875,15 @@ var ConditionValue = ({
7863
7875
  }
7864
7876
  switch (fieldType) {
7865
7877
  case "number":
7866
- return /* @__PURE__ */ jsx(ConditionNumberInput, { row, control, onClear: onClearValue });
7878
+ return /* @__PURE__ */ jsx(
7879
+ ConditionNumberInput,
7880
+ {
7881
+ row,
7882
+ control,
7883
+ onClear: onClearValue,
7884
+ fieldSchema
7885
+ }
7886
+ );
7867
7887
  case "date":
7868
7888
  case "datetime":
7869
7889
  return /* @__PURE__ */ jsx(
@@ -8515,7 +8535,7 @@ var validateByFieldType = (value, fieldType) => {
8515
8535
  return { valid: true };
8516
8536
  }
8517
8537
  if (numericTypes.includes(fieldType)) {
8518
- if (!/^\d+(\.\d+)?$/.test(value)) {
8538
+ if (!/^-?\d+(\.\d+)?$/.test(value)) {
8519
8539
  return { valid: false, message: "Please enter a valid number." };
8520
8540
  }
8521
8541
  }
@@ -9875,17 +9895,17 @@ var DataTable = ({
9875
9895
  };
9876
9896
  var DataTable_default = DataTable;
9877
9897
  function Dialog2(props) {
9878
- return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "dialog", ...props });
9898
+ return /* @__PURE__ */ jsx(DialogPrimitive2.Root, { "data-slot": "dialog", ...props });
9879
9899
  }
9880
9900
  function DialogTrigger(props) {
9881
- return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
9901
+ return /* @__PURE__ */ jsx(DialogPrimitive2.Trigger, { "data-slot": "dialog-trigger", ...props });
9882
9902
  }
9883
9903
  function DialogPortal2(props) {
9884
- return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
9904
+ return /* @__PURE__ */ jsx(DialogPrimitive2.Portal, { "data-slot": "dialog-portal", ...props });
9885
9905
  }
9886
9906
  function DialogOverlay2({ className, ...props }) {
9887
9907
  return /* @__PURE__ */ jsx(
9888
- SheetPrimitive.Overlay,
9908
+ DialogPrimitive2.Overlay,
9889
9909
  {
9890
9910
  "data-slot": "dialog-overlay",
9891
9911
  className: cn(
@@ -9896,7 +9916,7 @@ function DialogOverlay2({ className, ...props }) {
9896
9916
  }
9897
9917
  );
9898
9918
  }
9899
- function DialogHeader2({ className, children, ...props }) {
9919
+ function InternalDialogHeader({ className, children, ...props }) {
9900
9920
  return /* @__PURE__ */ jsxs(
9901
9921
  "div",
9902
9922
  {
@@ -9909,7 +9929,7 @@ function DialogHeader2({ className, children, ...props }) {
9909
9929
  children: [
9910
9930
  /* @__PURE__ */ jsx("div", { className: "text-lg font-semibold", children }),
9911
9931
  /* @__PURE__ */ jsxs(
9912
- SheetPrimitive.Close,
9932
+ DialogPrimitive2.Close,
9913
9933
  {
9914
9934
  "data-slot": "dialog-close",
9915
9935
  className: "absolute right-4 top-4 rounded-xs opacity-80 hover:opacity-100 transition-opacity focus:outline-hidden",
@@ -9933,7 +9953,7 @@ function DialogContent2({
9933
9953
  return /* @__PURE__ */ jsxs(DialogPortal2, { children: [
9934
9954
  showOverlay && /* @__PURE__ */ jsx(DialogOverlay2, {}),
9935
9955
  /* @__PURE__ */ jsxs(
9936
- SheetPrimitive.Content,
9956
+ DialogPrimitive2.Content,
9937
9957
  {
9938
9958
  "data-slot": "dialog-content",
9939
9959
  className: cn(
@@ -9942,7 +9962,7 @@ function DialogContent2({
9942
9962
  ),
9943
9963
  ...props,
9944
9964
  children: [
9945
- header && /* @__PURE__ */ jsx(DialogHeader2, { children: header }),
9965
+ header && /* @__PURE__ */ jsx(InternalDialogHeader, { children: header }),
9946
9966
  /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children })
9947
9967
  ]
9948
9968
  }
@@ -9964,7 +9984,7 @@ function DialogFooter({ className, ...props }) {
9964
9984
  }
9965
9985
  function DialogTitle2({ className, ...props }) {
9966
9986
  return /* @__PURE__ */ jsx(
9967
- SheetPrimitive.Title,
9987
+ DialogPrimitive2.Title,
9968
9988
  {
9969
9989
  "data-slot": "dialog-title",
9970
9990
  className: cn("text-lg font-semibold leading-none", className),
@@ -9977,7 +9997,7 @@ function DialogDescription2({
9977
9997
  ...props
9978
9998
  }) {
9979
9999
  return /* @__PURE__ */ jsx(
9980
- SheetPrimitive.Description,
10000
+ DialogPrimitive2.Description,
9981
10001
  {
9982
10002
  "data-slot": "dialog-description",
9983
10003
  className: cn("text-sm text-muted-foreground", className),
@@ -9985,18 +10005,50 @@ function DialogDescription2({
9985
10005
  }
9986
10006
  );
9987
10007
  }
10008
+ function DialogCloseButton(props) {
10009
+ return /* @__PURE__ */ jsx(
10010
+ "button",
10011
+ {
10012
+ ...props,
10013
+ type: "button",
10014
+ "aria-label": "Close",
10015
+ className: cn("absolute top-4 right-4", props.className),
10016
+ style: {
10017
+ background: "none",
10018
+ border: "none",
10019
+ padding: 0,
10020
+ cursor: "pointer",
10021
+ ...props?.style
10022
+ },
10023
+ children: /* @__PURE__ */ jsx(X, { className: "w-6 h-6 text-white" })
10024
+ }
10025
+ );
10026
+ }
10027
+ function DialogClose({ ...props }) {
10028
+ return /* @__PURE__ */ jsx(DialogPrimitive2.Close, { "data-slot": "dialog-close", ...props });
10029
+ }
10030
+ function DialogHeader2({ className, ...props }) {
10031
+ return /* @__PURE__ */ jsx(
10032
+ "div",
10033
+ {
10034
+ "data-slot": "dialog-header",
10035
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
10036
+ ...props
10037
+ }
10038
+ );
10039
+ }
9988
10040
  function cn2(...inputs) {
9989
10041
  return twMerge(clsx(inputs));
9990
10042
  }
9991
10043
  function Dialog3({ ...props }) {
9992
- return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "dialog", ...props });
10044
+ return /* @__PURE__ */ jsx(DialogPrimitive2.Root, { "data-slot": "dialog", ...props });
9993
10045
  }
9994
10046
  function DialogPortal3({ ...props }) {
9995
- return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
10047
+ return /* @__PURE__ */ jsx(DialogPrimitive2.Portal, { "data-slot": "dialog-portal", ...props });
9996
10048
  }
9997
10049
  function DialogOverlay3({ className, ...props }) {
9998
10050
  return /* @__PURE__ */ jsx(
9999
- SheetPrimitive.Overlay,
10051
+ DialogPrimitive2.Overlay,
10000
10052
  {
10001
10053
  "data-slot": "dialog-overlay",
10002
10054
  className: cn2(
@@ -10016,7 +10068,7 @@ function DialogContent3({
10016
10068
  return /* @__PURE__ */ jsxs(DialogPortal3, { "data-slot": "dialog-portal", children: [
10017
10069
  /* @__PURE__ */ jsx(DialogOverlay3, { className: "z-99" }),
10018
10070
  /* @__PURE__ */ jsxs(
10019
- SheetPrimitive.Content,
10071
+ DialogPrimitive2.Content,
10020
10072
  {
10021
10073
  "data-slot": "dialog-content",
10022
10074
  className: cn2(
@@ -10027,7 +10079,7 @@ function DialogContent3({
10027
10079
  children: [
10028
10080
  children,
10029
10081
  showCloseButton && /* @__PURE__ */ jsxs(
10030
- SheetPrimitive.Close,
10082
+ DialogPrimitive2.Close,
10031
10083
  {
10032
10084
  "data-slot": "dialog-close",
10033
10085
  className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
@@ -10054,7 +10106,7 @@ function DialogHeader3({ className, ...props }) {
10054
10106
  }
10055
10107
  function DialogTitle3({ className, ...props }) {
10056
10108
  return /* @__PURE__ */ jsx(
10057
- SheetPrimitive.Title,
10109
+ DialogPrimitive2.Title,
10058
10110
  {
10059
10111
  "data-slot": "dialog-title",
10060
10112
  className: cn2("text-lg leading-none font-semibold", className),
@@ -10067,7 +10119,7 @@ function DialogDescription3({
10067
10119
  ...props
10068
10120
  }) {
10069
10121
  return /* @__PURE__ */ jsx(
10070
- SheetPrimitive.Description,
10122
+ DialogPrimitive2.Description,
10071
10123
  {
10072
10124
  "data-slot": "dialog-description",
10073
10125
  className: cn2("text-muted-foreground text-sm", className),
@@ -11340,9 +11392,12 @@ __export(ui_exports, {
11340
11392
  CollapsibleTrigger: () => CollapsibleTrigger2,
11341
11393
  DatePicker: () => DatePicker,
11342
11394
  Dialog: () => Dialog2,
11395
+ DialogClose: () => DialogClose,
11396
+ DialogCloseButton: () => DialogCloseButton,
11343
11397
  DialogContent: () => DialogContent2,
11344
11398
  DialogDescription: () => DialogDescription2,
11345
11399
  DialogFooter: () => DialogFooter,
11400
+ DialogHeader: () => DialogHeader2,
11346
11401
  DialogTitle: () => DialogTitle2,
11347
11402
  DialogTrigger: () => DialogTrigger,
11348
11403
  DropdownMenu: () => DropdownMenu,
@@ -11789,20 +11844,20 @@ function Separator3({
11789
11844
  );
11790
11845
  }
11791
11846
  function Sheet({ ...props }) {
11792
- return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
11847
+ return /* @__PURE__ */ jsx(DialogPrimitive2.Root, { "data-slot": "sheet", ...props });
11793
11848
  }
11794
11849
  function SheetTrigger({ ...props }) {
11795
- return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
11850
+ return /* @__PURE__ */ jsx(DialogPrimitive2.Trigger, { "data-slot": "sheet-trigger", ...props });
11796
11851
  }
11797
11852
  function SheetClose({ ...props }) {
11798
- return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
11853
+ return /* @__PURE__ */ jsx(DialogPrimitive2.Close, { "data-slot": "sheet-close", ...props });
11799
11854
  }
11800
11855
  function SheetPortal({ ...props }) {
11801
- return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
11856
+ return /* @__PURE__ */ jsx(DialogPrimitive2.Portal, { "data-slot": "sheet-portal", ...props });
11802
11857
  }
11803
11858
  function SheetOverlay({ className, ...props }) {
11804
11859
  return /* @__PURE__ */ jsx(
11805
- SheetPrimitive.Overlay,
11860
+ DialogPrimitive2.Overlay,
11806
11861
  {
11807
11862
  "data-slot": "sheet-overlay",
11808
11863
  className: cn(
@@ -11822,7 +11877,7 @@ function SheetContent({
11822
11877
  return /* @__PURE__ */ jsxs(SheetPortal, { children: [
11823
11878
  /* @__PURE__ */ jsx(SheetOverlay, {}),
11824
11879
  /* @__PURE__ */ jsxs(
11825
- SheetPrimitive.Content,
11880
+ DialogPrimitive2.Content,
11826
11881
  {
11827
11882
  "data-slot": "sheet-content",
11828
11883
  className: cn(
@@ -11836,7 +11891,7 @@ function SheetContent({
11836
11891
  ...props,
11837
11892
  children: [
11838
11893
  children,
11839
- /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
11894
+ /* @__PURE__ */ jsxs(DialogPrimitive2.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
11840
11895
  /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
11841
11896
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
11842
11897
  ] })
@@ -11860,7 +11915,7 @@ function SheetFooter({ className, ...props }) {
11860
11915
  }
11861
11916
  function SheetTitle({ className, ...props }) {
11862
11917
  return /* @__PURE__ */ jsx(
11863
- SheetPrimitive.Title,
11918
+ DialogPrimitive2.Title,
11864
11919
  {
11865
11920
  "data-slot": "sheet-title",
11866
11921
  className: cn("text-foreground font-semibold", className),
@@ -11873,7 +11928,7 @@ function SheetDescription({
11873
11928
  ...props
11874
11929
  }) {
11875
11930
  return /* @__PURE__ */ jsx(
11876
- SheetPrimitive.Description,
11931
+ DialogPrimitive2.Description,
11877
11932
  {
11878
11933
  "data-slot": "sheet-description",
11879
11934
  className: cn("text-muted-foreground text-sm", className),
@@ -17527,6 +17582,104 @@ var ActionDropdown = ({
17527
17582
  ] });
17528
17583
  };
17529
17584
  var dropdownMenu_default = ActionDropdown;
17585
+ var sizeMap = {
17586
+ sm: "h-1",
17587
+ md: "h-2",
17588
+ lg: "h-3"
17589
+ };
17590
+ var resolveSize = (size) => typeof size === "number" ? { style: { height: size } } : { className: sizeMap[size] };
17591
+ var linecapMap = {
17592
+ round: "rounded-full",
17593
+ butt: "rounded-none",
17594
+ square: "rounded-none"
17595
+ };
17596
+ var alignClassMap = {
17597
+ start: "justify-start",
17598
+ center: "justify-center",
17599
+ end: "justify-end"
17600
+ };
17601
+ var ProgressBar = ({
17602
+ percent = 0,
17603
+ size = "md",
17604
+ showInfo = true,
17605
+ format: format6,
17606
+ precision = 0,
17607
+ success,
17608
+ strokeLinecap = "round",
17609
+ percentPosition = { align: "end", type: "outer" },
17610
+ barClassName,
17611
+ trailClassName,
17612
+ className
17613
+ }) => {
17614
+ const clamped = useMemo(() => Math.min(100, Math.max(0, percent)), [percent]);
17615
+ const displayValue = useMemo(() => parseFloat(clamped.toFixed(precision)), [clamped, precision]);
17616
+ const successClamped = useMemo(
17617
+ () => success ? Math.min(100, Math.max(0, success.percent)) : 0,
17618
+ [success]
17619
+ );
17620
+ const linecapClass = linecapMap[strokeLinecap];
17621
+ const posType = percentPosition?.type ?? "outer";
17622
+ const posAlign = percentPosition?.align ?? "end";
17623
+ const isInner = posType === "inner";
17624
+ const { className: sizeClass, style: sizeStyle } = resolveSize(size);
17625
+ const info = useMemo(() => {
17626
+ if (!showInfo) return null;
17627
+ if (format6) return format6(displayValue);
17628
+ return `${displayValue}%`;
17629
+ }, [showInfo, format6, displayValue]);
17630
+ return /* @__PURE__ */ jsxs(
17631
+ "div",
17632
+ {
17633
+ className: cn(
17634
+ "flex w-full items-center gap-2 min-w-0",
17635
+ posAlign === "start" && !isInner && "flex-row-reverse",
17636
+ className
17637
+ ),
17638
+ children: [
17639
+ /* @__PURE__ */ jsxs(
17640
+ "div",
17641
+ {
17642
+ className: cn(
17643
+ "relative flex-1 overflow-hidden",
17644
+ trailClassName ?? "bg-muted",
17645
+ linecapClass,
17646
+ isInner ? "min-h-4" : sizeClass
17647
+ ),
17648
+ style: isInner ? void 0 : sizeStyle,
17649
+ children: [
17650
+ success && /* @__PURE__ */ jsx(
17651
+ "div",
17652
+ {
17653
+ className: cn(
17654
+ "absolute left-0 top-0 h-full transition-all duration-300",
17655
+ success.className ?? "bg-sus-green-1",
17656
+ linecapClass
17657
+ ),
17658
+ style: { width: `${successClamped}%` }
17659
+ }
17660
+ ),
17661
+ /* @__PURE__ */ jsx(
17662
+ "div",
17663
+ {
17664
+ className: cn(
17665
+ "relative transition-all duration-300",
17666
+ barClassName ?? "bg-sus-primary-green-9",
17667
+ linecapClass,
17668
+ isInner ? cn("min-h-4 flex items-center px-1", alignClassMap[posAlign]) : cn("h-full", sizeClass)
17669
+ ),
17670
+ style: { width: `${clamped}%`, ...!isInner ? sizeStyle : void 0 },
17671
+ children: isInner && info && /* @__PURE__ */ jsx("span", { className: "text-[10px] leading-none text-primary-foreground whitespace-nowrap tabular-nums", children: info })
17672
+ }
17673
+ )
17674
+ ]
17675
+ }
17676
+ ),
17677
+ !isInner && info && /* @__PURE__ */ jsx("span", { className: "text-xs shrink-0 tabular-nums", children: info })
17678
+ ]
17679
+ }
17680
+ );
17681
+ };
17682
+ var ProgressBar_default = memo(ProgressBar);
17530
17683
  var TruncatedMouseEnterDiv = ({
17531
17684
  value,
17532
17685
  className,
@@ -18406,6 +18559,6 @@ function InputMentionInner({
18406
18559
  }
18407
18560
  var InputMention = forwardRef(InputMentionInner);
18408
18561
 
18409
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, dropdownMenu_default as ActionDropdown, ActionMenu, AdministrationIcon, AdvanceSearch_default as AdvanceSearch, AnalyticsIcon, ApplicationLogIcon, ArrowIcon, AuditFooter, BookmarkIcon, BriefcaseBusinessIcon, BuildingIcon, Button, SuiCalendarIcon2 as Calendar2Icon, CalendarDaysIcon, CardIcon, Carousel, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, CarouselThumbnails, Checkbox, CircleUserIcon, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Combobox_default as Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CopyUserRightsIcon, CropperModal, CropperModalError, CustomActionStatusIcon, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, DashboardIcon, DataEntryIcon, DataTable_default as DataTable, DatePicker2 as DatePicker, DecreaseIcon, Dialog2 as Dialog, DialogAlert, DialogAlertProvider, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogTitle2 as DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EllipsisBoxIcon, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, FactoryIcon, FileCogIcon, FileSpreadsheet, FileTextIcon, FiltersIcon, FolderIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, GridSettingsModal_default as GridSettingsModal, HamburgerMenuIcon, HandymanIcon, header_default as Header, HeaderCell_default as HeaderCell, HelpIcon, HomeIcon, HomePlusIcon, Image2 as Image, ImagePlaceholderIcon, InformationIcon, Input, InputMention, InputNumber_default as InputNumber, Label2 as Label, LoadingPage, LookupSelect, MailIcon, MainListContainer_default as MainListContainer, ManIcon, ManagementIcon, MenuIcon, MessageIcon, MessageIconInverse, MessageSquareIcon, MonthPicker2 as MonthPicker, navbar_default as Navbar, NotFoundIcon, OutlineArrowIcon, PlusIcon, PlusSearchIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PowerIcon, PreventPageLeave_default as PreventPageLeave, QuestionIcon, RadioGroupItem, RadioGroupRoot, RadioLabel, RichText, RightPanelContainer_default as RightPanelContainer, RoleIcon, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, SetupIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, SuiCalendarIcon, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, TabSelect, Table, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, TagListViewIcon, TextArea, TimePicker, ToolBoxIcon, Tooltip2 as Tooltip, TooltipArrow, TooltipContent2 as TooltipContent, TooltipProvider2 as TooltipProvider, TooltipTrigger2 as TooltipTrigger, TransferUserRightsIcon, TrashIcon, truncated_default as Truncated, truncatedMouseEnterDiv_default as TruncatedMouseEnterDiv, ui_exports as UI, UserActiveIcon, UserAloneIcon, UserFriendIcon, UserGroupIcon, UserIcon, UserInactiveIcon, UserNameIcon, UserProtectIcon, UsersIcon, VirtualizedCommand_default as VirtualizedCommand, WorkFlowIcon, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useBindRef_default as useBindRef, useCarousel, useControllableState_default as useControllableState, useDraftGuardStore, useFormField, useGridSettingsStore_default as useGridSettingsStore, useHover_default as useHover, useIntersectionObserver_default as useIntersectionObserver, useIsomorphicLayoutEffect, useMediaQuery_default as useMediaQuery, usePreventPageLeave_default as usePreventPageLeave, usePreventPageLeaveStore_default as usePreventPageLeaveStore, useSafeBlocker, useScreenSize_default as useScreenSize, useSidebar, useTruncated_default as useTruncated, validateTokenPrefixes };
18562
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, dropdownMenu_default as ActionDropdown, ActionMenu, AdministrationIcon, AdvanceSearch_default as AdvanceSearch, AnalyticsIcon, ApplicationLogIcon, ArrowIcon, AuditFooter, BookmarkIcon, BriefcaseBusinessIcon, BuildingIcon, Button, SuiCalendarIcon2 as Calendar2Icon, CalendarDaysIcon, CardIcon, Carousel, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, CarouselThumbnails, Checkbox, CircleUserIcon, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Combobox_default as Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CopyUserRightsIcon, CropperModal, CropperModalError, CustomActionStatusIcon, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, DashboardIcon, DataEntryIcon, DataTable_default as DataTable, DatePicker2 as DatePicker, DecreaseIcon, Dialog2 as Dialog, DialogAlert, DialogAlertProvider, DialogClose, DialogCloseButton, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogHeader2 as DialogHeader, DialogTitle2 as DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EllipsisBoxIcon, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, FactoryIcon, FileCogIcon, FileSpreadsheet, FileTextIcon, FiltersIcon, FolderIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, GridSettingsModal_default as GridSettingsModal, HamburgerMenuIcon, HandymanIcon, header_default as Header, HeaderCell_default as HeaderCell, HelpIcon, HomeIcon, HomePlusIcon, Image2 as Image, ImagePlaceholderIcon, InformationIcon, Input, InputMention, InputNumber_default as InputNumber, Label2 as Label, LoadingPage, LookupSelect, MailIcon, MainListContainer_default as MainListContainer, ManIcon, ManagementIcon, MenuIcon, MessageIcon, MessageIconInverse, MessageSquareIcon, MonthPicker2 as MonthPicker, navbar_default as Navbar, NotFoundIcon, OutlineArrowIcon, PlusIcon, PlusSearchIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PowerIcon, PreventPageLeave_default as PreventPageLeave, ProgressBar_default as ProgressBar, QuestionIcon, RadioGroupItem, RadioGroupRoot, RadioLabel, RichText, RightPanelContainer_default as RightPanelContainer, RoleIcon, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, SetupIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, SuiCalendarIcon, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, TabSelect, Table, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, TagListViewIcon, TextArea, TimePicker, ToolBoxIcon, Tooltip2 as Tooltip, TooltipArrow, TooltipContent2 as TooltipContent, TooltipProvider2 as TooltipProvider, TooltipTrigger2 as TooltipTrigger, TransferUserRightsIcon, TrashIcon, truncated_default as Truncated, truncatedMouseEnterDiv_default as TruncatedMouseEnterDiv, ui_exports as UI, UserActiveIcon, UserAloneIcon, UserFriendIcon, UserGroupIcon, UserIcon, UserInactiveIcon, UserNameIcon, UserProtectIcon, UsersIcon, VirtualizedCommand_default as VirtualizedCommand, WorkFlowIcon, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useBindRef_default as useBindRef, useCarousel, useControllableState_default as useControllableState, useDraftGuardStore, useFormField, useGridSettingsStore_default as useGridSettingsStore, useHover_default as useHover, useIntersectionObserver_default as useIntersectionObserver, useIsomorphicLayoutEffect, useMediaQuery_default as useMediaQuery, usePreventPageLeave_default as usePreventPageLeave, usePreventPageLeaveStore_default as usePreventPageLeaveStore, useSafeBlocker, useScreenSize_default as useScreenSize, useSidebar, useTruncated_default as useTruncated, validateTokenPrefixes };
18410
18563
  //# sourceMappingURL=index.mjs.map
18411
18564
  //# sourceMappingURL=index.mjs.map