musae 1.2.0 → 1.3.1-beta.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.
- package/dist/components/card/actions.cjs +31 -0
- package/dist/components/card/actions.d.ts +31 -0
- package/dist/components/card/actions.mjs +27 -0
- package/dist/components/card/body.cjs +30 -0
- package/dist/components/card/body.d.ts +18 -0
- package/dist/components/card/body.mjs +26 -0
- package/dist/components/card/card.cjs +76 -140
- package/dist/components/card/card.d.ts +23 -150
- package/dist/components/card/card.mjs +67 -135
- package/dist/components/card/content.cjs +33 -0
- package/dist/components/card/content.d.ts +33 -0
- package/dist/components/card/content.mjs +29 -0
- package/dist/components/card/context.cjs +14 -1
- package/dist/components/card/context.d.ts +15 -1
- package/dist/components/card/context.mjs +13 -2
- package/dist/components/card/header.cjs +79 -0
- package/dist/components/card/header.d.ts +58 -0
- package/dist/components/card/header.mjs +75 -0
- package/dist/components/card/headline.cjs +30 -0
- package/dist/components/card/headline.d.ts +18 -0
- package/dist/components/card/headline.mjs +26 -0
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/media.cjs +50 -0
- package/dist/components/card/media.d.ts +42 -0
- package/dist/components/card/media.mjs +46 -0
- package/dist/components/card/styles.cjs +133 -14
- package/dist/components/card/styles.d.ts +88 -28
- package/dist/components/card/styles.mjs +133 -14
- package/dist/components/card/subhead.cjs +30 -0
- package/dist/components/card/subhead.d.ts +18 -0
- package/dist/components/card/subhead.mjs +26 -0
- package/dist/components/card/title.cjs +30 -0
- package/dist/components/card/title.d.ts +18 -0
- package/dist/components/card/title.mjs +26 -0
- package/dist/components/search/search.cjs +3 -1
- package/dist/components/search/search.d.ts +1 -0
- package/dist/components/search/search.mjs +3 -1
- package/dist/components/sheet/sheet.cjs +13 -3
- package/dist/components/sheet/sheet.d.ts +1 -1
- package/dist/components/sheet/sheet.mjs +13 -3
- package/dist/components/side-sheet/__test__/index.test.d.ts +1 -0
- package/dist/components/side-sheet/context.cjs +15 -0
- package/dist/components/side-sheet/context.d.ts +11 -0
- package/dist/components/side-sheet/context.mjs +13 -0
- package/dist/components/side-sheet/index.d.ts +2 -0
- package/dist/components/side-sheet/side-sheet.cjs +140 -0
- package/dist/components/side-sheet/side-sheet.d.ts +16 -0
- package/dist/components/side-sheet/side-sheet.mjs +136 -0
- package/dist/components/side-sheet/styles.cjs +106 -0
- package/dist/components/side-sheet/styles.d.ts +83 -0
- package/dist/components/side-sheet/styles.mjs +104 -0
- package/dist/components/theme/theme.cjs +31 -0
- package/dist/components/theme/theme.mjs +31 -1
- package/dist/components/theme/tokens.stylex.cjs +4 -1
- package/dist/components/theme/tokens.stylex.d.ts +16 -1
- package/dist/components/theme/tokens.stylex.mjs +4 -1
- package/dist/components/typography/body.cjs +31 -0
- package/dist/components/typography/body.d.ts +8 -0
- package/dist/components/typography/body.mjs +27 -0
- package/dist/components/typography/context.cjs +15 -0
- package/dist/components/typography/context.d.ts +11 -0
- package/dist/components/typography/context.mjs +13 -0
- package/dist/components/typography/display.cjs +31 -0
- package/dist/components/typography/display.d.ts +8 -0
- package/dist/components/typography/display.mjs +27 -0
- package/dist/components/typography/headline.cjs +31 -0
- package/dist/components/typography/headline.d.ts +8 -0
- package/dist/components/typography/headline.mjs +27 -0
- package/dist/components/typography/index.d.ts +2 -0
- package/dist/components/typography/label.cjs +31 -0
- package/dist/components/typography/label.d.ts +8 -0
- package/dist/components/typography/label.mjs +27 -0
- package/dist/components/typography/title.cjs +31 -0
- package/dist/components/typography/title.d.ts +8 -0
- package/dist/components/typography/title.mjs +27 -0
- package/dist/components/typography/typography.cjs +24 -0
- package/dist/components/typography/typography.d.ts +14 -0
- package/dist/components/typography/typography.mjs +15 -0
- package/dist/index.cjs +4 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +2 -1
- package/dist/styles.css +118 -23
- package/dist/types/card.d.ts +39 -2
- package/dist/types/search.d.ts +6 -0
- package/dist/types/sheet.d.ts +6 -0
- package/dist/types/side-sheet.d.ts +90 -0
- package/dist/types/typography.d.ts +15 -0
- package/package.json +2 -4
- package/dist/components/drawer/context.cjs +0 -14
- package/dist/components/drawer/context.d.ts +0 -10
- package/dist/components/drawer/context.mjs +0 -12
- package/dist/components/drawer/drawer.cjs +0 -92
- package/dist/components/drawer/drawer.d.ts +0 -9
- package/dist/components/drawer/drawer.mjs +0 -88
- package/dist/components/drawer/index.d.ts +0 -2
- package/dist/types/drawer.d.ts +0 -74
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
6
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var sheet = require('../sheet/sheet.cjs');
|
|
9
|
+
var divider = require('../divider/divider.cjs');
|
|
10
|
+
var button = require('../button/button.cjs');
|
|
11
|
+
var iconButton = require('../icon-button/icon-button.cjs');
|
|
12
|
+
var useClosable = require('../../hooks/use-closable.cjs');
|
|
13
|
+
var useClassNames = require('../../hooks/use-class-names.cjs');
|
|
14
|
+
var useThemeColorVars = require('../../hooks/use-theme-color-vars.cjs');
|
|
15
|
+
var useLocale = require('../../locale/use-locale.cjs');
|
|
16
|
+
var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.19.0/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
|
|
17
|
+
var className = require('@aiszlab/relax/class-name');
|
|
18
|
+
var theme = require('../theme/theme.cjs');
|
|
19
|
+
var context = require('./context.cjs');
|
|
20
|
+
var styles = require('./styles.cjs');
|
|
21
|
+
var arrowBack = require('../icon/icons/navigation/arrow-back.cjs');
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @zh SideSheet 组件。Material Design 3 侧边栏:承载补充内容或操作的面板,
|
|
25
|
+
* 支持从屏幕四边(left/right/top/bottom)滑入。`modal` 类型基于共享的 Sheet
|
|
26
|
+
* 基础组件构建(遮罩层 + 滑入动画),mobile 下全屏展示;`standard` 类型内嵌
|
|
27
|
+
* 在布局中展示(无遮罩层,停靠边缘带分割线)。
|
|
28
|
+
* @en SideSheet component. A Material Design 3 side sheet: a surface for
|
|
29
|
+
* supplementary content or actions, sliding in from any screen edge
|
|
30
|
+
* (left/right/top/bottom). The `modal` type is built on the shared Sheet base
|
|
31
|
+
* component (scrim + slide animation) and goes fullscreen on mobile;
|
|
32
|
+
* the `standard` type renders inline in the layout (no scrim, with a divider
|
|
33
|
+
* on the anchored edge).
|
|
34
|
+
*/
|
|
35
|
+
var SideSheet = function SideSheet(_ref) {
|
|
36
|
+
var open = _ref.open,
|
|
37
|
+
_ref$type = _ref.type,
|
|
38
|
+
type = _ref$type === void 0 ? "modal" : _ref$type,
|
|
39
|
+
title = _ref.title,
|
|
40
|
+
onBack = _ref.onBack,
|
|
41
|
+
onConfirm = _ref.onConfirm,
|
|
42
|
+
_ref$closable = _ref.closable,
|
|
43
|
+
closable = _ref$closable === void 0 ? true : _ref$closable,
|
|
44
|
+
onClose = _ref.onClose,
|
|
45
|
+
actions = _ref.actions,
|
|
46
|
+
_ref$size = _ref.size,
|
|
47
|
+
size = _ref$size === void 0 ? 400 : _ref$size,
|
|
48
|
+
_ref$placement = _ref.placement,
|
|
49
|
+
placement = _ref$placement === void 0 ? "right" : _ref$placement,
|
|
50
|
+
className$1 = _ref.className,
|
|
51
|
+
style = _ref.style,
|
|
52
|
+
children = _ref.children;
|
|
53
|
+
var classNames = useClassNames.useClassNames(context.CLASS_NAMES);
|
|
54
|
+
var themeColorVars = useThemeColorVars.useThemeColorVars(["surface", "surface-container-low", "on-surface-variant", "outline-variant"]);
|
|
55
|
+
var _useLocale = useLocale.useLocale("drawer"),
|
|
56
|
+
_useLocale2 = _slicedToArray(_useLocale, 1),
|
|
57
|
+
locale = _useLocale2[0];
|
|
58
|
+
var _useClosable = useClosable.useClosable({
|
|
59
|
+
closable: closable,
|
|
60
|
+
onClose: onClose
|
|
61
|
+
}),
|
|
62
|
+
closer = _useClosable.closer;
|
|
63
|
+
var styled = {
|
|
64
|
+
panel: stylex.props(styles.styles.panel["default"]),
|
|
65
|
+
standard: stylex.props(styles.styles.standard["default"], styles.styles.standard[placement]),
|
|
66
|
+
header: stylex.props(styles.styles.header["default"], onBack ? styles.styles.header.withBack : styles.styles.header.withTitle),
|
|
67
|
+
title: stylex.props(theme.$title.large, styles.styles.title["default"]),
|
|
68
|
+
content: stylex.props(styles.styles.content["default"]),
|
|
69
|
+
actions: stylex.props(styles.styles.actions["default"]),
|
|
70
|
+
actionsRow: stylex.props(styles.styles.actions.row)
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* @zh 头部栏:可选的返回按钮、标题和关闭按钮。
|
|
74
|
+
* 三者都不存在时不渲染头部,避免空置的占位空间。
|
|
75
|
+
* @en Header bar: optional back button, headline, and closer.
|
|
76
|
+
* Not rendered when all three are absent, avoiding empty placeholder space.
|
|
77
|
+
*/
|
|
78
|
+
var hasHeader = !!title || !!onBack || !!onConfirm || !!closer;
|
|
79
|
+
var header = hasHeader ? (/*#__PURE__*/React.createElement("div", {
|
|
80
|
+
className: className.stringify(classNames.header, styled.header.className),
|
|
81
|
+
style: styled.header.style
|
|
82
|
+
}, onBack && (/*#__PURE__*/React.createElement(iconButton.default, {
|
|
83
|
+
variant: "text",
|
|
84
|
+
onClick: onBack
|
|
85
|
+
}, /*#__PURE__*/React.createElement(arrowBack.default, null))), /*#__PURE__*/React.createElement("div", {
|
|
86
|
+
className: className.stringify(classNames.title, styled.title.className),
|
|
87
|
+
style: styled.title.style
|
|
88
|
+
}, title), onConfirm && /*#__PURE__*/React.createElement(button.Button, {
|
|
89
|
+
onClick: onConfirm
|
|
90
|
+
}, locale.confirm), closer)) : null;
|
|
91
|
+
/**
|
|
92
|
+
* @zh 底部操作区:分割线 + 操作按钮行。
|
|
93
|
+
* @en Footer actions: a divider above the actions row.
|
|
94
|
+
*/
|
|
95
|
+
var footer = actions ? (/*#__PURE__*/React.createElement("div", {
|
|
96
|
+
className: className.stringify(classNames.actions, styled.actions.className),
|
|
97
|
+
style: styled.actions.style
|
|
98
|
+
}, /*#__PURE__*/React.createElement(divider.default, {
|
|
99
|
+
margin: 0
|
|
100
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
101
|
+
className: styled.actionsRow.className,
|
|
102
|
+
style: styled.actionsRow.style
|
|
103
|
+
}, actions))) : null;
|
|
104
|
+
/**
|
|
105
|
+
* @zh 标准类型:内嵌在布局中展示,无遮罩层,停靠边缘带分割线。
|
|
106
|
+
* @en Standard type: rendered inline in the layout, without a scrim,
|
|
107
|
+
* with a divider on the anchored edge.
|
|
108
|
+
*/
|
|
109
|
+
if (type === "standard") {
|
|
110
|
+
if (!open) return null;
|
|
111
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
112
|
+
className: className.stringify(classNames.sideSheet, className$1, styled.standard.className),
|
|
113
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, styled.standard.style), themeColorVars), {}, {
|
|
114
|
+
"--size": typeof size === "number" ? "".concat(size, "px") : size
|
|
115
|
+
}, style)
|
|
116
|
+
}, header, /*#__PURE__*/React.createElement("div", {
|
|
117
|
+
className: className.stringify(classNames.content, styled.content.className),
|
|
118
|
+
style: styled.content.style
|
|
119
|
+
}, children), footer);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* @zh 模态类型:基于共享的 Sheet 基础组件,带遮罩层和滑入动画。
|
|
123
|
+
* @en Modal type: built on the shared Sheet base component, with a scrim
|
|
124
|
+
* and slide animation.
|
|
125
|
+
*/
|
|
126
|
+
return /*#__PURE__*/React.createElement(sheet.default, {
|
|
127
|
+
visible: open,
|
|
128
|
+
placement: placement,
|
|
129
|
+
size: size,
|
|
130
|
+
closable: closable,
|
|
131
|
+
onClose: onClose,
|
|
132
|
+
className: classNames.sideSheet,
|
|
133
|
+
header: header,
|
|
134
|
+
footer: footer,
|
|
135
|
+
panelClassName: styled.panel.className,
|
|
136
|
+
panelStyle: _objectSpread(_objectSpread({}, themeColorVars), styled.panel.style)
|
|
137
|
+
}, children);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
exports.default = SideSheet;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SideSheetProps } from "../../types/side-sheet";
|
|
3
|
+
/**
|
|
4
|
+
* @zh SideSheet 组件。Material Design 3 侧边栏:承载补充内容或操作的面板,
|
|
5
|
+
* 支持从屏幕四边(left/right/top/bottom)滑入。`modal` 类型基于共享的 Sheet
|
|
6
|
+
* 基础组件构建(遮罩层 + 滑入动画),mobile 下全屏展示;`standard` 类型内嵌
|
|
7
|
+
* 在布局中展示(无遮罩层,停靠边缘带分割线)。
|
|
8
|
+
* @en SideSheet component. A Material Design 3 side sheet: a surface for
|
|
9
|
+
* supplementary content or actions, sliding in from any screen edge
|
|
10
|
+
* (left/right/top/bottom). The `modal` type is built on the shared Sheet base
|
|
11
|
+
* component (scrim + slide animation) and goes fullscreen on mobile;
|
|
12
|
+
* the `standard` type renders inline in the layout (no scrim, with a divider
|
|
13
|
+
* on the anchored edge).
|
|
14
|
+
*/
|
|
15
|
+
declare const SideSheet: ({ open, type, title, onBack, onConfirm, closable, onClose, actions, size, placement, className, style, children, }: SideSheetProps) => React.JSX.Element | null;
|
|
16
|
+
export default SideSheet;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Sheet from '../sheet/sheet.mjs';
|
|
5
|
+
import Divider from '../divider/divider.mjs';
|
|
6
|
+
import { Button } from '../button/button.mjs';
|
|
7
|
+
import IconButton from '../icon-button/icon-button.mjs';
|
|
8
|
+
import { useClosable } from '../../hooks/use-closable.mjs';
|
|
9
|
+
import { useClassNames } from '../../hooks/use-class-names.mjs';
|
|
10
|
+
import { useThemeColorVars } from '../../hooks/use-theme-color-vars.mjs';
|
|
11
|
+
import { useLocale } from '../../locale/use-locale.mjs';
|
|
12
|
+
import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.19.0/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
|
|
13
|
+
import { stringify } from '@aiszlab/relax/class-name';
|
|
14
|
+
import { $title } from '../theme/theme.mjs';
|
|
15
|
+
import { CLASS_NAMES } from './context.mjs';
|
|
16
|
+
import { styles } from './styles.mjs';
|
|
17
|
+
import IconArrowBack from '../icon/icons/navigation/arrow-back.mjs';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @zh SideSheet 组件。Material Design 3 侧边栏:承载补充内容或操作的面板,
|
|
21
|
+
* 支持从屏幕四边(left/right/top/bottom)滑入。`modal` 类型基于共享的 Sheet
|
|
22
|
+
* 基础组件构建(遮罩层 + 滑入动画),mobile 下全屏展示;`standard` 类型内嵌
|
|
23
|
+
* 在布局中展示(无遮罩层,停靠边缘带分割线)。
|
|
24
|
+
* @en SideSheet component. A Material Design 3 side sheet: a surface for
|
|
25
|
+
* supplementary content or actions, sliding in from any screen edge
|
|
26
|
+
* (left/right/top/bottom). The `modal` type is built on the shared Sheet base
|
|
27
|
+
* component (scrim + slide animation) and goes fullscreen on mobile;
|
|
28
|
+
* the `standard` type renders inline in the layout (no scrim, with a divider
|
|
29
|
+
* on the anchored edge).
|
|
30
|
+
*/
|
|
31
|
+
var SideSheet = function SideSheet(_ref) {
|
|
32
|
+
var open = _ref.open,
|
|
33
|
+
_ref$type = _ref.type,
|
|
34
|
+
type = _ref$type === void 0 ? "modal" : _ref$type,
|
|
35
|
+
title = _ref.title,
|
|
36
|
+
onBack = _ref.onBack,
|
|
37
|
+
onConfirm = _ref.onConfirm,
|
|
38
|
+
_ref$closable = _ref.closable,
|
|
39
|
+
closable = _ref$closable === void 0 ? true : _ref$closable,
|
|
40
|
+
onClose = _ref.onClose,
|
|
41
|
+
actions = _ref.actions,
|
|
42
|
+
_ref$size = _ref.size,
|
|
43
|
+
size = _ref$size === void 0 ? 400 : _ref$size,
|
|
44
|
+
_ref$placement = _ref.placement,
|
|
45
|
+
placement = _ref$placement === void 0 ? "right" : _ref$placement,
|
|
46
|
+
className = _ref.className,
|
|
47
|
+
style = _ref.style,
|
|
48
|
+
children = _ref.children;
|
|
49
|
+
var classNames = useClassNames(CLASS_NAMES);
|
|
50
|
+
var themeColorVars = useThemeColorVars(["surface", "surface-container-low", "on-surface-variant", "outline-variant"]);
|
|
51
|
+
var _useLocale = useLocale("drawer"),
|
|
52
|
+
_useLocale2 = _slicedToArray(_useLocale, 1),
|
|
53
|
+
locale = _useLocale2[0];
|
|
54
|
+
var _useClosable = useClosable({
|
|
55
|
+
closable: closable,
|
|
56
|
+
onClose: onClose
|
|
57
|
+
}),
|
|
58
|
+
closer = _useClosable.closer;
|
|
59
|
+
var styled = {
|
|
60
|
+
panel: props(styles.panel["default"]),
|
|
61
|
+
standard: props(styles.standard["default"], styles.standard[placement]),
|
|
62
|
+
header: props(styles.header["default"], onBack ? styles.header.withBack : styles.header.withTitle),
|
|
63
|
+
title: props($title.large, styles.title["default"]),
|
|
64
|
+
content: props(styles.content["default"]),
|
|
65
|
+
actions: props(styles.actions["default"]),
|
|
66
|
+
actionsRow: props(styles.actions.row)
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* @zh 头部栏:可选的返回按钮、标题和关闭按钮。
|
|
70
|
+
* 三者都不存在时不渲染头部,避免空置的占位空间。
|
|
71
|
+
* @en Header bar: optional back button, headline, and closer.
|
|
72
|
+
* Not rendered when all three are absent, avoiding empty placeholder space.
|
|
73
|
+
*/
|
|
74
|
+
var hasHeader = !!title || !!onBack || !!onConfirm || !!closer;
|
|
75
|
+
var header = hasHeader ? (/*#__PURE__*/React.createElement("div", {
|
|
76
|
+
className: stringify(classNames.header, styled.header.className),
|
|
77
|
+
style: styled.header.style
|
|
78
|
+
}, onBack && (/*#__PURE__*/React.createElement(IconButton, {
|
|
79
|
+
variant: "text",
|
|
80
|
+
onClick: onBack
|
|
81
|
+
}, /*#__PURE__*/React.createElement(IconArrowBack, null))), /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
className: stringify(classNames.title, styled.title.className),
|
|
83
|
+
style: styled.title.style
|
|
84
|
+
}, title), onConfirm && /*#__PURE__*/React.createElement(Button, {
|
|
85
|
+
onClick: onConfirm
|
|
86
|
+
}, locale.confirm), closer)) : null;
|
|
87
|
+
/**
|
|
88
|
+
* @zh 底部操作区:分割线 + 操作按钮行。
|
|
89
|
+
* @en Footer actions: a divider above the actions row.
|
|
90
|
+
*/
|
|
91
|
+
var footer = actions ? (/*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: stringify(classNames.actions, styled.actions.className),
|
|
93
|
+
style: styled.actions.style
|
|
94
|
+
}, /*#__PURE__*/React.createElement(Divider, {
|
|
95
|
+
margin: 0
|
|
96
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
97
|
+
className: styled.actionsRow.className,
|
|
98
|
+
style: styled.actionsRow.style
|
|
99
|
+
}, actions))) : null;
|
|
100
|
+
/**
|
|
101
|
+
* @zh 标准类型:内嵌在布局中展示,无遮罩层,停靠边缘带分割线。
|
|
102
|
+
* @en Standard type: rendered inline in the layout, without a scrim,
|
|
103
|
+
* with a divider on the anchored edge.
|
|
104
|
+
*/
|
|
105
|
+
if (type === "standard") {
|
|
106
|
+
if (!open) return null;
|
|
107
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
108
|
+
className: stringify(classNames.sideSheet, className, styled.standard.className),
|
|
109
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, styled.standard.style), themeColorVars), {}, {
|
|
110
|
+
"--size": typeof size === "number" ? "".concat(size, "px") : size
|
|
111
|
+
}, style)
|
|
112
|
+
}, header, /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
className: stringify(classNames.content, styled.content.className),
|
|
114
|
+
style: styled.content.style
|
|
115
|
+
}, children), footer);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @zh 模态类型:基于共享的 Sheet 基础组件,带遮罩层和滑入动画。
|
|
119
|
+
* @en Modal type: built on the shared Sheet base component, with a scrim
|
|
120
|
+
* and slide animation.
|
|
121
|
+
*/
|
|
122
|
+
return /*#__PURE__*/React.createElement(Sheet, {
|
|
123
|
+
visible: open,
|
|
124
|
+
placement: placement,
|
|
125
|
+
size: size,
|
|
126
|
+
closable: closable,
|
|
127
|
+
onClose: onClose,
|
|
128
|
+
className: classNames.sideSheet,
|
|
129
|
+
header: header,
|
|
130
|
+
footer: footer,
|
|
131
|
+
panelClassName: styled.panel.className,
|
|
132
|
+
panelStyle: _objectSpread(_objectSpread({}, themeColorVars), styled.panel.style)
|
|
133
|
+
}, children);
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export { SideSheet as default };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var panel = {
|
|
4
|
+
"default": {
|
|
5
|
+
kWkggS: "musaex-1eai1fy",
|
|
6
|
+
kGO01o: "musaex-1oxn6w8",
|
|
7
|
+
$$css: true
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var standard = {
|
|
11
|
+
"default": {
|
|
12
|
+
k1xSpc: "musaex-78zum5",
|
|
13
|
+
kXwgrk: "musaex-dt5ytf",
|
|
14
|
+
kzqmXN: "musaex-1fjlwjz",
|
|
15
|
+
kZKoxP: "musaex-qg7gut",
|
|
16
|
+
kmuXW: "musaex-2lah0s",
|
|
17
|
+
kWkggS: "musaex-k7eln3",
|
|
18
|
+
kGO01o: "musaex-1oxn6w8",
|
|
19
|
+
$$css: true
|
|
20
|
+
},
|
|
21
|
+
right: {
|
|
22
|
+
kZ1KPB: "musaex-6vwjc",
|
|
23
|
+
k4WBpm: "musaex-19ypqd9",
|
|
24
|
+
kaZRDh: "musaex-svd4c5",
|
|
25
|
+
$$css: true
|
|
26
|
+
},
|
|
27
|
+
left: {
|
|
28
|
+
kWqL5O: "musaex-a640vs",
|
|
29
|
+
kSWEuD: "musaex-32b0ac",
|
|
30
|
+
k26BEO: "musaex-imfbgf",
|
|
31
|
+
$$css: true
|
|
32
|
+
},
|
|
33
|
+
top: {
|
|
34
|
+
kt9PQ7: "musaex-d1xpcx",
|
|
35
|
+
kfdmCh: "musaex-1q0q8m5",
|
|
36
|
+
kL6WhQ: "musaex-quqrak",
|
|
37
|
+
$$css: true
|
|
38
|
+
},
|
|
39
|
+
bottom: {
|
|
40
|
+
kEafiO: "musaex-uvson1",
|
|
41
|
+
kPef9Z: "musaex-13fuv20",
|
|
42
|
+
kLZC3w: "musaex-6ogecl",
|
|
43
|
+
$$css: true
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var header = {
|
|
47
|
+
"default": {
|
|
48
|
+
k1xSpc: "musaex-78zum5",
|
|
49
|
+
kGNEyG: "musaex-1cy8zhl",
|
|
50
|
+
kLKAdn: "musaex-h1u3e4",
|
|
51
|
+
kGO01o: "musaex-5ynjmo",
|
|
52
|
+
kwRFfy: "musaex-1max5gj",
|
|
53
|
+
$$css: true
|
|
54
|
+
},
|
|
55
|
+
withTitle: {
|
|
56
|
+
kZCmMZ: "musaex-150i2hq",
|
|
57
|
+
$$css: true
|
|
58
|
+
},
|
|
59
|
+
withBack: {
|
|
60
|
+
kZCmMZ: "musaex-1rl4tsp",
|
|
61
|
+
$$css: true
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var content = {
|
|
65
|
+
"default": {
|
|
66
|
+
kUk6DE: "musaex-98rzlu",
|
|
67
|
+
kAzted: "musaex-2lwn1j",
|
|
68
|
+
kVQacm: "musaex-ysyzu8",
|
|
69
|
+
kZeWKH: "musaex-ish69e",
|
|
70
|
+
$$css: true
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var title = {
|
|
74
|
+
"default": {
|
|
75
|
+
kUk6DE: "musaex-98rzlu",
|
|
76
|
+
k7Eaqz: "musaex-euugli",
|
|
77
|
+
kLKAdn: "musaex-h1u3e4",
|
|
78
|
+
kMwMTN: "musaex-bq1wot",
|
|
79
|
+
$$css: true
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
var actions = {
|
|
83
|
+
"default": {
|
|
84
|
+
k1xSpc: "musaex-78zum5",
|
|
85
|
+
kXwgrk: "musaex-dt5ytf",
|
|
86
|
+
$$css: true
|
|
87
|
+
},
|
|
88
|
+
row: {
|
|
89
|
+
k1xSpc: "musaex-78zum5",
|
|
90
|
+
kGNEyG: "musaex-6s0dn4",
|
|
91
|
+
kOIVth: "musaex-1wm2zkp",
|
|
92
|
+
kLKAdn: "musaex-1oop6c3",
|
|
93
|
+
kg3NbH: "musaex-1pyhihf",
|
|
94
|
+
$$css: true
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var styles = {
|
|
98
|
+
panel: panel,
|
|
99
|
+
standard: standard,
|
|
100
|
+
header: header,
|
|
101
|
+
title: title,
|
|
102
|
+
content: content,
|
|
103
|
+
actions: actions
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
exports.styles = styles;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
panel: Readonly<{
|
|
3
|
+
readonly default: Readonly<{
|
|
4
|
+
readonly backgroundColor: import("@stylexjs/stylex").StyleXClassNameFor<"backgroundColor", "var(--color-surface-container-low)">;
|
|
5
|
+
readonly paddingBottom: import("@stylexjs/stylex").StyleXClassNameFor<"paddingBottom", string>;
|
|
6
|
+
}>;
|
|
7
|
+
}>;
|
|
8
|
+
standard: Readonly<{
|
|
9
|
+
readonly default: Readonly<{
|
|
10
|
+
readonly display: import("@stylexjs/stylex").StyleXClassNameFor<"display", "flex">;
|
|
11
|
+
readonly flexDirection: import("@stylexjs/stylex").StyleXClassNameFor<"flexDirection", "column">;
|
|
12
|
+
readonly width: import("@stylexjs/stylex").StyleXClassNameFor<"width", "var(--size)">;
|
|
13
|
+
readonly height: import("@stylexjs/stylex").StyleXClassNameFor<"height", string>;
|
|
14
|
+
readonly flexShrink: import("@stylexjs/stylex").StyleXClassNameFor<"flexShrink", 0>;
|
|
15
|
+
readonly backgroundColor: import("@stylexjs/stylex").StyleXClassNameFor<"backgroundColor", "var(--color-surface)">;
|
|
16
|
+
readonly paddingBottom: import("@stylexjs/stylex").StyleXClassNameFor<"paddingBottom", string>;
|
|
17
|
+
}>;
|
|
18
|
+
readonly right: Readonly<{
|
|
19
|
+
readonly borderLeftWidth: import("@stylexjs/stylex").StyleXClassNameFor<"borderLeftWidth", string>;
|
|
20
|
+
readonly borderLeftStyle: import("@stylexjs/stylex").StyleXClassNameFor<"borderLeftStyle", "solid">;
|
|
21
|
+
readonly borderLeftColor: import("@stylexjs/stylex").StyleXClassNameFor<"borderLeftColor", "var(--color-outline-variant)">;
|
|
22
|
+
}>;
|
|
23
|
+
readonly left: Readonly<{
|
|
24
|
+
readonly borderRightWidth: import("@stylexjs/stylex").StyleXClassNameFor<"borderRightWidth", string>;
|
|
25
|
+
readonly borderRightStyle: import("@stylexjs/stylex").StyleXClassNameFor<"borderRightStyle", "solid">;
|
|
26
|
+
readonly borderRightColor: import("@stylexjs/stylex").StyleXClassNameFor<"borderRightColor", "var(--color-outline-variant)">;
|
|
27
|
+
}>;
|
|
28
|
+
readonly top: Readonly<{
|
|
29
|
+
readonly borderBottomWidth: import("@stylexjs/stylex").StyleXClassNameFor<"borderBottomWidth", string>;
|
|
30
|
+
readonly borderBottomStyle: import("@stylexjs/stylex").StyleXClassNameFor<"borderBottomStyle", "solid">;
|
|
31
|
+
readonly borderBottomColor: import("@stylexjs/stylex").StyleXClassNameFor<"borderBottomColor", "var(--color-outline-variant)">;
|
|
32
|
+
}>;
|
|
33
|
+
readonly bottom: Readonly<{
|
|
34
|
+
readonly borderTopWidth: import("@stylexjs/stylex").StyleXClassNameFor<"borderTopWidth", string>;
|
|
35
|
+
readonly borderTopStyle: import("@stylexjs/stylex").StyleXClassNameFor<"borderTopStyle", "solid">;
|
|
36
|
+
readonly borderTopColor: import("@stylexjs/stylex").StyleXClassNameFor<"borderTopColor", "var(--color-outline-variant)">;
|
|
37
|
+
}>;
|
|
38
|
+
}>;
|
|
39
|
+
header: Readonly<{
|
|
40
|
+
readonly default: Readonly<{
|
|
41
|
+
readonly display: import("@stylexjs/stylex").StyleXClassNameFor<"display", "flex">;
|
|
42
|
+
readonly alignItems: import("@stylexjs/stylex").StyleXClassNameFor<"alignItems", "flex-start">;
|
|
43
|
+
readonly paddingTop: import("@stylexjs/stylex").StyleXClassNameFor<"paddingTop", string>;
|
|
44
|
+
readonly paddingBottom: import("@stylexjs/stylex").StyleXClassNameFor<"paddingBottom", string>;
|
|
45
|
+
readonly paddingInlineEnd: import("@stylexjs/stylex").StyleXClassNameFor<"paddingInlineEnd", string>;
|
|
46
|
+
}>;
|
|
47
|
+
readonly withTitle: Readonly<{
|
|
48
|
+
readonly paddingInlineStart: import("@stylexjs/stylex").StyleXClassNameFor<"paddingInlineStart", string>;
|
|
49
|
+
}>;
|
|
50
|
+
readonly withBack: Readonly<{
|
|
51
|
+
readonly paddingInlineStart: import("@stylexjs/stylex").StyleXClassNameFor<"paddingInlineStart", string>;
|
|
52
|
+
}>;
|
|
53
|
+
}>;
|
|
54
|
+
title: Readonly<{
|
|
55
|
+
readonly default: Readonly<{
|
|
56
|
+
readonly flex: import("@stylexjs/stylex").StyleXClassNameFor<"flex", 1>;
|
|
57
|
+
readonly minWidth: import("@stylexjs/stylex").StyleXClassNameFor<"minWidth", 0>;
|
|
58
|
+
readonly paddingTop: import("@stylexjs/stylex").StyleXClassNameFor<"paddingTop", string>;
|
|
59
|
+
readonly color: import("@stylexjs/stylex").StyleXClassNameFor<"color", "var(--color-on-surface-variant)">;
|
|
60
|
+
}>;
|
|
61
|
+
}>;
|
|
62
|
+
content: Readonly<{
|
|
63
|
+
readonly default: Readonly<{
|
|
64
|
+
readonly flex: import("@stylexjs/stylex").StyleXClassNameFor<"flex", 1>;
|
|
65
|
+
readonly minHeight: import("@stylexjs/stylex").StyleXClassNameFor<"minHeight", 0>;
|
|
66
|
+
readonly overflow: import("@stylexjs/stylex").StyleXClassNameFor<"overflow", "auto">;
|
|
67
|
+
readonly overscrollBehavior: import("@stylexjs/stylex").StyleXClassNameFor<"overscrollBehavior", "contain">;
|
|
68
|
+
}>;
|
|
69
|
+
}>;
|
|
70
|
+
actions: Readonly<{
|
|
71
|
+
readonly default: Readonly<{
|
|
72
|
+
readonly display: import("@stylexjs/stylex").StyleXClassNameFor<"display", "flex">;
|
|
73
|
+
readonly flexDirection: import("@stylexjs/stylex").StyleXClassNameFor<"flexDirection", "column">;
|
|
74
|
+
}>;
|
|
75
|
+
readonly row: Readonly<{
|
|
76
|
+
readonly display: import("@stylexjs/stylex").StyleXClassNameFor<"display", "flex">;
|
|
77
|
+
readonly alignItems: import("@stylexjs/stylex").StyleXClassNameFor<"alignItems", "center">;
|
|
78
|
+
readonly gap: import("@stylexjs/stylex").StyleXClassNameFor<"gap", string>;
|
|
79
|
+
readonly paddingTop: import("@stylexjs/stylex").StyleXClassNameFor<"paddingTop", string>;
|
|
80
|
+
readonly paddingInline: import("@stylexjs/stylex").StyleXClassNameFor<"paddingInline", string>;
|
|
81
|
+
}>;
|
|
82
|
+
}>;
|
|
83
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
var panel = {
|
|
2
|
+
"default": {
|
|
3
|
+
kWkggS: "musaex-1eai1fy",
|
|
4
|
+
kGO01o: "musaex-1oxn6w8",
|
|
5
|
+
$$css: true
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
var standard = {
|
|
9
|
+
"default": {
|
|
10
|
+
k1xSpc: "musaex-78zum5",
|
|
11
|
+
kXwgrk: "musaex-dt5ytf",
|
|
12
|
+
kzqmXN: "musaex-1fjlwjz",
|
|
13
|
+
kZKoxP: "musaex-qg7gut",
|
|
14
|
+
kmuXW: "musaex-2lah0s",
|
|
15
|
+
kWkggS: "musaex-k7eln3",
|
|
16
|
+
kGO01o: "musaex-1oxn6w8",
|
|
17
|
+
$$css: true
|
|
18
|
+
},
|
|
19
|
+
right: {
|
|
20
|
+
kZ1KPB: "musaex-6vwjc",
|
|
21
|
+
k4WBpm: "musaex-19ypqd9",
|
|
22
|
+
kaZRDh: "musaex-svd4c5",
|
|
23
|
+
$$css: true
|
|
24
|
+
},
|
|
25
|
+
left: {
|
|
26
|
+
kWqL5O: "musaex-a640vs",
|
|
27
|
+
kSWEuD: "musaex-32b0ac",
|
|
28
|
+
k26BEO: "musaex-imfbgf",
|
|
29
|
+
$$css: true
|
|
30
|
+
},
|
|
31
|
+
top: {
|
|
32
|
+
kt9PQ7: "musaex-d1xpcx",
|
|
33
|
+
kfdmCh: "musaex-1q0q8m5",
|
|
34
|
+
kL6WhQ: "musaex-quqrak",
|
|
35
|
+
$$css: true
|
|
36
|
+
},
|
|
37
|
+
bottom: {
|
|
38
|
+
kEafiO: "musaex-uvson1",
|
|
39
|
+
kPef9Z: "musaex-13fuv20",
|
|
40
|
+
kLZC3w: "musaex-6ogecl",
|
|
41
|
+
$$css: true
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var header = {
|
|
45
|
+
"default": {
|
|
46
|
+
k1xSpc: "musaex-78zum5",
|
|
47
|
+
kGNEyG: "musaex-1cy8zhl",
|
|
48
|
+
kLKAdn: "musaex-h1u3e4",
|
|
49
|
+
kGO01o: "musaex-5ynjmo",
|
|
50
|
+
kwRFfy: "musaex-1max5gj",
|
|
51
|
+
$$css: true
|
|
52
|
+
},
|
|
53
|
+
withTitle: {
|
|
54
|
+
kZCmMZ: "musaex-150i2hq",
|
|
55
|
+
$$css: true
|
|
56
|
+
},
|
|
57
|
+
withBack: {
|
|
58
|
+
kZCmMZ: "musaex-1rl4tsp",
|
|
59
|
+
$$css: true
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
var content = {
|
|
63
|
+
"default": {
|
|
64
|
+
kUk6DE: "musaex-98rzlu",
|
|
65
|
+
kAzted: "musaex-2lwn1j",
|
|
66
|
+
kVQacm: "musaex-ysyzu8",
|
|
67
|
+
kZeWKH: "musaex-ish69e",
|
|
68
|
+
$$css: true
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
var title = {
|
|
72
|
+
"default": {
|
|
73
|
+
kUk6DE: "musaex-98rzlu",
|
|
74
|
+
k7Eaqz: "musaex-euugli",
|
|
75
|
+
kLKAdn: "musaex-h1u3e4",
|
|
76
|
+
kMwMTN: "musaex-bq1wot",
|
|
77
|
+
$$css: true
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
var actions = {
|
|
81
|
+
"default": {
|
|
82
|
+
k1xSpc: "musaex-78zum5",
|
|
83
|
+
kXwgrk: "musaex-dt5ytf",
|
|
84
|
+
$$css: true
|
|
85
|
+
},
|
|
86
|
+
row: {
|
|
87
|
+
k1xSpc: "musaex-78zum5",
|
|
88
|
+
kGNEyG: "musaex-6s0dn4",
|
|
89
|
+
kOIVth: "musaex-1wm2zkp",
|
|
90
|
+
kLKAdn: "musaex-1oop6c3",
|
|
91
|
+
kg3NbH: "musaex-1pyhihf",
|
|
92
|
+
$$css: true
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
var styles = {
|
|
96
|
+
panel: panel,
|
|
97
|
+
standard: standard,
|
|
98
|
+
header: header,
|
|
99
|
+
title: title,
|
|
100
|
+
content: content,
|
|
101
|
+
actions: actions
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export { styles };
|
|
@@ -4,6 +4,29 @@
|
|
|
4
4
|
* @description
|
|
5
5
|
* typography - display
|
|
6
6
|
*/
|
|
7
|
+
var $display = {
|
|
8
|
+
small: {
|
|
9
|
+
kGuDYH: "musaex-qozcyj",
|
|
10
|
+
k63SB2: "musaex-o1l8bm",
|
|
11
|
+
kLWn49: "musaex-bzal7z",
|
|
12
|
+
kb6lSQ: "musaex-1jcmgtk",
|
|
13
|
+
$$css: true
|
|
14
|
+
},
|
|
15
|
+
medium: {
|
|
16
|
+
kGuDYH: "musaex-ujqvrl",
|
|
17
|
+
k63SB2: "musaex-o1l8bm",
|
|
18
|
+
kLWn49: "musaex-5agonf",
|
|
19
|
+
kb6lSQ: "musaex-1jcmgtk",
|
|
20
|
+
$$css: true
|
|
21
|
+
},
|
|
22
|
+
large: {
|
|
23
|
+
kGuDYH: "musaex-8p9s6c",
|
|
24
|
+
k63SB2: "musaex-o1l8bm",
|
|
25
|
+
kLWn49: "musaex-1kke7aa",
|
|
26
|
+
kb6lSQ: "musaex-1i67g9q",
|
|
27
|
+
$$css: true
|
|
28
|
+
}
|
|
29
|
+
};
|
|
7
30
|
/**
|
|
8
31
|
* @description
|
|
9
32
|
* typography - headline
|
|
@@ -36,6 +59,13 @@ var $headline = {
|
|
|
36
59
|
* typography - title
|
|
37
60
|
*/
|
|
38
61
|
var $title = {
|
|
62
|
+
small: {
|
|
63
|
+
kGuDYH: "musaex-if65rj",
|
|
64
|
+
k63SB2: "musaex-o1l8bm",
|
|
65
|
+
kLWn49: "musaex-1fc57z9",
|
|
66
|
+
kb6lSQ: "musaex-19d5yem",
|
|
67
|
+
$$css: true
|
|
68
|
+
},
|
|
39
69
|
medium: {
|
|
40
70
|
kGuDYH: "musaex-1j61zf2",
|
|
41
71
|
k63SB2: "musaex-o1l8bm",
|
|
@@ -117,6 +147,7 @@ var $scrollbar = {
|
|
|
117
147
|
};
|
|
118
148
|
|
|
119
149
|
exports.$body = $body;
|
|
150
|
+
exports.$display = $display;
|
|
120
151
|
exports.$headline = $headline;
|
|
121
152
|
exports.$label = $label;
|
|
122
153
|
exports.$scrollbar = $scrollbar;
|