@exem-ui/react 0.3.4-next.20260615013551 → 0.3.4-next.20260622055505

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
@@ -567,7 +567,7 @@ declare function ScrollBar({ className, orientation, ...props }: React__default.
567
567
  */
568
568
  declare function ScrollArea({ className, children, onScroll, scrollRef, hideVerticalScrollbar, hideHorizontalScrollbar, disableHorizontalScroll, ...props }: ScrollAreaProps): react_jsx_runtime.JSX.Element;
569
569
 
570
- type ModalSize = 'small' | 'medium' | 'large' | 'xlarge' | 'fullsize';
570
+ type ModalSize = 'default' | 'fullsize';
571
571
  type ModalRootProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
572
572
  type ModalTriggerProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
573
573
  type ModalPortalProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;
@@ -575,7 +575,7 @@ type ModalOverlayProps = React__default.ComponentPropsWithoutRef<typeof DialogPr
575
575
  type ModalContentProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
576
576
  /**
577
577
  * 모달 크기
578
- * @default 'medium'
578
+ * @default 'default'
579
579
  */
580
580
  size?: ModalSize;
581
581
  };
@@ -587,10 +587,12 @@ type ModalHeaderProps = React__default.HTMLAttributes<HTMLDivElement> & {
587
587
  */
588
588
  line?: boolean;
589
589
  /**
590
- * 닫기 아이콘 표시 여부
591
- * @default true
590
+ * 헤더 오른쪽 영역에 렌더링할 콘텐츠
591
+ * - `undefined` (미전달): 기본 닫기(X) 아이콘 렌더링
592
+ * - `null`: 닫기 버튼 없이 빈 영역 (기존 `showCloseIcon={false}` 대응)
593
+ * - `ReactNode`: 전달된 콘텐츠로 대체 (닫기 동작이 필요하면 `Modal.Close`를 직접 포함)
592
594
  */
593
- showCloseIcon?: boolean;
595
+ rightSlot?: React__default.ReactNode;
594
596
  };
595
597
  type ModalBodyProps = React__default.HTMLAttributes<HTMLDivElement>;
