@anyknown/ui 0.6.0 → 0.6.1

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.
@@ -1,4 +1,5 @@
1
1
  import { type ReactElement, type ReactNode } from "react";
2
+ import type { StyleArg } from "../../lib/styled.js";
2
3
  export type DialogProps = {
3
4
  open?: boolean;
4
5
  defaultOpen?: boolean;
@@ -19,8 +20,10 @@ export type DialogContentProps = {
19
20
  title: ReactNode;
20
21
  description?: ReactNode;
21
22
  children?: ReactNode;
23
+ /** 寬高是 popup 自己的事,但要蓋得掉 —— 三欄選擇器那種得自己給 width / maxHeight */
24
+ sx?: StyleArg;
22
25
  };
23
- export declare function DialogContent({ title, description, children }: DialogContentProps): import("react").JSX.Element;
26
+ export declare function DialogContent({ title, description, children, sx }: DialogContentProps): import("react").JSX.Element;
24
27
  export type ConfirmDialogProps = {
25
28
  open?: boolean;
26
29
  defaultOpen?: boolean;
@@ -67,8 +67,8 @@ export function DialogClose({ children }) {
67
67
  export function DialogActions({ children }) {
68
68
  return _jsx("div", { ...stylex.props(styles.actions), children: children });
69
69
  }
70
- export function DialogContent({ title, description, children }) {
71
- return (_jsxs(BaseDialog.Portal, { children: [_jsx(BaseDialog.Backdrop, { ...stylex.props(layerStyles.dialogBackdrop, styles.backdrop) }), _jsx(BaseDialog.Viewport, { ...stylex.props(layerStyles.dialog, styles.viewport), children: _jsxs(BaseDialog.Popup, { ...stylex.props(styles.popup), children: [_jsx(BaseDialog.Title, { ...stylex.props(styles.title), children: title }), description != null && (_jsx(BaseDialog.Description, { ...stylex.props(styles.description), children: description })), children] }) })] }));
70
+ export function DialogContent({ title, description, children, sx }) {
71
+ return (_jsxs(BaseDialog.Portal, { children: [_jsx(BaseDialog.Backdrop, { ...stylex.props(layerStyles.dialogBackdrop, styles.backdrop) }), _jsx(BaseDialog.Viewport, { ...stylex.props(layerStyles.dialog, styles.viewport), children: _jsxs(BaseDialog.Popup, { ...stylex.props(styles.popup, sx), children: [_jsx(BaseDialog.Title, { ...stylex.props(styles.title), children: title }), description != null && (_jsx(BaseDialog.Description, { ...stylex.props(styles.description), children: description })), children] }) })] }));
72
72
  }
73
73
  export function ConfirmDialog({ trigger, title, description, danger = false, confirmLabel = "確認", cancelLabel = "取消", onConfirm, ...props }) {
74
74
  const cancelRef = useRef(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anyknown/ui",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "AnyKnown design system — StyleX tokens, themes, and 36 components",
5
5
  "homepage": "https://ui.anyknown.com",
6
6
  "bugs": {