@exem-ui/react 0.3.4-next.20260819010838 → 0.3.4-next.20260824050435

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.d.mts CHANGED
@@ -813,7 +813,17 @@ type MessageBoxComponent = React__default.FC<MessageBoxRootProps> & {
813
813
  };
814
814
  declare const MessageBox: MessageBoxComponent;
815
815
 
816
- interface LoadingProps extends VariantProps<typeof containerVariants>, VariantProps<typeof spinnerVariants>, Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
816
+ declare const containerVariants: (props?: ({
817
+ position?: "fixed" | "absolute" | null | undefined;
818
+ blockInteraction?: boolean | null | undefined;
819
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
820
+ declare const spinnerSizes: {
821
+ readonly small: 24;
822
+ readonly medium: 36;
823
+ readonly large: 48;
824
+ };
825
+ type LoadingSize = keyof typeof spinnerSizes;
826
+ interface LoadingProps extends VariantProps<typeof containerVariants>, Omit<React__default.ComponentPropsWithRef<'div'>, 'children'> {
817
827
  /**
818
828
  * 로딩 표시 여부
819
829
  * @default true
@@ -829,6 +839,8 @@ interface LoadingProps extends VariantProps<typeof containerVariants>, VariantPr
829
839
  * @default false
830
840
  */
831
841
  blockInteraction?: boolean;
842
+ /** 스피너 크기 */
843
+ size?: LoadingSize;
832
844
  /** 컨테이너 추가 클래스 */
833
845
  containerClassName?: string;
834
846
  /** 오버레이 추가 클래스 */
@@ -836,43 +848,29 @@ interface LoadingProps extends VariantProps<typeof containerVariants>, VariantPr
836
848
  /** 스피너 추가 클래스 */
837
849
  spinnerClassName?: string;
838
850
  }
839
- type LoadingComponent = React__default.ForwardRefExoticComponent<LoadingProps & React__default.RefAttributes<HTMLDivElement>>;
840
- declare const containerVariants: (props?: ({
841
- position?: "fixed" | "absolute" | null | undefined;
842
- blockInteraction?: boolean | null | undefined;
843
- } & class_variance_authority_types.ClassProp) | undefined) => string;
844
- declare const spinnerVariants: (props?: ({
845
- size?: "small" | "medium" | "large" | null | undefined;
846
- } & class_variance_authority_types.ClassProp) | undefined) => string;
847
851
  /**
848
852
  * 비동기 작업 중 로딩 상태를 표시하는 오버레이 컴포넌트입니다.
849
853
  *
850
854
  * @example
851
855
  * ```tsx
852
- * // 기본 사용 (전체 화면 고정)
853
856
  * <Loading isLoading />
854
- *
855
- * // 특정 영역 내 로딩 (absolute 위치)
856
- * <div style={{ position: 'relative' }}>
857
- * <Loading isLoading position="absolute" size="small" />
858
- * </div>
857
+ * <Loading isLoading position="absolute" size="small" />
859
858
  * ```
860
- *
861
- * @see {@link LoadingProps} props 상세
862
859
  */
863
- declare const Loading: LoadingComponent;
860
+ declare function Loading({ isLoading, dim, blockInteraction, position, size, containerClassName, overlayClassName, spinnerClassName, className, ref, 'aria-label': ariaLabel, ...props }: LoadingProps): react_jsx_runtime.JSX.Element | null;
861
+ type LoadingComponent = typeof Loading;
864
862
 
865
863
  declare const trackVariants: (props?: ({
866
864
  size?: "small" | "medium" | "large" | null | undefined;
867
865
  } & class_variance_authority_types.ClassProp) | undefined) => string;
868
- interface ProgressProps extends VariantProps<typeof trackVariants>, Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
866
+ interface ProgressProps extends VariantProps<typeof trackVariants>, Omit<React__default.ComponentPropsWithRef<'div'>, 'children'> {
869
867
  /**
870
868
  * 현재 진행 값
871
869
  * @default 0
872
870
  */
873
871
  value?: number;
874
872
  /**
875
- * 최대 값
873
+ * 최대 값. 0 이하면 값이 max로 보정되어 완료 상태가 되므로 양수만 사용합니다.
876
874
  * @default 100
877
875
  */
878
876
  max?: number;
@@ -881,17 +879,9 @@ interface ProgressProps extends VariantProps<typeof trackVariants>, Omit<React__
881
879
  /** 게이지(채움) 추가 클래스 */
882
880
  gaugeClassName?: string;
883
881
  }
884
- type ProgressComponent = React__default.ForwardRefExoticComponent<ProgressProps & React__default.RefAttributes<HTMLDivElement>>;
885
- /**
886
- * 작업 진행률을 시각적으로 표시하는 바 컴포넌트입니다.
887
- *
888
- * @example
889
- * ```tsx
890
- * <Progress value={60} />
891
- * <Progress value={30} max={100} size="large" />
892
- * ```
893
- */
894
- declare const Progress: ProgressComponent;
882
+ /** 작업 진행률을 시각적으로 표시하는 바 컴포넌트입니다. */
883
+ declare function Progress({ value, max, size, trackClassName, gaugeClassName, className, ref, 'aria-label': ariaLabel, 'aria-valuetext': ariaValueText, ...props }: ProgressProps): react_jsx_runtime.JSX.Element;
884
+ type ProgressComponent = typeof Progress;
895
885
 
896
886
  type ToasterRootProps = React$1.ComponentProps<typeof Toaster$1>;
897
887
  type ToasterContainerProps = {
package/dist/index.d.ts CHANGED
@@ -813,7 +813,17 @@ type MessageBoxComponent = React__default.FC<MessageBoxRootProps> & {
813
813
  };
814
814
  declare const MessageBox: MessageBoxComponent;
815
815
 
816
- interface LoadingProps extends VariantProps<typeof containerVariants>, VariantProps<typeof spinnerVariants>, Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
816
+ declare const containerVariants: (props?: ({
817
+ position?: "fixed" | "absolute" | null | undefined;
818
+ blockInteraction?: boolean | null | undefined;
819
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
820
+ declare const spinnerSizes: {
821
+ readonly small: 24;
822
+ readonly medium: 36;
823
+ readonly large: 48;
824
+ };
825
+ type LoadingSize = keyof typeof spinnerSizes;
826
+ interface LoadingProps extends VariantProps<typeof containerVariants>, Omit<React__default.ComponentPropsWithRef<'div'>, 'children'> {
817
827
  /**
818
828
  * 로딩 표시 여부
819
829
  * @default true
@@ -829,6 +839,8 @@ interface LoadingProps extends VariantProps<typeof containerVariants>, VariantPr
829
839
  * @default false
830
840
  */
831
841
  blockInteraction?: boolean;
842
+ /** 스피너 크기 */
843
+ size?: LoadingSize;
832
844
  /** 컨테이너 추가 클래스 */
833
845
  containerClassName?: string;
834
846
  /** 오버레이 추가 클래스 */
@@ -836,43 +848,29 @@ interface LoadingProps extends VariantProps<typeof containerVariants>, VariantPr
836
848
  /** 스피너 추가 클래스 */
837
849
  spinnerClassName?: string;
838
850
  }
839
- type LoadingComponent = React__default.ForwardRefExoticComponent<LoadingProps & React__default.RefAttributes<HTMLDivElement>>;
840
- declare const containerVariants: (props?: ({
841
- position?: "fixed" | "absolute" | null | undefined;
842
- blockInteraction?: boolean | null | undefined;
843
- } & class_variance_authority_types.ClassProp) | undefined) => string;
844
- declare const spinnerVariants: (props?: ({
845
- size?: "small" | "medium" | "large" | null | undefined;
846
- } & class_variance_authority_types.ClassProp) | undefined) => string;
847
851
  /**
848
852
  * 비동기 작업 중 로딩 상태를 표시하는 오버레이 컴포넌트입니다.
849
853
  *
850
854
  * @example
851
855
  * ```tsx
852
- * // 기본 사용 (전체 화면 고정)
853
856
  * <Loading isLoading />
854
- *
855
- * // 특정 영역 내 로딩 (absolute 위치)
856
- * <div style={{ position: 'relative' }}>
857
- * <Loading isLoading position="absolute" size="small" />
858
- * </div>
857
+ * <Loading isLoading position="absolute" size="small" />
859
858
  * ```
860
- *
861
- * @see {@link LoadingProps} props 상세
862
859
  */
863
- declare const Loading: LoadingComponent;
860
+ declare function Loading({ isLoading, dim, blockInteraction, position, size, containerClassName, overlayClassName, spinnerClassName, className, ref, 'aria-label': ariaLabel, ...props }: LoadingProps): react_jsx_runtime.JSX.Element | null;
861
+ type LoadingComponent = typeof Loading;
864
862
 
865
863
  declare const trackVariants: (props?: ({
866
864
  size?: "small" | "medium" | "large" | null | undefined;
867
865
  } & class_variance_authority_types.ClassProp) | undefined) => string;
868
- interface ProgressProps extends VariantProps<typeof trackVariants>, Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
866
+ interface ProgressProps extends VariantProps<typeof trackVariants>, Omit<React__default.ComponentPropsWithRef<'div'>, 'children'> {
869
867
  /**
870
868
  * 현재 진행 값
871
869
  * @default 0
872
870
  */
873
871
  value?: number;
874
872
  /**
875
- * 최대 값
873
+ * 최대 값. 0 이하면 값이 max로 보정되어 완료 상태가 되므로 양수만 사용합니다.
876
874
  * @default 100
877
875
  */
878
876
  max?: number;
@@ -881,17 +879,9 @@ interface ProgressProps extends VariantProps<typeof trackVariants>, Omit<React__
881
879
  /** 게이지(채움) 추가 클래스 */
882
880
  gaugeClassName?: string;
883
881
  }
884
- type ProgressComponent = React__default.ForwardRefExoticComponent<ProgressProps & React__default.RefAttributes<HTMLDivElement>>;
885
- /**
886
- * 작업 진행률을 시각적으로 표시하는 바 컴포넌트입니다.
887
- *
888
- * @example
889
- * ```tsx
890
- * <Progress value={60} />
891
- * <Progress value={30} max={100} size="large" />
892
- * ```
893
- */
894
- declare const Progress: ProgressComponent;
882
+ /** 작업 진행률을 시각적으로 표시하는 바 컴포넌트입니다. */
883
+ declare function Progress({ value, max, size, trackClassName, gaugeClassName, className, ref, 'aria-label': ariaLabel, 'aria-valuetext': ariaValueText, ...props }: ProgressProps): react_jsx_runtime.JSX.Element;
884
+ type ProgressComponent = typeof Progress;
895
885
 
896
886
  type ToasterRootProps = React$1.ComponentProps<typeof Toaster$1>;
897
887
  type ToasterContainerProps = {
package/dist/index.js CHANGED
@@ -13,6 +13,7 @@ var reactDayPicker = require('react-day-picker');
13
13
  var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
14
14
  var DialogPrimitive = require('@radix-ui/react-dialog');
15
15
  var reResizable = require('re-resizable');
16
+ var progress = require('@base-ui/react/progress');
16
17
  var sonner = require('sonner');
17
18
 
18
19
  function _interopNamespace(e) {
@@ -2084,83 +2085,69 @@ var containerVariants4 = utils.cva("inset-0 z-[49] flex items-center justify-cen
2084
2085
  blockInteraction: false
2085
2086
  }
2086
2087
  });
2087
- var overlayVariants = utils.cva("absolute inset-0 transition-opacity duration-150", {
2088
- variants: {
2089
- visible: {
2090
- true: "opacity-100",
2091
- false: "opacity-0"
2092
- },
2093
- tone: {
2094
- // 대비감 높은 톤 설정 추후 디자인 시스템에서 추가 되어야함
2095
- auto: "bg-black/30 dark:bg-white/10",
2096
- dark: "bg-black/50",
2097
- light: "bg-white/70",
2098
- brand: "bg-primary/20"
2099
- }
2100
- },
2101
- defaultVariants: {
2102
- visible: true,
2103
- tone: "auto"
2104
- }
2105
- });
2106
- var spinnerVariants = utils.cva(
2107
- "z-50 shrink-0 animate-spin rounded-full border-elevation-elevation-4 border-t-transparent",
2088
+ var overlayVariants = utils.cva(
2089
+ "absolute inset-0 bg-component-dim transition-opacity duration-150 motion-reduce:transition-none",
2108
2090
  {
2109
2091
  variants: {
2110
- size: {
2111
- small: "size-6 border-2",
2112
- medium: "size-9 border-[3px]",
2113
- large: "size-12 border-4"
2092
+ visible: {
2093
+ true: "opacity-100",
2094
+ false: "opacity-0"
2114
2095
  }
2115
2096
  },
2116
2097
  defaultVariants: {
2117
- size: "large"
2098
+ visible: true
2118
2099
  }
2119
2100
  }
2120
2101
  );
2121
- var Loading = React.forwardRef(
2122
- ({
2123
- isLoading = true,
2124
- dim = true,
2125
- blockInteraction = false,
2126
- position = "fixed",
2127
- size = "medium",
2128
- containerClassName,
2129
- overlayClassName,
2130
- spinnerClassName,
2131
- className,
2132
- ...props
2133
- }, ref) => {
2134
- if (!isLoading) {
2135
- return null;
2136
- }
2137
- return /* @__PURE__ */ jsxRuntime.jsxs(
2138
- "div",
2139
- {
2140
- ref,
2141
- role: "status",
2142
- "aria-busy": "true",
2143
- className: utils.cn(
2144
- containerVariants4({ position, blockInteraction }),
2145
- containerClassName,
2146
- className
2147
- ),
2148
- ...props,
2149
- children: [
2150
- /* @__PURE__ */ jsxRuntime.jsx(
2151
- "div",
2152
- {
2153
- "aria-hidden": "true",
2154
- className: utils.cn(overlayVariants({ visible: dim }), overlayClassName)
2155
- }
2156
- ),
2157
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative z-50 flex size-full items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils.cn(spinnerVariants({ size }), spinnerClassName) }) })
2158
- ]
2159
- }
2160
- );
2102
+ var spinnerBaseClassName = "relative z-50 shrink-0 animate-spin text-elevation-elevation-4 motion-reduce:animate-none";
2103
+ var spinnerSizes = {
2104
+ small: 24,
2105
+ medium: 36,
2106
+ large: 48
2107
+ };
2108
+ function Loading2({
2109
+ isLoading = true,
2110
+ dim = true,
2111
+ blockInteraction = false,
2112
+ position = "fixed",
2113
+ size = "medium",
2114
+ containerClassName,
2115
+ overlayClassName,
2116
+ spinnerClassName,
2117
+ className,
2118
+ ref,
2119
+ "aria-label": ariaLabel = "Loading",
2120
+ ...props
2121
+ }) {
2122
+ if (!isLoading) {
2123
+ return null;
2161
2124
  }
2162
- );
2163
- Loading.displayName = "Loading";
2125
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2126
+ progress.Progress.Root,
2127
+ {
2128
+ ref,
2129
+ value: null,
2130
+ "aria-label": ariaLabel,
2131
+ className: utils.cn(
2132
+ containerVariants4({ position, blockInteraction }),
2133
+ containerClassName,
2134
+ className
2135
+ ),
2136
+ ...props,
2137
+ children: [
2138
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: utils.cn(overlayVariants({ visible: dim }), overlayClassName) }),
2139
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative z-50 flex size-full items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
2140
+ progress.Progress.Indicator,
2141
+ {
2142
+ "aria-hidden": "true",
2143
+ render: /* @__PURE__ */ jsxRuntime.jsx(chunk6MFMQCL5_js.Loading, { size: spinnerSizes[size] }),
2144
+ className: utils.cn(spinnerBaseClassName, spinnerClassName)
2145
+ }
2146
+ ) })
2147
+ ]
2148
+ }
2149
+ );
2150
+ }
2164
2151
  var trackVariants = utils.cva("w-full overflow-hidden rounded-full bg-elevation-elevation-3", {
2165
2152
  variants: {
2166
2153
  size: {
@@ -2173,44 +2160,42 @@ var trackVariants = utils.cva("w-full overflow-hidden rounded-full bg-elevation-
2173
2160
  size: "large"
2174
2161
  }
2175
2162
  });
2176
- var gaugeVariants = utils.cva("h-full rounded-full bg-icon-accent transition-[width] duration-300", {
2177
- variants: {
2178
- size: {
2179
- small: "",
2180
- medium: "",
2181
- large: ""
2163
+ var gaugeBaseClassName = "h-full rounded-full bg-icon-accent transition-[width] duration-300";
2164
+ var percentFormatter = new Intl.NumberFormat(void 0, { style: "percent" });
2165
+ function Progress({
2166
+ value = 0,
2167
+ max = 100,
2168
+ size = "medium",
2169
+ trackClassName,
2170
+ gaugeClassName,
2171
+ className,
2172
+ ref,
2173
+ "aria-label": ariaLabel = "Progress",
2174
+ "aria-valuetext": ariaValueText,
2175
+ ...props
2176
+ }) {
2177
+ const clampedValue = Math.min(Math.max(value, 0), max);
2178
+ const percent = max > 0 ? clampedValue / max : 0;
2179
+ return /* @__PURE__ */ jsxRuntime.jsx(
2180
+ progress.Progress.Root,
2181
+ {
2182
+ ref,
2183
+ value: clampedValue,
2184
+ max,
2185
+ "aria-label": ariaLabel,
2186
+ "aria-valuetext": ariaValueText ?? percentFormatter.format(percent),
2187
+ className: utils.cn(trackVariants({ size }), trackClassName, className),
2188
+ ...props,
2189
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2190
+ progress.Progress.Indicator,
2191
+ {
2192
+ className: utils.cn(gaugeBaseClassName, gaugeClassName),
2193
+ style: max > 0 ? void 0 : { width: "0%" }
2194
+ }
2195
+ )
2182
2196
  }
2183
- },
2184
- defaultVariants: {
2185
- size: "medium"
2186
- }
2187
- });
2188
- var Progress = React.forwardRef(
2189
- ({ value = 0, max = 100, size = "medium", trackClassName, gaugeClassName, className, ...props }, ref) => {
2190
- const clampedValue = Math.min(Math.max(value, 0), max);
2191
- const percent = max > 0 ? clampedValue / max * 100 : 0;
2192
- return /* @__PURE__ */ jsxRuntime.jsx(
2193
- "div",
2194
- {
2195
- ref,
2196
- role: "progressbar",
2197
- "aria-valuenow": clampedValue,
2198
- "aria-valuemin": 0,
2199
- "aria-valuemax": max,
2200
- className: utils.cn(trackVariants({ size }), trackClassName, className),
2201
- ...props,
2202
- children: /* @__PURE__ */ jsxRuntime.jsx(
2203
- "div",
2204
- {
2205
- className: utils.cn(gaugeVariants({ size }), gaugeClassName),
2206
- style: { width: `${percent}%` }
2207
- }
2208
- )
2209
- }
2210
- );
2211
- }
2212
- );
2213
- Progress.displayName = "Progress";
2197
+ );
2198
+ }
2214
2199
  var positionFix = `
2215
2200
  [data-sonner-toaster][data-x-position='center'] [data-sonner-toast] {
2216
2201
  left: calc(var(--width) / 2) !important;
@@ -2653,7 +2638,7 @@ exports.DatePicker = DatePicker;
2653
2638
  exports.DoubleTag = DoubleTag;
2654
2639
  exports.Dropdown = Dropdown;
2655
2640
  exports.IconButton = IconButton;
2656
- exports.Loading = Loading;
2641
+ exports.Loading = Loading2;
2657
2642
  exports.MessageBox = MessageBox;
2658
2643
  exports.Modal = Modal;
2659
2644
  exports.Progress = Progress;
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ConditionalTooltip, overlayListVariants, commonInputVariants, textFieldVariants, ScrollArea } from './chunk-4JSE66SD.mjs';
2
2
  export { ColorPalette, ColorPaletteColors, Combobox, ComboboxContent, ComboboxDescription, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSearch, ComboboxTrigger, ComboboxValue, DEFAULT_COLOR, ScrollArea, ScrollBar, Segment, Select, Tabs, Tooltip, colorPaletteColorClasses, getColorPaletteColor, isInPalette } from './chunk-4JSE66SD.mjs';
3
- import { X, MoreHorizontal, iconSizes, Minus, Check, Person, Warning, Info, Error as Error$1, ChevronLeft, ChevronRight } from './chunk-4QQPDTTI.mjs';
3
+ import { X, MoreHorizontal, iconSizes, Minus, Check, Person, Loading, Warning, Info, Error as Error$1, ChevronLeft, ChevronRight } from './chunk-4QQPDTTI.mjs';
4
4
  import { cva, cn } from '@exem-ui/core/utils';
5
5
  import * as React from 'react';
6
6
  import { forwardRef, Fragment, cloneElement, useId, createContext, useContext, useState } from 'react';
@@ -13,6 +13,7 @@ import { getDefaultClassNames, DayPicker } from 'react-day-picker';
13
13
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
14
14
  import * as DialogPrimitive from '@radix-ui/react-dialog';
15
15
  import { Resizable } from 're-resizable';
16
+ import { Progress as Progress$1 } from '@base-ui/react/progress';
16
17
  import { toast as toast$1, Toaster as Toaster$1 } from 'sonner';
17
18
 
18
19
  var SIZE_CONFIG = {
@@ -2059,83 +2060,69 @@ var containerVariants4 = cva("inset-0 z-[49] flex items-center justify-center",
2059
2060
  blockInteraction: false
2060
2061
  }
2061
2062
  });
2062
- var overlayVariants = cva("absolute inset-0 transition-opacity duration-150", {
2063
- variants: {
2064
- visible: {
2065
- true: "opacity-100",
2066
- false: "opacity-0"
2067
- },
2068
- tone: {
2069
- // 대비감 높은 톤 설정 추후 디자인 시스템에서 추가 되어야함
2070
- auto: "bg-black/30 dark:bg-white/10",
2071
- dark: "bg-black/50",
2072
- light: "bg-white/70",
2073
- brand: "bg-primary/20"
2074
- }
2075
- },
2076
- defaultVariants: {
2077
- visible: true,
2078
- tone: "auto"
2079
- }
2080
- });
2081
- var spinnerVariants = cva(
2082
- "z-50 shrink-0 animate-spin rounded-full border-elevation-elevation-4 border-t-transparent",
2063
+ var overlayVariants = cva(
2064
+ "absolute inset-0 bg-component-dim transition-opacity duration-150 motion-reduce:transition-none",
2083
2065
  {
2084
2066
  variants: {
2085
- size: {
2086
- small: "size-6 border-2",
2087
- medium: "size-9 border-[3px]",
2088
- large: "size-12 border-4"
2067
+ visible: {
2068
+ true: "opacity-100",
2069
+ false: "opacity-0"
2089
2070
  }
2090
2071
  },
2091
2072
  defaultVariants: {
2092
- size: "large"
2073
+ visible: true
2093
2074
  }
2094
2075
  }
2095
2076
  );
2096
- var Loading = forwardRef(
2097
- ({
2098
- isLoading = true,
2099
- dim = true,
2100
- blockInteraction = false,
2101
- position = "fixed",
2102
- size = "medium",
2103
- containerClassName,
2104
- overlayClassName,
2105
- spinnerClassName,
2106
- className,
2107
- ...props
2108
- }, ref) => {
2109
- if (!isLoading) {
2110
- return null;
2111
- }
2112
- return /* @__PURE__ */ jsxs(
2113
- "div",
2114
- {
2115
- ref,
2116
- role: "status",
2117
- "aria-busy": "true",
2118
- className: cn(
2119
- containerVariants4({ position, blockInteraction }),
2120
- containerClassName,
2121
- className
2122
- ),
2123
- ...props,
2124
- children: [
2125
- /* @__PURE__ */ jsx(
2126
- "div",
2127
- {
2128
- "aria-hidden": "true",
2129
- className: cn(overlayVariants({ visible: dim }), overlayClassName)
2130
- }
2131
- ),
2132
- /* @__PURE__ */ jsx("div", { className: "relative z-50 flex size-full items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: cn(spinnerVariants({ size }), spinnerClassName) }) })
2133
- ]
2134
- }
2135
- );
2077
+ var spinnerBaseClassName = "relative z-50 shrink-0 animate-spin text-elevation-elevation-4 motion-reduce:animate-none";
2078
+ var spinnerSizes = {
2079
+ small: 24,
2080
+ medium: 36,
2081
+ large: 48
2082
+ };
2083
+ function Loading2({
2084
+ isLoading = true,
2085
+ dim = true,
2086
+ blockInteraction = false,
2087
+ position = "fixed",
2088
+ size = "medium",
2089
+ containerClassName,
2090
+ overlayClassName,
2091
+ spinnerClassName,
2092
+ className,
2093
+ ref,
2094
+ "aria-label": ariaLabel = "Loading",
2095
+ ...props
2096
+ }) {
2097
+ if (!isLoading) {
2098
+ return null;
2136
2099
  }
2137
- );
2138
- Loading.displayName = "Loading";
2100
+ return /* @__PURE__ */ jsxs(
2101
+ Progress$1.Root,
2102
+ {
2103
+ ref,
2104
+ value: null,
2105
+ "aria-label": ariaLabel,
2106
+ className: cn(
2107
+ containerVariants4({ position, blockInteraction }),
2108
+ containerClassName,
2109
+ className
2110
+ ),
2111
+ ...props,
2112
+ children: [
2113
+ /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: cn(overlayVariants({ visible: dim }), overlayClassName) }),
2114
+ /* @__PURE__ */ jsx("div", { className: "relative z-50 flex size-full items-center justify-center", children: /* @__PURE__ */ jsx(
2115
+ Progress$1.Indicator,
2116
+ {
2117
+ "aria-hidden": "true",
2118
+ render: /* @__PURE__ */ jsx(Loading, { size: spinnerSizes[size] }),
2119
+ className: cn(spinnerBaseClassName, spinnerClassName)
2120
+ }
2121
+ ) })
2122
+ ]
2123
+ }
2124
+ );
2125
+ }
2139
2126
  var trackVariants = cva("w-full overflow-hidden rounded-full bg-elevation-elevation-3", {
2140
2127
  variants: {
2141
2128
  size: {
@@ -2148,44 +2135,42 @@ var trackVariants = cva("w-full overflow-hidden rounded-full bg-elevation-elevat
2148
2135
  size: "large"
2149
2136
  }
2150
2137
  });
2151
- var gaugeVariants = cva("h-full rounded-full bg-icon-accent transition-[width] duration-300", {
2152
- variants: {
2153
- size: {
2154
- small: "",
2155
- medium: "",
2156
- large: ""
2138
+ var gaugeBaseClassName = "h-full rounded-full bg-icon-accent transition-[width] duration-300";
2139
+ var percentFormatter = new Intl.NumberFormat(void 0, { style: "percent" });
2140
+ function Progress({
2141
+ value = 0,
2142
+ max = 100,
2143
+ size = "medium",
2144
+ trackClassName,
2145
+ gaugeClassName,
2146
+ className,
2147
+ ref,
2148
+ "aria-label": ariaLabel = "Progress",
2149
+ "aria-valuetext": ariaValueText,
2150
+ ...props
2151
+ }) {
2152
+ const clampedValue = Math.min(Math.max(value, 0), max);
2153
+ const percent = max > 0 ? clampedValue / max : 0;
2154
+ return /* @__PURE__ */ jsx(
2155
+ Progress$1.Root,
2156
+ {
2157
+ ref,
2158
+ value: clampedValue,
2159
+ max,
2160
+ "aria-label": ariaLabel,
2161
+ "aria-valuetext": ariaValueText ?? percentFormatter.format(percent),
2162
+ className: cn(trackVariants({ size }), trackClassName, className),
2163
+ ...props,
2164
+ children: /* @__PURE__ */ jsx(
2165
+ Progress$1.Indicator,
2166
+ {
2167
+ className: cn(gaugeBaseClassName, gaugeClassName),
2168
+ style: max > 0 ? void 0 : { width: "0%" }
2169
+ }
2170
+ )
2157
2171
  }
2158
- },
2159
- defaultVariants: {
2160
- size: "medium"
2161
- }
2162
- });
2163
- var Progress = forwardRef(
2164
- ({ value = 0, max = 100, size = "medium", trackClassName, gaugeClassName, className, ...props }, ref) => {
2165
- const clampedValue = Math.min(Math.max(value, 0), max);
2166
- const percent = max > 0 ? clampedValue / max * 100 : 0;
2167
- return /* @__PURE__ */ jsx(
2168
- "div",
2169
- {
2170
- ref,
2171
- role: "progressbar",
2172
- "aria-valuenow": clampedValue,
2173
- "aria-valuemin": 0,
2174
- "aria-valuemax": max,
2175
- className: cn(trackVariants({ size }), trackClassName, className),
2176
- ...props,
2177
- children: /* @__PURE__ */ jsx(
2178
- "div",
2179
- {
2180
- className: cn(gaugeVariants({ size }), gaugeClassName),
2181
- style: { width: `${percent}%` }
2182
- }
2183
- )
2184
- }
2185
- );
2186
- }
2187
- );
2188
- Progress.displayName = "Progress";
2172
+ );
2173
+ }
2189
2174
  var positionFix = `
2190
2175
  [data-sonner-toaster][data-x-position='center'] [data-sonner-toast] {
2191
2176
  left: calc(var(--width) / 2) !important;
@@ -2526,4 +2511,4 @@ var buttonize = (fn) => {
2526
2511
  };
2527
2512
  };
2528
2513
 
2529
- export { Avatar, Badge, Breadcrumb, Button, ButtonGroup, Checkbox, DatePicker, DoubleTag, Dropdown, IconButton, Loading, MessageBox, Modal, Progress, Radio, Sheet, Star, Switch, Tag, TextArea, TextField, ToastProvider, Toaster, buttonize, toast, useToast };
2514
+ export { Avatar, Badge, Breadcrumb, Button, ButtonGroup, Checkbox, DatePicker, DoubleTag, Dropdown, IconButton, Loading2 as Loading, MessageBox, Modal, Progress, Radio, Sheet, Star, Switch, Tag, TextArea, TextField, ToastProvider, Toaster, buttonize, toast, useToast };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exem-ui/react",
3
- "version": "0.3.4-next.20260819010838",
3
+ "version": "0.3.4-next.20260824050435",
4
4
  "description": "Exem Design System - React Components",
5
5
  "author": "Exem Design Team",
6
6
  "license": "Apache-2.0",
@@ -100,7 +100,7 @@
100
100
  "tailwind-merge": "^3.3.1",
101
101
  "tailwind-scrollbar-hide": "^4.0.0",
102
102
  "tiny-invariant": "^1.3.3",
103
- "@exem-ui/core": "0.3.3-next.20260819010838"
103
+ "@exem-ui/core": "0.3.3-next.20260824050435"
104
104
  },
105
105
  "devDependencies": {
106
106
  "@eslint/js": "^9.15.0",
@@ -136,7 +136,7 @@
136
136
  "tsup": "^8.5.0",
137
137
  "typescript": "^5.8.2",
138
138
  "typescript-eslint": "^8.16.0",
139
- "@exem-ui/tailwindcss3": "0.3.2-next.20260819010838"
139
+ "@exem-ui/tailwindcss3": "0.3.2-next.20260824050435"
140
140
  },
141
141
  "scripts": {
142
142
  "generate": "node scripts/generate-icons.js",