musae 1.3.1-beta.8 → 1.3.1-beta.9
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/components/bottom-sheet/bottom-sheet.cjs +12 -7
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +1 -1
- package/dist/components/bottom-sheet/bottom-sheet.mjs +12 -7
- package/dist/components/sheet/sheet.cjs +2 -1
- package/dist/components/sheet/sheet.d.ts +1 -1
- package/dist/components/sheet/sheet.mjs +2 -1
- package/dist/types/bottom-sheet.d.ts +13 -1
- package/package.json +1 -1
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
6
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
6
|
var styles = require('./styles.cjs');
|
|
8
7
|
var React = require('react');
|
|
9
8
|
var sheet = require('../sheet/sheet.cjs');
|
|
@@ -13,7 +12,6 @@ var className = require('@aiszlab/relax/class-name');
|
|
|
13
12
|
var useThemeColorVars = require('../../hooks/use-theme-color-vars.cjs');
|
|
14
13
|
var context = require('./context.cjs');
|
|
15
14
|
|
|
16
|
-
var _excluded = ["open", "height", "closable", "modal"];
|
|
17
15
|
/**
|
|
18
16
|
* @zh BottomSheet 组件。从底部滑入的模态面板,带有拖拽手柄指示器。
|
|
19
17
|
* 基于共享的 Sheet 基础组件构建。
|
|
@@ -29,7 +27,12 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
29
27
|
closable = _ref$closable === void 0 ? true : _ref$closable,
|
|
30
28
|
_ref$modal = _ref.modal,
|
|
31
29
|
modal = _ref$modal === void 0 ? true : _ref$modal,
|
|
32
|
-
|
|
30
|
+
onClose = _ref.onClose,
|
|
31
|
+
className$1 = _ref.className,
|
|
32
|
+
style = _ref.style,
|
|
33
|
+
panelClassName = _ref.panelClassName,
|
|
34
|
+
panelStyle = _ref.panelStyle,
|
|
35
|
+
children = _ref.children;
|
|
33
36
|
var classNames = useClassNames.useClassNames(context.CLASS_NAMES);
|
|
34
37
|
var themeColorVars = useThemeColorVars.useThemeColorVars(["on-surface-variant"]);
|
|
35
38
|
var styled = {
|
|
@@ -50,11 +53,13 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
50
53
|
size: height,
|
|
51
54
|
closable: closable,
|
|
52
55
|
modal: modal,
|
|
53
|
-
onClose:
|
|
54
|
-
className: classNames.sheet,
|
|
56
|
+
onClose: onClose,
|
|
57
|
+
className: className.stringify(classNames.sheet, className$1),
|
|
58
|
+
style: style,
|
|
55
59
|
header: header,
|
|
56
|
-
panelClassName: styled.panel.className
|
|
57
|
-
|
|
60
|
+
panelClassName: className.stringify(styled.panel.className, panelClassName),
|
|
61
|
+
panelStyle: _objectSpread(_objectSpread({}, styled.panel.style), panelStyle)
|
|
62
|
+
}, children);
|
|
58
63
|
};
|
|
59
64
|
|
|
60
65
|
exports.default = BottomSheet;
|
|
@@ -6,5 +6,5 @@ import type { BottomSheetProps } from "../../types/bottom-sheet";
|
|
|
6
6
|
* @en BottomSheet component. A modal panel that slides up from the bottom
|
|
7
7
|
* with a drag handle indicator. Built on the shared Sheet base component.
|
|
8
8
|
*/
|
|
9
|
-
declare const BottomSheet: ({ open, height, closable, modal,
|
|
9
|
+
declare const BottomSheet: ({ open, height, closable, modal, onClose, className, style, panelClassName, panelStyle, children, }: BottomSheetProps) => React.JSX.Element;
|
|
10
10
|
export default BottomSheet;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
2
|
import styles from './styles.mjs';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import Sheet from '../sheet/sheet.mjs';
|
|
@@ -9,7 +8,6 @@ import { stringify } from '@aiszlab/relax/class-name';
|
|
|
9
8
|
import { useThemeColorVars } from '../../hooks/use-theme-color-vars.mjs';
|
|
10
9
|
import { CLASS_NAMES } from './context.mjs';
|
|
11
10
|
|
|
12
|
-
var _excluded = ["open", "height", "closable", "modal"];
|
|
13
11
|
/**
|
|
14
12
|
* @zh BottomSheet 组件。从底部滑入的模态面板,带有拖拽手柄指示器。
|
|
15
13
|
* 基于共享的 Sheet 基础组件构建。
|
|
@@ -25,7 +23,12 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
25
23
|
closable = _ref$closable === void 0 ? true : _ref$closable,
|
|
26
24
|
_ref$modal = _ref.modal,
|
|
27
25
|
modal = _ref$modal === void 0 ? true : _ref$modal,
|
|
28
|
-
|
|
26
|
+
onClose = _ref.onClose,
|
|
27
|
+
className = _ref.className,
|
|
28
|
+
style = _ref.style,
|
|
29
|
+
panelClassName = _ref.panelClassName,
|
|
30
|
+
panelStyle = _ref.panelStyle,
|
|
31
|
+
children = _ref.children;
|
|
29
32
|
var classNames = useClassNames(CLASS_NAMES);
|
|
30
33
|
var themeColorVars = useThemeColorVars(["on-surface-variant"]);
|
|
31
34
|
var styled = {
|
|
@@ -46,11 +49,13 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
46
49
|
size: height,
|
|
47
50
|
closable: closable,
|
|
48
51
|
modal: modal,
|
|
49
|
-
onClose:
|
|
50
|
-
className: classNames.sheet,
|
|
52
|
+
onClose: onClose,
|
|
53
|
+
className: stringify(classNames.sheet, className),
|
|
54
|
+
style: style,
|
|
51
55
|
header: header,
|
|
52
|
-
panelClassName: styled.panel.className
|
|
53
|
-
|
|
56
|
+
panelClassName: stringify(styled.panel.className, panelClassName),
|
|
57
|
+
panelStyle: _objectSpread(_objectSpread({}, styled.panel.style), panelStyle)
|
|
58
|
+
}, children);
|
|
54
59
|
};
|
|
55
60
|
|
|
56
61
|
export { BottomSheet as default };
|
|
@@ -40,6 +40,7 @@ var Sheet = function Sheet(_ref) {
|
|
|
40
40
|
header = _ref.header,
|
|
41
41
|
footer = _ref.footer,
|
|
42
42
|
className$1 = _ref.className,
|
|
43
|
+
style = _ref.style,
|
|
43
44
|
panelClassName = _ref.panelClassName,
|
|
44
45
|
panelStyle = _ref.panelStyle,
|
|
45
46
|
_ref$modal = _ref.modal,
|
|
@@ -140,7 +141,7 @@ var Sheet = function Sheet(_ref) {
|
|
|
140
141
|
style: _objectSpread(_objectSpread(_objectSpread({}, styled.container.style), themeColorVars), {}, {
|
|
141
142
|
"--default-position": relax.at(_placement, 0),
|
|
142
143
|
"--size": typeof size === "number" ? "".concat(size, "px") : size
|
|
143
|
-
}),
|
|
144
|
+
}, style),
|
|
144
145
|
onKeyDown: onKeyDown
|
|
145
146
|
}, /*#__PURE__*/React.createElement("div", {
|
|
146
147
|
ref: overlayRef,
|
|
@@ -7,5 +7,5 @@ import type { SheetProps } from "../../types/sheet";
|
|
|
7
7
|
* placement-driven slide animation, focus management, and body scroll lock.
|
|
8
8
|
* Drawer and BottomSheet are thin wrappers around this component.
|
|
9
9
|
*/
|
|
10
|
-
declare const Sheet: ({ visible, onClose, placement, size, closable, header, footer, className, panelClassName, panelStyle, modal, children, }: SheetProps) => React.JSX.Element;
|
|
10
|
+
declare const Sheet: ({ visible, onClose, placement, size, closable, header, footer, className, style, panelClassName, panelStyle, modal, children, }: SheetProps) => React.JSX.Element;
|
|
11
11
|
export default Sheet;
|
|
@@ -36,6 +36,7 @@ var Sheet = function Sheet(_ref) {
|
|
|
36
36
|
header = _ref.header,
|
|
37
37
|
footer = _ref.footer,
|
|
38
38
|
className = _ref.className,
|
|
39
|
+
style = _ref.style,
|
|
39
40
|
panelClassName = _ref.panelClassName,
|
|
40
41
|
panelStyle = _ref.panelStyle,
|
|
41
42
|
_ref$modal = _ref.modal,
|
|
@@ -136,7 +137,7 @@ var Sheet = function Sheet(_ref) {
|
|
|
136
137
|
style: _objectSpread(_objectSpread(_objectSpread({}, styled.container.style), themeColorVars), {}, {
|
|
137
138
|
"--default-position": at(_placement, 0),
|
|
138
139
|
"--size": typeof size === "number" ? "".concat(size, "px") : size
|
|
139
|
-
}),
|
|
140
|
+
}, style),
|
|
140
141
|
onKeyDown: onKeyDown
|
|
141
142
|
}, /*#__PURE__*/React.createElement("div", {
|
|
142
143
|
ref: overlayRef,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
1
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
2
2
|
import type { ComponentProps } from "./element";
|
|
3
3
|
import type { Closable } from "../hooks/use-closable";
|
|
4
4
|
export interface BottomSheetProps extends ComponentProps {
|
|
@@ -20,6 +20,18 @@ export interface BottomSheetProps extends ComponentProps {
|
|
|
20
20
|
* @default void 0
|
|
21
21
|
*/
|
|
22
22
|
children?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* @zh 应用到 Bottom Sheet 面板元素上的额外类名。
|
|
25
|
+
* @en Additional class name applied to the Bottom Sheet panel element.
|
|
26
|
+
* @default void 0
|
|
27
|
+
*/
|
|
28
|
+
panelClassName?: string;
|
|
29
|
+
/**
|
|
30
|
+
* @zh 应用到 Bottom Sheet 面板元素上的额外内联样式。
|
|
31
|
+
* @en Additional inline styles applied to the Bottom Sheet panel element.
|
|
32
|
+
* @default void 0
|
|
33
|
+
*/
|
|
34
|
+
panelStyle?: CSSProperties;
|
|
23
35
|
/**
|
|
24
36
|
* @zh 面板高度,接受数字(px)或任意 CSS 高度值。
|
|
25
37
|
* @en Height of the sheet panel. Accepts a number (px) or any CSS height value.
|