@seed-design/react 1.1.19 → 1.1.20
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.
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
const reactDialog = require('@seed-design/react-dialog');
|
|
8
7
|
const reactPrimitive = require('@seed-design/react-primitive');
|
|
9
8
|
const dialog = require('@seed-design/css/recipes/dialog');
|
|
10
|
-
const React = require('react');
|
|
11
9
|
const createSlotRecipeContext = require('../../utils/createSlotRecipeContext.cjs');
|
|
12
10
|
const createWithStateProps = require('../../utils/createWithStateProps.cjs');
|
|
13
11
|
|
|
@@ -42,10 +40,7 @@ const DialogDescription = withContext(
|
|
|
42
40
|
"description"
|
|
43
41
|
);
|
|
44
42
|
const DialogFooter = withContext(reactPrimitive.Primitive.div, "footer");
|
|
45
|
-
const DialogAction =
|
|
46
|
-
const api = reactDialog.useDialogContext();
|
|
47
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactPrimitive.Primitive.button, { ...props, ref, onClick: () => api.setOpen(false) });
|
|
48
|
-
});
|
|
43
|
+
const DialogAction = reactDialog.Dialog.CloseButton;
|
|
49
44
|
|
|
50
45
|
exports.DialogAction = DialogAction;
|
|
51
46
|
exports.DialogBackdrop = DialogBackdrop;
|
|
@@ -39,5 +39,5 @@ export interface DialogFooterProps extends PrimitiveProps, React.HTMLAttributes<
|
|
|
39
39
|
export declare const DialogFooter: ForwardRefExoticComponent<DialogFooterProps & RefAttributes<HTMLDivElement>>;
|
|
40
40
|
export interface DialogActionProps extends PrimitiveProps, React.HTMLAttributes<HTMLButtonElement> {
|
|
41
41
|
}
|
|
42
|
-
export declare const DialogAction: ForwardRefExoticComponent<
|
|
42
|
+
export declare const DialogAction: ForwardRefExoticComponent<DialogPrimitive.CloseButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
43
43
|
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAoB,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAU,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAoB,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAU,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AASlF,MAAM,WAAW,eAAgB,SAAQ,kBAAkB,EAAE,eAAe,CAAC,SAAS;IACpF;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACnD;;OAEG;IACH,aAAa,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;CAC5D;AAED,eAAO,MAAM,UAAU,4DAKrB,CAAC;AAIH,MAAM,WAAW,kBAAmB,SAAQ,eAAe,CAAC,YAAY;CAAG;AAE3E,eAAO,MAAM,aAAa,4HAA0B,CAAC;AAIrD,MAAM,WAAW,qBAAsB,SAAQ,eAAe,CAAC,eAAe;CAAG;AAEjF,eAAO,MAAM,gBAAgB,kHAG5B,CAAC;AAIF,MAAM,WAAW,mBAAoB,SAAQ,eAAe,CAAC,aAAa;CAAG;AAE7E,eAAO,MAAM,cAAc,gHAG1B,CAAC;AAIF,MAAM,WAAW,kBAAmB,SAAQ,eAAe,CAAC,YAAY;CAAG;AAE3E,eAAO,MAAM,aAAa,+GAGzB,CAAC;AAIF,MAAM,WAAW,iBAAkB,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAElG,eAAO,MAAM,YAAY,8GAA0E,CAAC;AAIpG,MAAM,WAAW,gBAAiB,SAAQ,eAAe,CAAC,UAAU;CAAG;AAEvE,eAAO,MAAM,WAAW,iHAGvB,CAAC;AAIF,MAAM,WAAW,sBAAuB,SAAQ,eAAe,CAAC,gBAAgB;CAAG;AAEnF,eAAO,MAAM,iBAAiB,yHAG7B,CAAC;AAIF,MAAM,WAAW,iBAAkB,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAElG,eAAO,MAAM,YAAY,8GAA0E,CAAC;AAIpG,MAAM,WAAW,iBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC;CAAG;AAE9C,eAAO,MAAM,YAAY,gIAA8B,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { Dialog, useDialogContext } from '@seed-design/react-dialog';
|
|
4
3
|
import { Primitive } from '@seed-design/react-primitive';
|
|
5
4
|
import { dialog } from '@seed-design/css/recipes/dialog';
|
|
6
|
-
import { forwardRef } from 'react';
|
|
7
5
|
import { createSlotRecipeContext } from '../../utils/createSlotRecipeContext.js';
|
|
8
6
|
import { createWithStateProps } from '../../utils/createWithStateProps.js';
|
|
9
7
|
|
|
@@ -38,9 +36,6 @@ const DialogDescription = withContext(
|
|
|
38
36
|
"description"
|
|
39
37
|
);
|
|
40
38
|
const DialogFooter = withContext(Primitive.div, "footer");
|
|
41
|
-
const DialogAction =
|
|
42
|
-
const api = useDialogContext();
|
|
43
|
-
return /* @__PURE__ */ jsx(Primitive.button, { ...props, ref, onClick: () => api.setOpen(false) });
|
|
44
|
-
});
|
|
39
|
+
const DialogAction = Dialog.CloseButton;
|
|
45
40
|
|
|
46
41
|
export { DialogAction, DialogBackdrop, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPositioner, DialogRoot, DialogTitle, DialogTrigger };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-design/react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.20",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/daangn/seed-design.git",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@seed-design/dom-utils": "1.0.0",
|
|
44
44
|
"@seed-design/react-avatar": "1.0.0",
|
|
45
45
|
"@seed-design/react-checkbox": "1.0.1",
|
|
46
|
-
"@seed-design/react-dialog": "1.0.
|
|
47
|
-
"@seed-design/react-drawer": "1.0.
|
|
46
|
+
"@seed-design/react-dialog": "1.0.2",
|
|
47
|
+
"@seed-design/react-drawer": "1.0.8",
|
|
48
48
|
"@seed-design/react-field": "1.0.1",
|
|
49
49
|
"@seed-design/react-field-button": "1.0.1",
|
|
50
50
|
"@seed-design/react-popover": "1.0.3",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Dialog as DialogPrimitive, useDialogContext } from "@seed-design/react-dialog";
|
|
2
2
|
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
3
3
|
import { dialog, type DialogVariantProps } from "@seed-design/css/recipes/dialog";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
4
|
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
6
5
|
import { createWithStateProps } from "../../utils/createWithStateProps";
|
|
7
6
|
|
|
@@ -97,7 +96,4 @@ export interface DialogActionProps
|
|
|
97
96
|
extends PrimitiveProps,
|
|
98
97
|
React.HTMLAttributes<HTMLButtonElement> {}
|
|
99
98
|
|
|
100
|
-
export const DialogAction =
|
|
101
|
-
const api = useDialogContext();
|
|
102
|
-
return <Primitive.button {...props} ref={ref} onClick={() => api.setOpen(false)} />;
|
|
103
|
-
});
|
|
99
|
+
export const DialogAction = DialogPrimitive.CloseButton;
|