596
598
  type ModalFooterProps = React__default.HTMLAttributes<HTMLDivElement> & {
package/dist/index.d.ts CHANGED
@@ -567,7 +567,7 @@ declare function ScrollBar({ className, orientation, ...props }: React__default.
567
567
  */
568
568
  declare function ScrollArea({ className, children, onScroll, scrollRef, hideVerticalScrollbar, hideHorizontalScrollbar, disableHorizontalScroll, ...props }: ScrollAreaProps): react_jsx_runtime.JSX.Element;
569
569
 
570
- type ModalSize = 'small' | 'medium' | 'large' | 'xlarge' | 'fullsize';
570
+ type ModalSize = 'default' | 'fullsize';
571
571
  type ModalRootProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
572
572
  type ModalTriggerProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
573
573
  type ModalPortalProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;
@@ -575,7 +575,7 @@ type ModalOverlayProps = React__default.ComponentPropsWithoutRef<typeof DialogPr
575
575
  type ModalContentProps = React__default.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
576
576
  /**
577
577
  * 모달 크기
578
- * @default 'medium'
578
+ * @default 'default'
579
579
  */
580
580
  size?: ModalSize;
581
581
  };
@@ -587,10 +587,12 @@ type ModalHeaderProps = React__default.HTMLAttributes<HTMLDivElement> & {
587
587
  */
588
588
  line?: boolean;
589
589
  /**
590
- * 닫기 아이콘 표시 여부
591
- * @default true
590
+ * 헤더 오른쪽 영역에 렌더링할 콘텐츠
591
+ * - `undefined` (미전달): 기본 닫기(X) 아이콘 렌더링
592
+ * - `null`: 닫기 버튼 없이 빈 영역 (기존 `showCloseIcon={false}` 대응)
593
+ * - `ReactNode`: 전달된 콘텐츠로 대체 (닫기 동작이 필요하면 `Modal.Close`를 직접 포함)
592
594
  */
593
- showCloseIcon?: boolean;
595
+ rightSlot?: React__default.ReactNode;
594
596
  };
595
597
  type ModalBodyProps = React__default.HTMLAttributes<HTMLDivElement>;
596
598
  type ModalFooterProps = React__default.HTMLAttributes<HTMLDivElement> & {
package/dist/index.js CHANGED
@@ -1682,13 +1682,7 @@ var MODAL_PADDING = {
1682
1682
  body: "px-4 pb-4",
1683
1683
  footer: "px-4 py-3"
1684
1684
  };
1685
- var MODAL_EDGE_GAP = {
1686
- small: "[--modal-edge-gap:16px]",
1687
- medium: "[--modal-edge-gap:16px]",
1688
- large: "[--modal-edge-gap:40px]",
1689
- xlarge: "[--modal-edge-gap:40px]"
1690
- };
1691
- var ModalContext = React.createContext({ size: "medium" });
1685
+ var ModalContext = React.createContext({ size: "default" });
1692
1686
  var ModalRoot = (props) => /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { ...props });
1693
1687
  var Modal = ModalRoot;
1694
1688
  Modal.Trigger = React.forwardRef(
@@ -1722,14 +1716,8 @@ Modal.Overlay = React.forwardRef(
1722
1716
  )
1723
1717
  );
1724
1718
  Modal.Content = React.forwardRef(
1725
- ({ className, children, size = "medium", onInteractOutside, onFocusOutside, ...props }, ref) => {
1719
+ ({ className, children, size = "default", onInteractOutside, onFocusOutside, ...props }, ref) => {
1726
1720
  const isFullSize = size === "fullsize";
1727
- const sizeWidthMap = {
1728
- small: "max-w-[min(640px,calc(100vw-var(--modal-edge-gap)))]",
1729
- medium: "max-w-[min(800px,calc(100vw-var(--modal-edge-gap)))]",
1730
- large: "max-w-[min(960px,calc(100vw-var(--modal-edge-gap)))]",
1731
- xlarge: "max-w-[min(1120px,calc(100vw-var(--modal-edge-gap)))]"
1732
- };
1733
1721
  const shouldPreventDismissForSelect = (target) => {
1734
1722
  const isSelectOpen = Boolean(
1735
1723
  document.querySelector('[data-radix-select-content][data-state="open"]')
@@ -1762,12 +1750,7 @@ Modal.Content = React.forwardRef(
1762
1750
  // fullsize일 때
1763
1751
  isFullSize ? "inset-0 m-10" : (
1764
1752
  // 일반 모달일 때
1765
- utils.cn(
1766
- "left-[50%] top-[50%] w-full max-h-[90vh] translate-x-[-50%] translate-y-[-50%] shadow-strong data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
1767
- // max-width 계산에서 참조하는 --modal-edge-gap 변수를 같은 요소에 정의
1768
- MODAL_EDGE_GAP[size],
1769
- sizeWidthMap[size]
1770
- )
1753
+ "left-[50%] top-[50%] max-w-[calc(100vw-32px)] max-h-[calc(100vh-80px)] w-[800px] h-[560px] translate-x-[-50%] translate-y-[-50%] shadow-strong data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]"
1771
1754
  ),
1772
1755
  className
1773
1756
  ),
@@ -1780,34 +1763,30 @@ Modal.Content = React.forwardRef(
1780
1763
  }
1781
1764
  );
1782
1765
  Modal.Header = React.forwardRef(
1783
- ({ className, line = false, showCloseIcon = true, children, ...props }, ref) => {
1784
- const { size } = React.useContext(ModalContext);
1785
- return /* @__PURE__ */ jsxRuntime.jsxs(
1786
- "div",
1787
- {
1788
- ref,
1789
- className: utils.cn(
1790
- "flex shrink-0 flex-row items-center gap-2 pl-4 pr-3",
1791
- line && "border-b border-border-primary",
1792
- size === "fullsize" ? "h-16" : "h-14",
1793
- className
1794
- ),
1795
- ...props,
1796
- children: [
1797
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 flex-row items-center gap-1", children }),
1798
- showCloseIcon && /* @__PURE__ */ jsxRuntime.jsx(
1799
- DialogPrimitive__namespace.Close,
1800
- {
1801
- className: utils.cn(
1802
- "flex shrink-0 items-center justify-center size-8 rounded-medium text-icon-secondary transition-colors hover:bg-elevation-elevation-2 focus:outline-none disabled:pointer-events-none"
1803
- ),
1804
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkTAZFRRWT_js.X, { type: "regular", size: 20 })
1805
- }
1806
- )
1807
- ]
1808
- }
1809
- );
1810
- }
1766
+ ({ className, line = false, rightSlot, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1767
+ "div",
1768
+ {
1769
+ ref,
1770
+ className: utils.cn(
1771
+ "flex shrink-0 flex-row items-center gap-2 pl-4 pr-2 min-h-12",
1772
+ line && "border-b border-border-primary",
1773
+ className
1774
+ ),
1775
+ ...props,
1776
+ children: [
1777
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 flex-row items-center gap-1", children }),
1778
+ rightSlot === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
1779
+ DialogPrimitive__namespace.Close,
1780
+ {
1781
+ className: utils.cn(
1782
+ "flex shrink-0 items-center justify-center size-8 rounded-medium text-icon-secondary transition-colors hover:bg-elevation-elevation-2 focus:outline-none disabled:pointer-events-none"
1783
+ ),
1784
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkTAZFRRWT_js.X, { type: "regular", size: 20 })
1785
+ }
1786
+ ) : rightSlot
1787
+ ]
1788
+ }
1789
+ )
1811
1790
  );
1812
1791
  Modal.Body = React.forwardRef(
1813
1792
  ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -1824,62 +1803,39 @@ Modal.Body = React.forwardRef(
1824
1803
  )
1825
1804
  );
1826
1805
  Modal.Footer = React.forwardRef(
1827
- ({ className, line = true, ...props }, ref) => {
1828
- const { size } = React.useContext(ModalContext);
1829
- return /* @__PURE__ */ jsxRuntime.jsx(
1830
- "div",
1831
- {
1832
- ref,
1833
- className: utils.cn(
1834
- "flex flex-row items-center justify-between",
1835
- line && "border-t border-border-primary",
1836
- size === "fullsize" ? "gap-3" : "h-14 gap-3",
1837
- MODAL_PADDING.footer,
1838
- className
1839
- ),
1840
- ...props
1841
- }
1842
- );
1843
- }
1806
+ ({ className, line = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1807
+ "div",
1808
+ {
1809
+ ref,
1810
+ className: utils.cn(
1811
+ "flex flex-row items-center justify-between min-h-14 gap-3",
1812
+ line && "border-t border-border-primary",
1813
+ MODAL_PADDING.footer,
1814
+ className
1815
+ ),
1816
+ ...props
1817
+ }
1818
+ )
1844
1819
  );
1845
1820
  Modal.FooterDescription = React.forwardRef(
1846
- ({ className, error = false, icon, children, ...props }, ref) => {
1847
- const { size } = React.useContext(ModalContext);
1848
- const isLargeFooter = size === "fullsize";
1849
- return /* @__PURE__ */ jsxRuntime.jsxs(
1850
- "div",
1851
- {
1852
- ref,
1853
- className: utils.cn(
1854
- "flex flex-row items-center gap-1",
1855
- isLargeFooter ? "text-body-2" : "text-body-3",
1856
- error ? "text-text-critical" : "text-text-tertiary",
1857
- className
1858
- ),
1859
- ...props,
1860
- children: [
1861
- icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 size-4 items-center justify-center [&>svg]:size-4", children: icon }),
1862
- children
1863
- ]
1864
- }
1865
- );
1866
- }
1867
- );
1868
- Modal.Actions = React.forwardRef(({ className, ...props }, ref) => {
1869
- const { size } = React.useContext(ModalContext);
1870
- return /* @__PURE__ */ jsxRuntime.jsx(
1821
+ ({ className, error = false, icon, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1871
1822
  "div",
1872
1823
  {
1873
1824
  ref,
1874
1825
  className: utils.cn(
1875
- "ml-auto flex flex-row items-center",
1876
- size === "fullsize" ? "gap-3" : "gap-2",
1826
+ "flex flex-row items-center gap-1 text-body-3",
1827
+ error ? "text-text-critical" : "text-text-tertiary",
1877
1828
  className
1878
1829
  ),
1879
- ...props
1830
+ ...props,
1831
+ children: [
1832
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 size-4 items-center justify-center [&>svg]:size-4", children: icon }),
1833
+ children
1834
+ ]
1880
1835
  }
1881
- );
1882
- });
1836
+ )
1837
+ );
1838
+ Modal.Actions = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: utils.cn("ml-auto flex flex-row items-center gap-2", className), ...props }));
1883
1839
  Modal.Action = React.forwardRef(
1884
1840
  ({ color = "primary", size, ...props }, ref) => {
1885
1841
  const { size: modalSize } = React.useContext(ModalContext);