@a-type/ui 4.1.5 → 4.1.6
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/cjs/components/quickAction/QuickAction.d.ts +3 -3
- package/dist/cjs/components/quickAction/QuickAction.js +4 -7
- package/dist/cjs/components/quickAction/QuickAction.js.map +1 -1
- package/dist/esm/components/quickAction/QuickAction.d.ts +3 -3
- package/dist/esm/components/quickAction/QuickAction.js +5 -8
- package/dist/esm/components/quickAction/QuickAction.js.map +1 -1
- package/package.json +1 -1
- package/src/components/quickAction/QuickAction.tsx +11 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DialogRootProps } from '@base-ui/react/dialog';
|
|
1
|
+
import { DialogPopupProps, DialogRootProps } from '@base-ui/react/dialog';
|
|
2
2
|
import { RefObject } from 'react';
|
|
3
3
|
import { ButtonProps } from '../button/Button.js';
|
|
4
4
|
export declare const QuickActionRoot: ({ children, ...props }: Omit<DialogRootProps, "children"> & {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}) => import("react/jsx-runtime.js").JSX.Element;
|
|
7
7
|
export type QuickActionTriggerProps = ButtonProps;
|
|
8
|
-
interface QuickActionContentProps {
|
|
8
|
+
interface QuickActionContentProps extends DialogPopupProps {
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
className?: string;
|
|
11
11
|
align?: 'center' | 'start' | 'end';
|
|
@@ -15,6 +15,6 @@ export declare const QuickAction: (({ children, ...props }: Omit<DialogRootProps
|
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
}) => import("react/jsx-runtime.js").JSX.Element) & {
|
|
17
17
|
Trigger: ({ className, emphasis, children, ref, ...props }: QuickActionTriggerProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
18
|
-
Content: ({ children, className, align, ref, }: QuickActionContentProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
18
|
+
Content: ({ children, className, align, ref, style, ...rest }: QuickActionContentProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
19
19
|
};
|
|
20
20
|
export {};
|
|
@@ -50,7 +50,8 @@ const QuickActionTrigger = (_a) => {
|
|
|
50
50
|
} })));
|
|
51
51
|
}, children: children })));
|
|
52
52
|
};
|
|
53
|
-
const QuickActionContent = (
|
|
53
|
+
const QuickActionContent = (_a) => {
|
|
54
|
+
var { children, className, align = 'center', ref, style } = _a, rest = __rest(_a, ["children", "className", "align", "ref", "style"]);
|
|
54
55
|
const innerRef = (0, react_1.useRef)(null);
|
|
55
56
|
const finalRef = (0, useMergedRef_js_1.default)(innerRef, ref);
|
|
56
57
|
const layoutId = (0, react_1.useContext)(QuickActionIdContext);
|
|
@@ -62,7 +63,7 @@ const QuickActionContent = ({ children, className, align = 'center', ref, }) =>
|
|
|
62
63
|
style.setProperty('--trigger-height', `${size.height}px`);
|
|
63
64
|
}
|
|
64
65
|
});
|
|
65
|
-
return ((0, jsx_runtime_1.jsx)(dialog_1.Dialog.Portal, {
|
|
66
|
+
return ((0, jsx_runtime_1.jsx)(dialog_1.Dialog.Portal, { children: (0, jsx_runtime_1.jsx)(dialog_1.Dialog.Popup, Object.assign({ ref: finalRef, className: (0, clsx_1.default)('layer-components:contain-layout layer-components:border-1 layer-components:rounded-md layer-components:border-solid layer-components:shadow-lg layer-components:transition-all layer-components:transition-ease-out layer-components:bg-white layer-components:border-black layer-components:clip-inset-[-50px]-[-50px]-[-50px]-[-50px]', 'layer-components:fixed layer-components:bottom-[anchor(bottom)] layer-components:overflow-clip', {
|
|
66
67
|
'[justify-self:anchor-center]': align === 'center',
|
|
67
68
|
'left-[anchor(left)]': align === 'start',
|
|
68
69
|
'right-[anchor(right)]': align === 'end',
|
|
@@ -70,11 +71,7 @@ const QuickActionContent = ({ children, className, align = 'center', ref, }) =>
|
|
|
70
71
|
'start-end:clip-inset-[calc(100%_-_var(--trigger-height))]-[calc((100%_-_var(--trigger-width))/2)]-[0]-[calc((100%_-_var(--trigger-width))/2)]-[round]-[200px]': align === 'center',
|
|
71
72
|
'start-end:clip-inset-[calc(100%_-_var(--trigger-height))]-[calc(100%_-_var(--trigger-width))]-[0]-[0]-[round]-[200px]': align === 'start',
|
|
72
73
|
'start-end:clip-inset-[calc(100%_-_var(--trigger-height))]-[0]-[0]-[calc(100%_-_var(--trigger-width))]-[round]-[200px]': align === 'end',
|
|
73
|
-
}, 'data-[ending-style]:opacity-0', className), style: {
|
|
74
|
-
positionAnchor: `--${layoutId}`,
|
|
75
|
-
'--trigger-width': triggerSizeMonitor.get().width + 'px',
|
|
76
|
-
'--trigger-height': triggerSizeMonitor.get().height + 'px',
|
|
77
|
-
}, children: children }) }));
|
|
74
|
+
}, 'data-[ending-style]:opacity-0', className), style: Object.assign({ positionAnchor: `--${layoutId}`, '--trigger-width': triggerSizeMonitor.get().width + 'px', '--trigger-height': triggerSizeMonitor.get().height + 'px' }, style) }, rest, { children: children })) }));
|
|
78
75
|
};
|
|
79
76
|
exports.QuickAction = Object.assign(exports.QuickActionRoot, {
|
|
80
77
|
Trigger: QuickActionTrigger,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickAction.js","sourceRoot":"","sources":["../../../../src/components/quickAction/QuickAction.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"QuickAction.js","sourceRoot":"","sources":["../../../../src/components/quickAction/QuickAction.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,kDAI+B;AAC/B,gDAAwB;AACxB,iCAA4E;AAC5E,6CAAyC;AACzC,kFAAuD;AACvD,mEAIuC;AACvC,mDAA0D;AAE1D,MAAM,oBAAoB,GAAG,IAAA,qBAAa,EAAS,KAAK,CAAC,CAAC;AAE1D,MAAM,kBAAkB,GAAG,IAAA,qBAAa,EAEtC,IAAI,8BAAY,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAEtC,MAAM,eAAe,GAAG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CAAC,MAAM,cACb,uBAAC,eAAM,CAAC,KAAK,kBACZ,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,IAAA,cAAI,EACd,kLAAkL,EAClL,gEAAgE,EAChE;gBACC,8BAA8B,EAAE,KAAK,KAAK,QAAQ;gBAClD,qBAAqB,EAAE,KAAK,KAAK,OAAO;gBACxC,uBAAuB,EAAE,KAAK,KAAK,KAAK;aACxC,EACD;gBACC,+JAA+J,EAC9J,KAAK,KAAK,QAAQ;gBACnB,uHAAuH,EACtH,KAAK,KAAK,OAAO;gBAClB,uHAAuH,EACtH,KAAK,KAAK,KAAK;aAChB,EACD,+BAA+B,EAC/B,SAAS,CACT,EACD,KAAK,EACJ,gBACC,cAAc,EAAE,KAAK,QAAQ,EAAE,EAC/B,iBAAiB,EAAE,kBAAkB,CAAC,GAAG,EAAE,CAAC,KAAK,GAAG,IAAI,EACxD,kBAAkB,EAAE,kBAAkB,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,IAAI,IACvD,KAAK,CACD,IAEL,IAAI,cAEP,QAAQ,IACK,GACA,CAChB,CAAC;AACH,CAAC,CAAC;AAEW,QAAA,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAe,EAAE;IACzD,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,kBAAkB;CAC3B,CAAC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DialogRootProps } from '@base-ui/react/dialog';
|
|
1
|
+
import { DialogPopupProps, DialogRootProps } from '@base-ui/react/dialog';
|
|
2
2
|
import { RefObject } from 'react';
|
|
3
3
|
import { ButtonProps } from '../button/Button.js';
|
|
4
4
|
export declare const QuickActionRoot: ({ children, ...props }: Omit<DialogRootProps, "children"> & {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export type QuickActionTriggerProps = ButtonProps;
|
|
8
|
-
interface QuickActionContentProps {
|
|
8
|
+
interface QuickActionContentProps extends DialogPopupProps {
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
className?: string;
|
|
11
11
|
align?: 'center' | 'start' | 'end';
|
|
@@ -15,6 +15,6 @@ export declare const QuickAction: (({ children, ...props }: Omit<DialogRootProps
|
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
17
17
|
Trigger: ({ className, emphasis, children, ref, ...props }: QuickActionTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
Content: ({ children, className, align, ref, }: QuickActionContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
Content: ({ children, className, align, ref, style, ...rest }: QuickActionContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
};
|
|
20
20
|
export {};
|
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
import { Dialog } from '@base-ui/react/dialog';
|
|
14
|
+
import { Dialog, } from '@base-ui/react/dialog';
|
|
15
15
|
import clsx from 'clsx';
|
|
16
16
|
import { createContext, useContext, useId, useRef } from 'react';
|
|
17
17
|
import { useSize } from '../../hooks.js';
|
|
@@ -43,7 +43,8 @@ const QuickActionTrigger = (_a) => {
|
|
|
43
43
|
} })));
|
|
44
44
|
}, children: children })));
|
|
45
45
|
};
|
|
46
|
-
const QuickActionContent = (
|
|
46
|
+
const QuickActionContent = (_a) => {
|
|
47
|
+
var { children, className, align = 'center', ref, style } = _a, rest = __rest(_a, ["children", "className", "align", "ref", "style"]);
|
|
47
48
|
const innerRef = useRef(null);
|
|
48
49
|
const finalRef = useMergedRef(innerRef, ref);
|
|
49
50
|
const layoutId = useContext(QuickActionIdContext);
|
|
@@ -55,7 +56,7 @@ const QuickActionContent = ({ children, className, align = 'center', ref, }) =>
|
|
|
55
56
|
style.setProperty('--trigger-height', `${size.height}px`);
|
|
56
57
|
}
|
|
57
58
|
});
|
|
58
|
-
return (_jsx(Dialog.Portal, {
|
|
59
|
+
return (_jsx(Dialog.Portal, { children: _jsx(Dialog.Popup, Object.assign({ ref: finalRef, className: clsx('layer-components:contain-layout layer-components:border-1 layer-components:rounded-md layer-components:border-solid layer-components:shadow-lg layer-components:transition-all layer-components:transition-ease-out layer-components:bg-white layer-components:border-black layer-components:clip-inset-[-50px]-[-50px]-[-50px]-[-50px]', 'layer-components:fixed layer-components:bottom-[anchor(bottom)] layer-components:overflow-clip', {
|
|
59
60
|
'[justify-self:anchor-center]': align === 'center',
|
|
60
61
|
'left-[anchor(left)]': align === 'start',
|
|
61
62
|
'right-[anchor(right)]': align === 'end',
|
|
@@ -63,11 +64,7 @@ const QuickActionContent = ({ children, className, align = 'center', ref, }) =>
|
|
|
63
64
|
'start-end:clip-inset-[calc(100%_-_var(--trigger-height))]-[calc((100%_-_var(--trigger-width))/2)]-[0]-[calc((100%_-_var(--trigger-width))/2)]-[round]-[200px]': align === 'center',
|
|
64
65
|
'start-end:clip-inset-[calc(100%_-_var(--trigger-height))]-[calc(100%_-_var(--trigger-width))]-[0]-[0]-[round]-[200px]': align === 'start',
|
|
65
66
|
'start-end:clip-inset-[calc(100%_-_var(--trigger-height))]-[0]-[0]-[calc(100%_-_var(--trigger-width))]-[round]-[200px]': align === 'end',
|
|
66
|
-
}, 'data-[ending-style]:opacity-0', className), style: {
|
|
67
|
-
positionAnchor: `--${layoutId}`,
|
|
68
|
-
'--trigger-width': triggerSizeMonitor.get().width + 'px',
|
|
69
|
-
'--trigger-height': triggerSizeMonitor.get().height + 'px',
|
|
70
|
-
}, children: children }) }));
|
|
67
|
+
}, 'data-[ending-style]:opacity-0', className), style: Object.assign({ positionAnchor: `--${layoutId}`, '--trigger-width': triggerSizeMonitor.get().width + 'px', '--trigger-height': triggerSizeMonitor.get().height + 'px' }, style) }, rest, { children: children })) }));
|
|
71
68
|
};
|
|
72
69
|
export const QuickAction = Object.assign(QuickActionRoot, {
|
|
73
70
|
Trigger: QuickActionTrigger,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickAction.js","sourceRoot":"","sources":["../../../../src/components/quickAction/QuickAction.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"QuickAction.js","sourceRoot":"","sources":["../../../../src/components/quickAction/QuickAction.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACN,MAAM,GAGN,MAAM,uBAAuB,CAAC;AAC/B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAa,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACN,UAAU,EACV,eAAe,EACf,YAAY,GACZ,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;AAE1D,MAAM,oBAAoB,GAAG,aAAa,CAAS,KAAK,CAAC,CAAC;AAE1D,MAAM,kBAAkB,GAAG,aAAa,CAEtC,IAAI,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAK/B,EAAE,EAAE;QAL2B,EAC/B,QAAQ,OAIR,EAHG,KAAK,cAFuB,YAG/B,CADQ;IAIR,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACnB,MAAM,kBAAkB,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IACpE,OAAO,CACN,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,kBAAkB,YACrD,KAAC,MAAM,CAAC,IAAI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AAQ,EAAE,EAC/B,iBAAiB,EAAE,kBAAkB,CAAC,GAAG,EAAE,CAAC,KAAK,GAAG,IAAI,EACxD,kBAAkB,EAAE,kBAAkB,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,IAAI,IACvD,KAAK,CACD,IAEL,IAAI,cAEP,QAAQ,IACK,GACA,CAChB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;IACzD,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,kBAAkB;CAC3B,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Dialog,
|
|
3
|
+
DialogPopupProps,
|
|
4
|
+
DialogRootProps,
|
|
5
|
+
} from '@base-ui/react/dialog';
|
|
2
6
|
import clsx from 'clsx';
|
|
3
7
|
import { createContext, RefObject, useContext, useId, useRef } from 'react';
|
|
4
8
|
import { useSize } from '../../hooks.js';
|
|
@@ -75,7 +79,7 @@ const QuickActionTrigger = ({
|
|
|
75
79
|
);
|
|
76
80
|
};
|
|
77
81
|
|
|
78
|
-
interface QuickActionContentProps {
|
|
82
|
+
interface QuickActionContentProps extends DialogPopupProps {
|
|
79
83
|
children?: React.ReactNode;
|
|
80
84
|
className?: string;
|
|
81
85
|
align?: 'center' | 'start' | 'end';
|
|
@@ -86,6 +90,8 @@ const QuickActionContent = ({
|
|
|
86
90
|
className,
|
|
87
91
|
align = 'center',
|
|
88
92
|
ref,
|
|
93
|
+
style,
|
|
94
|
+
...rest
|
|
89
95
|
}: QuickActionContentProps) => {
|
|
90
96
|
const innerRef = useRef<HTMLDivElement>(null);
|
|
91
97
|
const finalRef = useMergedRef(innerRef, ref);
|
|
@@ -100,7 +106,7 @@ const QuickActionContent = ({
|
|
|
100
106
|
});
|
|
101
107
|
|
|
102
108
|
return (
|
|
103
|
-
<Dialog.Portal
|
|
109
|
+
<Dialog.Portal>
|
|
104
110
|
<Dialog.Popup
|
|
105
111
|
ref={finalRef}
|
|
106
112
|
className={clsx(
|
|
@@ -127,8 +133,10 @@ const QuickActionContent = ({
|
|
|
127
133
|
positionAnchor: `--${layoutId}`,
|
|
128
134
|
'--trigger-width': triggerSizeMonitor.get().width + 'px',
|
|
129
135
|
'--trigger-height': triggerSizeMonitor.get().height + 'px',
|
|
136
|
+
...style,
|
|
130
137
|
} as any
|
|
131
138
|
}
|
|
139
|
+
{...rest}
|
|
132
140
|
>
|
|
133
141
|
{children}
|
|
134
142
|
</Dialog.Popup>
|