@sustaina/shared-ui 1.15.0 → 1.17.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.js CHANGED
@@ -887,7 +887,7 @@ function SelectTrigger({
887
887
  "data-slot": "select-trigger",
888
888
  "data-size": size,
889
889
  className: cn(
890
- "border-input data-[placeholder]:text-gray-00 [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[state=open]:border-ring data-[state=open]:[&_svg]:text-foreground",
890
+ "border-input data-placeholder:text-gray-00 [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[state=open]:border-ring data-[state=open]:[&_svg]:text-foreground",
891
891
  className
892
892
  ),
893
893
  ...props,
@@ -909,7 +909,7 @@ function SelectContent({
909
909
  {
910
910
  "data-slot": "select-content",
911
911
  className: cn(
912
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
912
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
913
913
  position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
914
914
  className
915
915
  ),
@@ -922,7 +922,7 @@ function SelectContent({
922
922
  {
923
923
  className: cn(
924
924
  "m-1",
925
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
925
+ position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"
926
926
  ),
927
927
  children
928
928
  }
@@ -952,7 +952,7 @@ function SelectItem({
952
952
  {
953
953
  "data-slot": "select-item",
954
954
  className: cn(
955
- "hover:bg-[#EAF5EE] hover:text-[#379A2A] [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 ",
955
+ "hover:bg-[#EAF5EE] hover:text-[#379A2A] [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 ",
956
956
  className
957
957
  ),
958
958
  ...props,
@@ -4948,127 +4948,130 @@ function Button2({
4948
4948
  }
4949
4949
 
4950
4950
  // src/components/dialog-alert/lib/constants.ts
4951
- var DIALOG_ALERT_I18N_NAMESPACE = "dialog_alert";
4951
+ var DIALOG_ALERT_I18N_SUBNAMESPACE = "dialog_alert";
4952
+ var i18nPrefix = `translation:${DIALOG_ALERT_I18N_SUBNAMESPACE}.`;
4952
4953
 
4953
4954
  // src/components/dialog-alert/locale/default.ts
4954
4955
  var defaultResource = {
4955
4956
  sharedui: {
4956
- [DIALOG_ALERT_I18N_NAMESPACE]: {
4957
- cancel: "Cancel",
4958
- close: "Close",
4959
- "success.saved": {
4960
- title: "Successfully",
4961
- description: "Data has been successfully saved"
4962
- },
4963
- "success.deleted": {
4964
- title: "Successfully",
4965
- description: "Data has been successfully deleted"
4966
- },
4967
- "success.removed": {
4968
- title: "Successfully",
4969
- description: "Data has been successfully removed"
4970
- },
4971
- "error.api_db_error": {
4972
- title: "API/Database Error",
4973
- description: "Failed to connect to the system. Please check API or database connection."
4974
- },
4975
- "error.permission_denied": {
4976
- title: "Permission Denied",
4977
- description: "You do not have permission to delete this data.",
4978
- confirm_text: "Discard"
4979
- },
4980
- "error.session_expired": {
4981
- title: "Session Expired",
4982
- description: "Your session has expired or you have been logged out. Please sign in again.",
4983
- confirm_text: "Logout"
4984
- },
4985
- "error.user_not_found": {
4986
- title: "User Not Found",
4987
- description: "The system could not locate the user account.",
4988
- confirm_text: "Logout"
4989
- },
4990
- "error.data_not_found": {
4991
- title: "Data Not Found",
4992
- description: "The data has already been deleted or does not exist in the system."
4993
- },
4994
- "error.data_restrict_editing": {
4995
- title: "Data Status Restricts Editing",
4996
- description: "Data status does not allow editing."
4997
- },
4998
- "error.network_timeout_error": {
4999
- title: "Network Error / Timeout",
5000
- description: "The system could not connect to the network or the request took too long to process."
5001
- },
5002
- "error.queue_full": {
5003
- title: "Queue Full",
5004
- description: "The notification queue has reached its limit. Please try again later."
5005
- },
5006
- "error.invalid_data_format": {
5007
- title: "Invalid Data Format",
5008
- description: "Data creation failed due to invalid or incorrectly formatted data."
5009
- },
5010
- "error.data_linked_to_system_data": {
5011
- title: "Data Linked to System Data",
5012
- description: "Cannot delete data because they are linked to existing system data."
5013
- },
5014
- "error.pending_workflow_conflict": {
5015
- title: "Pending Workflow Conflict ",
5016
- description: "The data is currently involved in a pending workflow or approval process and cannot be deactivated."
5017
- },
5018
- "error.invalid_incomplete_data": {
5019
- title: "Invalid or Incomplete Data",
5020
- description: "Data status cannot be changed due to incomplete or invalid information."
5021
- },
5022
- "error.client_side_error": {
5023
- title: "Client-Side Error",
5024
- description: "An error occurred on the client side. Please refresh the page or try again."
5025
- },
5026
- "error.system_limitation": {
5027
- title: "System Limitation",
5028
- description: "The search cannot be completed due to system limitations. Please simplify your query."
5029
- },
5030
- "error.timeout": {
5031
- title: "Timeout",
5032
- description: "Request failed due to a system error or timeout. Please try again."
5033
- },
5034
- "error.duplicate_data": {
5035
- title: "Duplicate Data",
5036
- description: "The data you entered already exists in the system."
5037
- },
5038
- "error.something_went_wrong": {
5039
- title: "Something Went Wrong",
5040
- description: "An unknown error occurred."
5041
- },
5042
- "confirm.delete": {
5043
- title: "Confirmation",
5044
- description: "Are you sure you want to delete this item?",
5045
- confirm_text: "Delete"
5046
- },
5047
- "confirm.inactive": {
5048
- title: "Confirmation",
5049
- description: "Are you sure you want to inactive this item?",
5050
- confirm_text: "Inactive"
5051
- },
5052
- "confirm.active": {
5053
- variant: "confirm-green",
5054
- title: "Confirmation",
5055
- description: "Are you sure you want to active this item?",
5056
- confirm_text: "Active"
5057
- },
5058
- "confirm.leave_page": {
5059
- title: "Confirmation",
5060
- description: "Unsaved changes. Do you want to leave this page?",
5061
- confirm_text: "Leave"
5062
- },
5063
- "confirm.remove": {
5064
- title: "Confirmation",
5065
- description: "Are you sure you want to remove this item?",
5066
- confirm_text: "Remove"
5067
- },
5068
- "confirm.logout": {
5069
- title: "Confirmation",
5070
- description: "Do you want to log out?",
5071
- confirm_text: "Logout"
4957
+ translation: {
4958
+ [DIALOG_ALERT_I18N_SUBNAMESPACE]: {
4959
+ cancel: "Cancel",
4960
+ close: "Close",
4961
+ "success.saved": {
4962
+ title: "Successfully",
4963
+ description: "Data has been successfully saved"
4964
+ },
4965
+ "success.deleted": {
4966
+ title: "Successfully",
4967
+ description: "Data has been successfully deleted"
4968
+ },
4969
+ "success.removed": {
4970
+ title: "Successfully",
4971
+ description: "Data has been successfully removed"
4972
+ },
4973
+ "error.api_db_error": {
4974
+ title: "API/Database Error",
4975
+ description: "Failed to connect to the system. Please check API or database connection."
4976
+ },
4977
+ "error.permission_denied": {
4978
+ title: "Permission Denied",
4979
+ description: "You do not have permission to delete this data.",
4980
+ confirm_text: "Discard"
4981
+ },
4982
+ "error.session_expired": {
4983
+ title: "Session Expired",
4984
+ description: "Your session has expired or you have been logged out. Please sign in again.",
4985
+ confirm_text: "Logout"
4986
+ },
4987
+ "error.user_not_found": {
4988
+ title: "User Not Found",
4989
+ description: "The system could not locate the user account.",
4990
+ confirm_text: "Logout"
4991
+ },
4992
+ "error.data_not_found": {
4993
+ title: "Data Not Found",
4994
+ description: "The data has already been deleted or does not exist in the system."
4995
+ },
4996
+ "error.data_restrict_editing": {
4997
+ title: "Data Status Restricts Editing",
4998
+ description: "Data status does not allow editing."
4999
+ },
5000
+ "error.network_timeout_error": {
5001
+ title: "Network Error / Timeout",
5002
+ description: "The system could not connect to the network or the request took too long to process."
5003
+ },
5004
+ "error.queue_full": {
5005
+ title: "Queue Full",
5006
+ description: "The notification queue has reached its limit. Please try again later."
5007
+ },
5008
+ "error.invalid_data_format": {
5009
+ title: "Invalid Data Format",
5010
+ description: "Data creation failed due to invalid or incorrectly formatted data."
5011
+ },
5012
+ "error.data_linked_to_system_data": {
5013
+ title: "Data Linked to System Data",
5014
+ description: "Cannot delete data because they are linked to existing system data."
5015
+ },
5016
+ "error.pending_workflow_conflict": {
5017
+ title: "Pending Workflow Conflict ",
5018
+ description: "The data is currently involved in a pending workflow or approval process and cannot be deactivated."
5019
+ },
5020
+ "error.invalid_incomplete_data": {
5021
+ title: "Invalid or Incomplete Data",
5022
+ description: "Data status cannot be changed due to incomplete or invalid information."
5023
+ },
5024
+ "error.client_side_error": {
5025
+ title: "Client-Side Error",
5026
+ description: "An error occurred on the client side. Please refresh the page or try again."
5027
+ },
5028
+ "error.system_limitation": {
5029
+ title: "System Limitation",
5030
+ description: "The search cannot be completed due to system limitations. Please simplify your query."
5031
+ },
5032
+ "error.timeout": {
5033
+ title: "Timeout",
5034
+ description: "Request failed due to a system error or timeout. Please try again."
5035
+ },
5036
+ "error.duplicate_data": {
5037
+ title: "Duplicate Data",
5038
+ description: "The data you entered already exists in the system."
5039
+ },
5040
+ "error.something_went_wrong": {
5041
+ title: "Something Went Wrong",
5042
+ description: "An unknown error occurred."
5043
+ },
5044
+ "confirm.delete": {
5045
+ title: "Confirmation",
5046
+ description: "Are you sure you want to delete this item?",
5047
+ confirm_text: "Delete"
5048
+ },
5049
+ "confirm.inactive": {
5050
+ title: "Confirmation",
5051
+ description: "Are you sure you want to inactive this item?",
5052
+ confirm_text: "Inactive"
5053
+ },
5054
+ "confirm.active": {
5055
+ variant: "confirm-green",
5056
+ title: "Confirmation",
5057
+ description: "Are you sure you want to active this item?",
5058
+ confirm_text: "Active"
5059
+ },
5060
+ "confirm.leave_page": {
5061
+ title: "Confirmation",
5062
+ description: "Unsaved changes. Do you want to leave this page?",
5063
+ confirm_text: "Leave"
5064
+ },
5065
+ "confirm.remove": {
5066
+ title: "Confirmation",
5067
+ description: "Are you sure you want to remove this item?",
5068
+ confirm_text: "Remove"
5069
+ },
5070
+ "confirm.logout": {
5071
+ title: "Confirmation",
5072
+ description: "Do you want to log out?",
5073
+ confirm_text: "Logout"
5074
+ }
5072
5075
  }
5073
5076
  }
5074
5077
  }
@@ -5079,7 +5082,7 @@ i18n__default.default.use(reactI18next.initReactI18next).init({
5079
5082
  resources: defaultResource,
5080
5083
  lng: "sharedui",
5081
5084
  fallbackLng: "sharedui",
5082
- defaultNS: DIALOG_ALERT_I18N_NAMESPACE,
5085
+ defaultNS: "translation",
5083
5086
  interpolation: {
5084
5087
  escapeValue: false
5085
5088
  // react already safes from xss
@@ -5110,7 +5113,7 @@ function DialogAlert({
5110
5113
  persistent = false
5111
5114
  }) {
5112
5115
  const alignClass = align === "start" ? "justify-start" : align === "end" ? "justify-end" : "justify-center";
5113
- const { t } = reactI18next.useTranslation(DIALOG_ALERT_I18N_NAMESPACE);
5116
+ const { t } = reactI18next.useTranslation();
5114
5117
  const handleCancel = React4.useCallback(() => {
5115
5118
  onCancel?.();
5116
5119
  onOpenChange(false);
@@ -5305,6 +5308,10 @@ var useDialogAlertStore = zustand.create((set, get) => ({
5305
5308
  let templateVal;
5306
5309
  if (payload?.template) {
5307
5310
  templateVal = getDialogTemplates({ setOpen: get().setOpen })[payload.template];
5311
+ templateVal.title = templateVal.title ? i18nPrefix + templateVal.title : void 0;
5312
+ templateVal.description = templateVal.description ? i18nPrefix + templateVal.description : void 0;
5313
+ templateVal.confirmText = templateVal.confirmText ? i18nPrefix + templateVal.confirmText : void 0;
5314
+ templateVal.cancelText = templateVal.cancelText ? i18nPrefix + templateVal.cancelText : void 0;
5308
5315
  }
5309
5316
  get().setDialogProps({ ...templateVal, ...payload?.props });
5310
5317
  get().setOpen(true);
@@ -5322,17 +5329,16 @@ var DialogAlertProvider = ({ children, i18nResource, i18nLang }) => {
5322
5329
  i18n_default.changeLanguage("sharedui");
5323
5330
  return;
5324
5331
  }
5325
- const langs = Object.keys(i18nResource);
5326
- for (const lang of langs) {
5327
- i18n_default.addResourceBundle(
5328
- lang,
5329
- DIALOG_ALERT_I18N_NAMESPACE,
5330
- i18nResource[lang][DIALOG_ALERT_I18N_NAMESPACE],
5331
- false,
5332
- true
5333
- );
5332
+ try {
5333
+ const langs = Object.keys(i18nResource);
5334
+ for (const lang of langs) {
5335
+ i18n_default.addResourceBundle(lang, "translation", i18nResource[lang]["translation"], false, true);
5336
+ }
5337
+ i18n_default.changeLanguage(i18nLang);
5338
+ } catch {
5339
+ i18n_default.changeLanguage("sharedui");
5340
+ return;
5334
5341
  }
5335
- i18n_default.changeLanguage(i18nLang);
5336
5342
  }, [i18nLang, i18nResource]);
5337
5343
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5338
5344
  children,
@@ -5775,6 +5781,233 @@ var useGridSettingsStore = zustand.create(
5775
5781
  })
5776
5782
  );
5777
5783
  var useGridSettingsStore_default = useGridSettingsStore;
5784
+ function LoadingOverlay({
5785
+ className,
5786
+ fullscreen = true,
5787
+ spinnerClassName,
5788
+ ...props
5789
+ }) {
5790
+ return /* @__PURE__ */ jsxRuntime.jsx(
5791
+ "div",
5792
+ {
5793
+ "data-slot": "loading-overlay",
5794
+ className: cn(
5795
+ fullscreen ? "fixed z-100" : "absolute z-10",
5796
+ "inset-0 flex items-center justify-center transition-opacity duration-300",
5797
+ className
5798
+ ),
5799
+ ...props,
5800
+ children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { className: cn("size-50", spinnerClassName) })
5801
+ }
5802
+ );
5803
+ }
5804
+ var DEVICE_SIZES = [320, 420, 640, 768, 1024, 1280, 1536, 1920];
5805
+ var IMAGE_SIZES = [16, 32, 48, 64, 96, 128, 256, 384];
5806
+ var defaultLoader = ({ src }) => src;
5807
+ function toNumber(value) {
5808
+ if (typeof value === "number") {
5809
+ return Number.isFinite(value) ? value : void 0;
5810
+ }
5811
+ if (typeof value === "string") {
5812
+ const parsed = parseInt(value, 10);
5813
+ return Number.isFinite(parsed) ? parsed : void 0;
5814
+ }
5815
+ return void 0;
5816
+ }
5817
+ function formatDimension(value) {
5818
+ if (typeof value === "number") {
5819
+ return `${value}px`;
5820
+ }
5821
+ return value;
5822
+ }
5823
+ function matchClosestSize(target) {
5824
+ for (const size of IMAGE_SIZES) {
5825
+ if (size >= target) {
5826
+ return size;
5827
+ }
5828
+ }
5829
+ return DEVICE_SIZES[DEVICE_SIZES.length - 1];
5830
+ }
5831
+ function getCandidateWidths({
5832
+ width,
5833
+ sizes,
5834
+ fill
5835
+ }) {
5836
+ if (fill || sizes) {
5837
+ return DEVICE_SIZES;
5838
+ }
5839
+ if (typeof width === "number" && width > 0) {
5840
+ const targets = /* @__PURE__ */ new Set([width, width * 2]);
5841
+ return Array.from(targets).map((target) => matchClosestSize(target)).sort((a, b) => a - b);
5842
+ }
5843
+ return DEVICE_SIZES;
5844
+ }
5845
+ var Image2 = React4__namespace.forwardRef(function Image3({
5846
+ src,
5847
+ alt,
5848
+ width,
5849
+ height,
5850
+ fill = false,
5851
+ sizes,
5852
+ quality = 75,
5853
+ priority = false,
5854
+ placeholder: placeholder2 = "empty",
5855
+ blurDataURL,
5856
+ loader = defaultLoader,
5857
+ unoptimized = false,
5858
+ wrapperClassName,
5859
+ className,
5860
+ objectFit,
5861
+ objectPosition,
5862
+ onLoadingComplete,
5863
+ style,
5864
+ ...imgProps
5865
+ }, ref) {
5866
+ const {
5867
+ loading: loadingProp,
5868
+ fetchPriority: fetchPriorityProp,
5869
+ decoding: decodingProp,
5870
+ onLoad: onLoadProp,
5871
+ ...restImgProps
5872
+ } = imgProps;
5873
+ const widthNumber = toNumber(width);
5874
+ const heightNumber = toNumber(height);
5875
+ React4__namespace.useEffect(() => {
5876
+ if (!fill && (!widthNumber || !heightNumber)) {
5877
+ console.warn(
5878
+ "[Image] When `fill` is false you should provide both `width` and `height` to prevent layout shifts."
5879
+ );
5880
+ }
5881
+ }, [fill, heightNumber, widthNumber]);
5882
+ const candidateWidths = React4__namespace.useMemo(
5883
+ () => getCandidateWidths({ width: widthNumber, sizes, fill }),
5884
+ [fill, sizes, widthNumber]
5885
+ );
5886
+ const largestWidth = candidateWidths[candidateWidths.length - 1] ?? widthNumber ?? DEVICE_SIZES[DEVICE_SIZES.length - 1];
5887
+ const computedSrc = React4__namespace.useMemo(() => {
5888
+ if (unoptimized) {
5889
+ return src;
5890
+ }
5891
+ return loader({ src, width: largestWidth, quality });
5892
+ }, [largestWidth, loader, quality, src, unoptimized]);
5893
+ const computedSrcSet = React4__namespace.useMemo(() => {
5894
+ if (unoptimized) {
5895
+ return void 0;
5896
+ }
5897
+ return candidateWidths.map((currentWidth) => `${loader({ src, width: currentWidth, quality })} ${currentWidth}w`).join(", ");
5898
+ }, [candidateWidths, loader, quality, src, unoptimized]);
5899
+ const sizesValue = sizes ?? (fill ? "100vw" : widthNumber ? `${widthNumber}px` : void 0);
5900
+ const [isLoaded, setIsLoaded] = React4__namespace.useState(false);
5901
+ const internalRef = React4__namespace.useRef(null);
5902
+ const setRefs = React4__namespace.useCallback(
5903
+ (node) => {
5904
+ internalRef.current = node;
5905
+ if (!ref) {
5906
+ return;
5907
+ }
5908
+ if (typeof ref === "function") {
5909
+ ref(node);
5910
+ } else {
5911
+ ref.current = node;
5912
+ }
5913
+ },
5914
+ [ref]
5915
+ );
5916
+ React4__namespace.useEffect(() => {
5917
+ const image = internalRef.current;
5918
+ if (!image) {
5919
+ return;
5920
+ }
5921
+ if (image.complete && image.naturalWidth > 0) {
5922
+ setIsLoaded(true);
5923
+ onLoadingComplete?.(image);
5924
+ } else {
5925
+ setIsLoaded(false);
5926
+ }
5927
+ }, [onLoadingComplete, src]);
5928
+ const handleLoad = React4__namespace.useCallback(
5929
+ (event) => {
5930
+ setIsLoaded(true);
5931
+ onLoadProp?.(event);
5932
+ onLoadingComplete?.(event.currentTarget);
5933
+ },
5934
+ [onLoadProp, onLoadingComplete]
5935
+ );
5936
+ const loading = priority ? "eager" : loadingProp ?? "lazy";
5937
+ const fetchPriority = priority ? "high" : fetchPriorityProp;
5938
+ const decoding = decodingProp ?? "async";
5939
+ const resolvedObjectFit = objectFit ?? (fill ? "cover" : void 0);
5940
+ const wrapperStyle = React4__namespace.useMemo(
5941
+ () => ({
5942
+ position: "relative",
5943
+ display: fill ? "block" : "inline-block",
5944
+ overflow: "hidden",
5945
+ width: fill ? "100%" : formatDimension(width) ?? void 0,
5946
+ height: fill ? "100%" : formatDimension(height) ?? void 0
5947
+ }),
5948
+ [fill, height, width]
5949
+ );
5950
+ const imageStyle = React4__namespace.useMemo(
5951
+ () => ({
5952
+ width: fill ? "100%" : formatDimension(width) ?? void 0,
5953
+ height: fill ? "100%" : formatDimension(height) ?? void 0,
5954
+ position: fill ? "absolute" : void 0,
5955
+ inset: fill ? 0 : void 0,
5956
+ objectFit: resolvedObjectFit,
5957
+ objectPosition,
5958
+ ...style
5959
+ }),
5960
+ [fill, height, objectPosition, resolvedObjectFit, style, width]
5961
+ );
5962
+ const shouldShowLoadingOverlay = placeholder2 === "blur";
5963
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5964
+ "span",
5965
+ {
5966
+ "data-slot": "image",
5967
+ className: cn("relative overflow-hidden", fill ? "block" : "inline-block", wrapperClassName),
5968
+ style: wrapperStyle,
5969
+ children: [
5970
+ shouldShowLoadingOverlay && /* @__PURE__ */ jsxRuntime.jsx(
5971
+ LoadingOverlay,
5972
+ {
5973
+ "aria-hidden": true,
5974
+ fullscreen: false,
5975
+ spinnerClassName: "size-6",
5976
+ className: cn(
5977
+ // "bg-white/75!",
5978
+ isLoaded ? "opacity-0 pointer-events-none" : "opacity-100"
5979
+ )
5980
+ }
5981
+ ),
5982
+ /* @__PURE__ */ jsxRuntime.jsx(
5983
+ "img",
5984
+ {
5985
+ ref: setRefs,
5986
+ className: cn(
5987
+ "block transition-opacity duration-300",
5988
+ fill && "absolute inset-0 size-full",
5989
+ shouldShowLoadingOverlay && !isLoaded ? "opacity-0" : "opacity-100",
5990
+ className
5991
+ ),
5992
+ src: computedSrc,
5993
+ srcSet: computedSrcSet,
5994
+ sizes: sizesValue,
5995
+ width: fill ? void 0 : widthNumber,
5996
+ height: fill ? void 0 : heightNumber,
5997
+ alt,
5998
+ loading,
5999
+ fetchPriority,
6000
+ decoding,
6001
+ onLoad: handleLoad,
6002
+ style: imageStyle,
6003
+ ...restImgProps
6004
+ }
6005
+ )
6006
+ ]
6007
+ }
6008
+ );
6009
+ });
6010
+ Image2.displayName = "Image";
5778
6011
  var ListTable = ({ onTableReady, children }) => {
5779
6012
  React4__namespace.useEffect(() => {
5780
6013
  if (onTableReady) {
@@ -8496,7 +8729,7 @@ exports.CollapsibleContent = CollapsibleContent2;
8496
8729
  exports.CollapsibleTrigger = CollapsibleTrigger2;
8497
8730
  exports.CropperModal = CropperModal;
8498
8731
  exports.CropperModalError = CropperModalError;
8499
- exports.DIALOG_ALERT_I18N_NAMESPACE = DIALOG_ALERT_I18N_NAMESPACE;
8732
+ exports.DIALOG_ALERT_I18N_SUBNAMESPACE = DIALOG_ALERT_I18N_SUBNAMESPACE;
8500
8733
  exports.DataTable = DataTable_default;
8501
8734
  exports.DatePicker = DatePicker2;
8502
8735
  exports.Dialog = Dialog;
@@ -8521,6 +8754,7 @@ exports.FormLabel = FormLabel;
8521
8754
  exports.FormMessage = FormMessage;
8522
8755
  exports.GridSettingsModal = GridSettingsModal_default;
8523
8756
  exports.HeaderCell = HeaderCell_default;
8757
+ exports.Image = Image2;
8524
8758
  exports.Input = Input;
8525
8759
  exports.Label = Label2;
8526
8760
  exports.List = List_default;