musae 1.0.27-beta.4 → 1.0.27-beta.40

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.
Files changed (236) hide show
  1. package/dist/components/avatar/avatar.cjs +1 -1
  2. package/dist/components/avatar/avatar.mjs +1 -1
  3. package/dist/components/badge/badge.cjs +1 -1
  4. package/dist/components/badge/badge.mjs +1 -1
  5. package/dist/components/bench/bench.cjs +1 -1
  6. package/dist/components/bench/bench.mjs +1 -1
  7. package/dist/components/bottom-sheet/__test__/index.test.d.ts +1 -0
  8. package/dist/components/bottom-sheet/bottom-sheet.cjs +66 -0
  9. package/dist/components/bottom-sheet/bottom-sheet.d.ts +10 -0
  10. package/dist/components/bottom-sheet/bottom-sheet.mjs +62 -0
  11. package/dist/components/bottom-sheet/context.cjs +12 -0
  12. package/dist/components/bottom-sheet/context.d.ts +8 -0
  13. package/dist/components/bottom-sheet/context.mjs +10 -0
  14. package/dist/components/bottom-sheet/index.d.ts +2 -0
  15. package/dist/components/breadcrumb/breadcrumb.cjs +1 -1
  16. package/dist/components/breadcrumb/breadcrumb.mjs +1 -1
  17. package/dist/components/breadcrumb/item.cjs +6 -3
  18. package/dist/components/breadcrumb/item.mjs +6 -3
  19. package/dist/components/button/button.cjs +1 -1
  20. package/dist/components/button/button.mjs +1 -1
  21. package/dist/components/button/styles.cjs +5 -5
  22. package/dist/components/button/styles.d.ts +15 -5
  23. package/dist/components/button/styles.mjs +5 -5
  24. package/dist/components/calendar/calendar.cjs +5 -3
  25. package/dist/components/calendar/calendar.d.ts +1 -0
  26. package/dist/components/calendar/calendar.mjs +5 -3
  27. package/dist/components/calendar/contribution.cjs +1 -1
  28. package/dist/components/calendar/contribution.mjs +1 -1
  29. package/dist/components/calendar/hooks.cjs +24 -21
  30. package/dist/components/calendar/hooks.d.ts +3 -2
  31. package/dist/components/calendar/hooks.mjs +24 -21
  32. package/dist/components/chat/chat.cjs +1 -1
  33. package/dist/components/chat/chat.mjs +1 -1
  34. package/dist/components/checkbox/checkbox.cjs +6 -27
  35. package/dist/components/checkbox/checkbox.mjs +4 -25
  36. package/dist/components/checkbox/styles.cjs +4 -4
  37. package/dist/components/checkbox/styles.d.ts +12 -4
  38. package/dist/components/checkbox/styles.mjs +4 -4
  39. package/dist/components/clock/column.cjs +2 -2
  40. package/dist/components/clock/column.mjs +2 -2
  41. package/dist/components/collapse/item.cjs +1 -1
  42. package/dist/components/collapse/item.mjs +1 -1
  43. package/dist/components/date-picker/date-picker.cjs +1 -1
  44. package/dist/components/date-picker/date-picker.mjs +1 -1
  45. package/dist/components/dialog/dialog.cjs +1 -1
  46. package/dist/components/dialog/dialog.mjs +1 -1
  47. package/dist/components/dialog/popup.cjs +1 -1
  48. package/dist/components/dialog/popup.mjs +1 -1
  49. package/dist/components/divider/divider.cjs +1 -1
  50. package/dist/components/divider/divider.mjs +1 -1
  51. package/dist/components/drawer/context.cjs +4 -5
  52. package/dist/components/drawer/context.d.ts +3 -4
  53. package/dist/components/drawer/context.mjs +4 -5
  54. package/dist/components/drawer/drawer.cjs +67 -23
  55. package/dist/components/drawer/drawer.d.ts +5 -0
  56. package/dist/components/drawer/drawer.mjs +69 -25
  57. package/dist/components/empty/empty.cjs +1 -1
  58. package/dist/components/empty/empty.mjs +1 -1
  59. package/dist/components/form/field/layout.cjs +1 -1
  60. package/dist/components/form/field/layout.mjs +1 -1
  61. package/dist/components/icon/icons/action/calendar-today.cjs +22 -0
  62. package/dist/components/icon/icons/action/calendar-today.d.ts +3 -0
  63. package/dist/components/icon/icons/action/calendar-today.mjs +18 -0
  64. package/dist/components/icon/icons/action/index.cjs +2 -0
  65. package/dist/components/icon/icons/action/index.d.ts +2 -1
  66. package/dist/components/icon/icons/action/index.mjs +1 -0
  67. package/dist/components/icon/icons/communication/index.d.ts +2 -0
  68. package/dist/components/icon/icons/communication/location-on.cjs +25 -0
  69. package/dist/components/icon/icons/communication/location-on.d.ts +3 -0
  70. package/dist/components/icon/icons/communication/location-on.mjs +21 -0
  71. package/dist/components/icon/icons/index.cjs +6 -0
  72. package/dist/components/icon/icons/index.d.ts +2 -0
  73. package/dist/components/icon/icons/index.mjs +3 -0
  74. package/dist/components/icon/icons/social/index.d.ts +2 -0
  75. package/dist/components/icon/icons/social/share.cjs +22 -0
  76. package/dist/components/icon/icons/social/share.d.ts +3 -0
  77. package/dist/components/icon/icons/social/share.mjs +18 -0
  78. package/dist/components/icon-button/icon-button.cjs +1 -1
  79. package/dist/components/icon-button/icon-button.mjs +1 -1
  80. package/dist/components/image/image.cjs +1 -1
  81. package/dist/components/image/image.mjs +1 -1
  82. package/dist/components/image/preview/operations.cjs +1 -1
  83. package/dist/components/image/preview/operations.mjs +1 -1
  84. package/dist/components/input/input.cjs +7 -14
  85. package/dist/components/input/input.mjs +4 -11
  86. package/dist/components/layout/sidebar.cjs +1 -1
  87. package/dist/components/layout/sidebar.mjs +1 -1
  88. package/dist/components/loading/loading.cjs +1 -1
  89. package/dist/components/loading/loading.mjs +1 -1
  90. package/dist/components/markdown/markdown.cjs +1 -1
  91. package/dist/components/markdown/markdown.mjs +1 -1
  92. package/dist/components/menu/group.cjs +1 -1
  93. package/dist/components/menu/group.mjs +1 -1
  94. package/dist/components/menu/item.cjs +4 -4
  95. package/dist/components/menu/item.mjs +4 -4
  96. package/dist/components/notification/holder.cjs +1 -1
  97. package/dist/components/notification/holder.mjs +1 -1
  98. package/dist/components/notification/notification.cjs +1 -1
  99. package/dist/components/notification/notification.mjs +1 -1
  100. package/dist/components/pagination/item.cjs +1 -1
  101. package/dist/components/pagination/item.mjs +1 -1
  102. package/dist/components/password-input/password-input.cjs +1 -1
  103. package/dist/components/password-input/password-input.mjs +1 -1
  104. package/dist/components/picker/picker.cjs +14 -8
  105. package/dist/components/picker/picker.mjs +14 -8
  106. package/dist/components/popconfirm/popconfirm.cjs +1 -1
  107. package/dist/components/popconfirm/popconfirm.mjs +1 -1
  108. package/dist/components/popover/popover.cjs +1 -1
  109. package/dist/components/popover/popover.mjs +1 -1
  110. package/dist/components/portal/portal.cjs +3 -3
  111. package/dist/components/portal/portal.mjs +3 -3
  112. package/dist/components/progress/linear.cjs +2 -2
  113. package/dist/components/progress/linear.mjs +2 -2
  114. package/dist/components/quote/quote.cjs +1 -1
  115. package/dist/components/quote/quote.mjs +1 -1
  116. package/dist/components/radio/radio.cjs +1 -1
  117. package/dist/components/radio/radio.mjs +1 -1
  118. package/dist/components/rate/star.cjs +1 -1
  119. package/dist/components/rate/star.mjs +1 -1
  120. package/dist/components/rich-text-editor/plugins/controlled-state/index.cjs +12 -26
  121. package/dist/components/rich-text-editor/plugins/controlled-state/index.mjs +13 -27
  122. package/dist/components/rich-text-editor/rich-text-editor.cjs +4 -12
  123. package/dist/components/rich-text-editor/rich-text-editor.mjs +4 -12
  124. package/dist/components/rich-text-editor/utils.cjs +2 -2
  125. package/dist/components/rich-text-editor/utils.mjs +2 -2
  126. package/dist/components/select/select.cjs +7 -2
  127. package/dist/components/select/select.d.ts +1 -1
  128. package/dist/components/select/select.mjs +7 -2
  129. package/dist/components/select/selector.cjs +9 -5
  130. package/dist/components/select/selector.d.ts +1 -1
  131. package/dist/components/select/selector.mjs +9 -5
  132. package/dist/components/sheet/context.cjs +14 -0
  133. package/dist/components/sheet/context.d.ts +10 -0
  134. package/dist/components/sheet/context.mjs +12 -0
  135. package/dist/components/sheet/hooks.cjs +17 -0
  136. package/dist/components/sheet/hooks.d.ts +9 -0
  137. package/dist/components/sheet/hooks.mjs +15 -0
  138. package/dist/components/sheet/index.d.ts +2 -0
  139. package/dist/components/{drawer/popup.cjs → sheet/sheet.cjs} +89 -83
  140. package/dist/components/sheet/sheet.d.ts +11 -0
  141. package/dist/components/{drawer/popup.mjs → sheet/sheet.mjs} +90 -84
  142. package/dist/components/slider/track.d.ts +1 -1
  143. package/dist/components/space/space.cjs +1 -1
  144. package/dist/components/space/space.mjs +1 -1
  145. package/dist/components/split-panel/divider.cjs +1 -1
  146. package/dist/components/split-panel/divider.mjs +1 -1
  147. package/dist/components/split-panel/index.d.ts +1 -1
  148. package/dist/components/split-panel/split-panel.cjs +1 -1
  149. package/dist/components/split-panel/split-panel.mjs +1 -1
  150. package/dist/components/steps/item.cjs +1 -1
  151. package/dist/components/steps/item.mjs +1 -1
  152. package/dist/components/steps/steps.cjs +1 -1
  153. package/dist/components/steps/steps.mjs +1 -1
  154. package/dist/components/table/body.cjs +1 -1
  155. package/dist/components/table/body.mjs +1 -1
  156. package/dist/components/table/header/header.cjs +1 -1
  157. package/dist/components/table/header/header.mjs +1 -1
  158. package/dist/components/tabs/context.cjs +1 -4
  159. package/dist/components/tabs/context.d.ts +2 -2
  160. package/dist/components/tabs/context.mjs +1 -4
  161. package/dist/components/tabs/hooks/use-navigation.cjs +87 -0
  162. package/dist/components/tabs/hooks/use-navigation.d.ts +12 -0
  163. package/dist/components/tabs/hooks/use-navigation.mjs +85 -0
  164. package/dist/components/tabs/hooks/use-tabs-context.cjs +18 -0
  165. package/dist/components/tabs/hooks/use-tabs-context.d.ts +7 -0
  166. package/dist/components/tabs/hooks/use-tabs-context.mjs +16 -0
  167. package/dist/components/tabs/hooks/use-tabs.cjs +46 -0
  168. package/dist/components/tabs/hooks/use-tabs.d.ts +17 -0
  169. package/dist/components/tabs/hooks/use-tabs.mjs +44 -0
  170. package/dist/components/tabs/navigation.cjs +48 -18
  171. package/dist/components/tabs/navigation.mjs +47 -17
  172. package/dist/components/tabs/panels.cjs +56 -39
  173. package/dist/components/tabs/panels.mjs +56 -39
  174. package/dist/components/tabs/tab.cjs +7 -9
  175. package/dist/components/tabs/tab.mjs +6 -8
  176. package/dist/components/tabs/tabs.cjs +11 -6
  177. package/dist/components/tabs/tabs.d.ts +1 -1
  178. package/dist/components/tabs/tabs.mjs +10 -5
  179. package/dist/components/tag/tag.cjs +55 -30
  180. package/dist/components/tag/tag.d.ts +1 -1
  181. package/dist/components/tag/tag.mjs +55 -30
  182. package/dist/components/textarea/textarea.cjs +5 -3
  183. package/dist/components/textarea/textarea.d.ts +1 -0
  184. package/dist/components/textarea/textarea.mjs +5 -3
  185. package/dist/components/theme/hooks.cjs +13 -8
  186. package/dist/components/theme/hooks.d.ts +3 -2
  187. package/dist/components/theme/hooks.mjs +13 -8
  188. package/dist/components/theme/theme-provider.cjs +3 -1
  189. package/dist/components/theme/theme-provider.d.ts +1 -1
  190. package/dist/components/theme/theme-provider.mjs +3 -1
  191. package/dist/components/theme/tokens.stylex.d.ts +2 -0
  192. package/dist/components/time-picker/time-picker.cjs +1 -1
  193. package/dist/components/time-picker/time-picker.mjs +1 -1
  194. package/dist/components/timeline/item.cjs +1 -1
  195. package/dist/components/timeline/item.mjs +1 -1
  196. package/dist/components/tour/tour.cjs +2 -2
  197. package/dist/components/tour/tour.mjs +2 -2
  198. package/dist/components/transfer/list.cjs +1 -1
  199. package/dist/components/transfer/list.mjs +1 -1
  200. package/dist/components/tree/node.cjs +2 -2
  201. package/dist/components/tree/node.mjs +2 -2
  202. package/dist/components/upload/uploaded-item/index.cjs +1 -1
  203. package/dist/components/upload/uploaded-item/index.mjs +1 -1
  204. package/dist/components/upload/uploaded-list.cjs +1 -1
  205. package/dist/components/upload/uploaded-list.mjs +1 -1
  206. package/dist/contexts/stack-level.context.mjs +1 -1
  207. package/dist/hooks/use-closable.cjs +1 -1
  208. package/dist/hooks/use-closable.mjs +1 -1
  209. package/dist/hooks/use-theme-color-vars.cjs +7 -9
  210. package/dist/hooks/use-theme-color-vars.d.ts +2 -1
  211. package/dist/hooks/use-theme-color-vars.mjs +6 -8
  212. package/dist/index.cjs +2 -0
  213. package/dist/index.d.ts +1 -0
  214. package/dist/index.mjs +1 -0
  215. package/dist/styles.css +171 -103
  216. package/dist/types/bottom-sheet.d.ts +40 -0
  217. package/dist/types/calendar.d.ts +20 -12
  218. package/dist/types/form.d.ts +1 -1
  219. package/dist/types/picker.d.ts +6 -0
  220. package/dist/types/portal.d.ts +2 -2
  221. package/dist/types/select.d.ts +9 -2
  222. package/dist/types/sheet.d.ts +75 -0
  223. package/dist/types/tabs.d.ts +18 -2
  224. package/dist/types/tag.d.ts +10 -6
  225. package/dist/types/textarea.d.ts +5 -0
  226. package/dist/types/theme.d.ts +10 -5
  227. package/package.json +11 -11
  228. package/dist/components/drawer/hooks.cjs +0 -10
  229. package/dist/components/drawer/hooks.d.ts +0 -2
  230. package/dist/components/drawer/hooks.mjs +0 -8
  231. package/dist/components/drawer/popup.d.ts +0 -4
  232. package/dist/components/tabs/hooks.cjs +0 -145
  233. package/dist/components/tabs/hooks.d.ts +0 -43
  234. package/dist/components/tabs/hooks.mjs +0 -140
  235. /package/dist/node_modules/.pnpm/{@stylexjs_stylex@0.17.5 → @stylexjs_stylex@0.18.3}/node_modules/@stylexjs/stylex/lib/es/stylex.cjs +0 -0
  236. /package/dist/node_modules/.pnpm/{@stylexjs_stylex@0.17.5 → @stylexjs_stylex@0.18.3}/node_modules/@stylexjs/stylex/lib/es/stylex.mjs +0 -0
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
6
6
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
7
7
  var React = require('react');
8
- var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
8
+ var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
9
9
  var context = require('./context.cjs');
10
10
  var hooks = require('../theme/hooks.cjs');
11
11
  var theme = require('../theme/theme.cjs');
@@ -1,7 +1,7 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
3
  import React, { forwardRef, useContext } from 'react';
4
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
4
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
5
5
  import Context, { CLASS_NAMES } from './context.mjs';
6
6
  import { useTheme } from '../theme/hooks.mjs';
7
7
  import { $label } from '../theme/theme.mjs';
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
6
6
  var React = require('react');
7
7
  var useClassNames = require('../../hooks/use-class-names.cjs');
8
- var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
8
+ var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
9
9
  var theme = require('../theme/theme.cjs');
10
10
  var hooks = require('../theme/hooks.cjs');
11
11
  var relax = require('@aiszlab/relax');
@@ -1,7 +1,7 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import React from 'react';
3
3
  import { useClassNames } from '../../hooks/use-class-names.mjs';
4
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
4
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
5
5
  import { $label } from '../theme/theme.mjs';
6
6
  import { useTheme } from '../theme/hooks.mjs';
7
7
  import { isVoid } from '@aiszlab/relax';
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
6
6
  var React = require('react');
7
- var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
7
+ var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
8
8
  var hooks = require('./hooks.cjs');
9
9
  var theme = require('../theme/theme.cjs');
10
10
  var className = require('@aiszlab/relax/class-name');
@@ -1,6 +1,6 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import React from 'react';
3
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
3
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
4
4
  import { useLogo, useNavigations, useMenuKeys, useMenuItems } from './hooks.mjs';
5
5
  import { $title } from '../theme/theme.mjs';
6
6
  import { stringify } from '@aiszlab/relax/class-name';
@@ -0,0 +1 @@
1
+ import "@testing-library/jest-dom";
@@ -0,0 +1,66 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
6
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
7
+ var React = require('react');
8
+ var sheet = require('../sheet/sheet.cjs');
9
+ var useClassNames = require('../../hooks/use-class-names.cjs');
10
+ var className = require('@aiszlab/relax/class-name');
11
+ var useThemeColorVars = require('../../hooks/use-theme-color-vars.cjs');
12
+ var context = require('./context.cjs');
13
+
14
+ var _excluded = ["open", "height", "closable", "modal"];
15
+ /**
16
+ * @zh BottomSheet 专用样式:居中的拖拽手柄条,以及面板背景和圆角。
17
+ * @en BottomSheet-specific styles: a centered drag handle pill, and panel background/border-radius.
18
+ */
19
+
20
+ /**
21
+ * @zh BottomSheet 组件。从底部滑入的模态面板,带有拖拽手柄指示器。
22
+ * 基于共享的 Sheet 基础组件构建。
23
+ * @en BottomSheet component. A modal panel that slides up from the bottom
24
+ * with a drag handle indicator. Built on the shared Sheet base component.
25
+ */
26
+ var BottomSheet = function BottomSheet(_ref) {
27
+ var open = _ref.open,
28
+ _ref$height = _ref.height,
29
+ height = _ref$height === void 0 ? "50vh" : _ref$height,
30
+ _ref$closable = _ref.closable,
31
+ closable = _ref$closable === void 0 ? true : _ref$closable,
32
+ _ref$modal = _ref.modal,
33
+ modal = _ref$modal === void 0 ? true : _ref$modal,
34
+ props = _objectWithoutProperties(_ref, _excluded);
35
+ var classNames = useClassNames.useClassNames(context.CLASS_NAMES);
36
+ var themeColorVars = useThemeColorVars.useThemeColorVars(["on-surface-variant"]);
37
+ var styled = {
38
+ handle: {
39
+ className: "musaex-1po6ib musaex-rntz3j musaex-1xa9b2s musaex-9ip8r5 musaex-1eodh35 musaex-19i5tse musaex-vueqy4 musaex-2lah0s"
40
+ },
41
+ panel: {
42
+ className: "musaex-17o6occ musaex-zbxit7 musaex-1ei9pc5 musaex-15q9lfd"
43
+ }
44
+ };
45
+ /**
46
+ * @zh BottomSheet 专用头部:居中的拖拽手柄条。
47
+ * @en BottomSheet-specific header: a centered drag handle pill.
48
+ */
49
+ var header = /*#__PURE__*/React.createElement("div", {
50
+ className: className.stringify(classNames.handle, styled.handle.className),
51
+ style: _objectSpread(_objectSpread({}, styled.handle.style), themeColorVars)
52
+ });
53
+ return /*#__PURE__*/React.createElement(sheet.default, {
54
+ visible: open,
55
+ placement: "bottom",
56
+ size: height,
57
+ closable: closable,
58
+ modal: modal,
59
+ onClose: props.onClose,
60
+ className: classNames.sheet,
61
+ header: header,
62
+ panelClassName: styled.panel.className
63
+ }, props.children);
64
+ };
65
+
66
+ exports.default = BottomSheet;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import type { BottomSheetProps } from "../../types/bottom-sheet";
3
+ /**
4
+ * @zh BottomSheet 组件。从底部滑入的模态面板,带有拖拽手柄指示器。
5
+ * 基于共享的 Sheet 基础组件构建。
6
+ * @en BottomSheet component. A modal panel that slides up from the bottom
7
+ * with a drag handle indicator. Built on the shared Sheet base component.
8
+ */
9
+ declare const BottomSheet: ({ open, height, closable, modal, ...props }: BottomSheetProps) => React.JSX.Element;
10
+ export default BottomSheet;
@@ -0,0 +1,62 @@
1
+ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
+ import React from 'react';
4
+ import Sheet from '../sheet/sheet.mjs';
5
+ import { useClassNames } from '../../hooks/use-class-names.mjs';
6
+ import { stringify } from '@aiszlab/relax/class-name';
7
+ import { useThemeColorVars } from '../../hooks/use-theme-color-vars.mjs';
8
+ import { CLASS_NAMES } from './context.mjs';
9
+
10
+ var _excluded = ["open", "height", "closable", "modal"];
11
+ /**
12
+ * @zh BottomSheet 专用样式:居中的拖拽手柄条,以及面板背景和圆角。
13
+ * @en BottomSheet-specific styles: a centered drag handle pill, and panel background/border-radius.
14
+ */
15
+
16
+ /**
17
+ * @zh BottomSheet 组件。从底部滑入的模态面板,带有拖拽手柄指示器。
18
+ * 基于共享的 Sheet 基础组件构建。
19
+ * @en BottomSheet component. A modal panel that slides up from the bottom
20
+ * with a drag handle indicator. Built on the shared Sheet base component.
21
+ */
22
+ var BottomSheet = function BottomSheet(_ref) {
23
+ var open = _ref.open,
24
+ _ref$height = _ref.height,
25
+ height = _ref$height === void 0 ? "50vh" : _ref$height,
26
+ _ref$closable = _ref.closable,
27
+ closable = _ref$closable === void 0 ? true : _ref$closable,
28
+ _ref$modal = _ref.modal,
29
+ modal = _ref$modal === void 0 ? true : _ref$modal,
30
+ props = _objectWithoutProperties(_ref, _excluded);
31
+ var classNames = useClassNames(CLASS_NAMES);
32
+ var themeColorVars = useThemeColorVars(["on-surface-variant"]);
33
+ var styled = {
34
+ handle: {
35
+ className: "musaex-1po6ib musaex-rntz3j musaex-1xa9b2s musaex-9ip8r5 musaex-1eodh35 musaex-19i5tse musaex-vueqy4 musaex-2lah0s"
36
+ },
37
+ panel: {
38
+ className: "musaex-17o6occ musaex-zbxit7 musaex-1ei9pc5 musaex-15q9lfd"
39
+ }
40
+ };
41
+ /**
42
+ * @zh BottomSheet 专用头部:居中的拖拽手柄条。
43
+ * @en BottomSheet-specific header: a centered drag handle pill.
44
+ */
45
+ var header = /*#__PURE__*/React.createElement("div", {
46
+ className: stringify(classNames.handle, styled.handle.className),
47
+ style: _objectSpread(_objectSpread({}, styled.handle.style), themeColorVars)
48
+ });
49
+ return /*#__PURE__*/React.createElement(Sheet, {
50
+ visible: open,
51
+ placement: "bottom",
52
+ size: height,
53
+ closable: closable,
54
+ modal: modal,
55
+ onClose: props.onClose,
56
+ className: classNames.sheet,
57
+ header: header,
58
+ panelClassName: styled.panel.className
59
+ }, props.children);
60
+ };
61
+
62
+ export { BottomSheet as default };
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @zh BottomSheet 的 class 名称
5
+ * @en class names for BottomSheet
6
+ */
7
+ var CLASS_NAMES = {
8
+ sheet: "bottom-sheet",
9
+ handle: "bottom-sheet__drag-handle"
10
+ };
11
+
12
+ exports.CLASS_NAMES = CLASS_NAMES;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @zh BottomSheet 的 class 名称
3
+ * @en class names for BottomSheet
4
+ */
5
+ export declare const CLASS_NAMES: {
6
+ readonly sheet: "bottom-sheet";
7
+ readonly handle: "bottom-sheet__drag-handle";
8
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @zh BottomSheet 的 class 名称
3
+ * @en class names for BottomSheet
4
+ */
5
+ var CLASS_NAMES = {
6
+ sheet: "bottom-sheet",
7
+ handle: "bottom-sheet__drag-handle"
8
+ };
9
+
10
+ export { CLASS_NAMES };
@@ -0,0 +1,2 @@
1
+ import BottomSheet from "./bottom-sheet";
2
+ export { BottomSheet };
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
6
6
  var React = require('react');
7
- var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
7
+ var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
8
8
  var theme = require('../theme/theme.cjs');
9
9
  var hooks = require('../theme/hooks.cjs');
10
10
  var useClassNames = require('../../hooks/use-class-names.cjs');
@@ -1,6 +1,6 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import React from 'react';
3
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
3
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
4
4
  import { $label } from '../theme/theme.mjs';
5
5
  import { useTheme } from '../theme/hooks.mjs';
6
6
  import { useClassNames } from '../../hooks/use-class-names.mjs';
@@ -23,11 +23,14 @@ var Item = function Item(_ref) {
23
23
  className: "musaex-tem6mo"
24
24
  },
25
25
  1: {
26
- className: "musaex-tem6mo musaex-ipt7de musaex-db68te musaex-10rslkf musaex-1nx0wnt musaex-fagghw musaex-1ptezny"
26
+ className: "musaex-tem6mo musaex-ipt7de musaex-db68te musaex-5nhjnm musaex-1i6b086 musaex-fagghw musaex-1ptezny"
27
27
  }
28
28
  }[!!isLink << 0],
29
29
  separator: {
30
30
  className: "musaex-1erkn4t"
31
+ },
32
+ anchor: {
33
+ className: "musaex-1hl2dhg musaex-1heor9g"
31
34
  }
32
35
  };
33
36
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("li", {
@@ -36,9 +39,9 @@ var Item = function Item(_ref) {
36
39
  "--color-surface": theme.colors.surface,
37
40
  "--color-on-surface": theme.colors["on-surface"]
38
41
  })
39
- }, isLink && /*#__PURE__*/React.createElement("a", {
42
+ }, isLink && (/*#__PURE__*/React.createElement("a", _objectSpread(_objectSpread({}, styled.anchor), {}, {
40
43
  href: href
41
- }, label), !isLink && label), !max && (/*#__PURE__*/React.createElement("li", {
44
+ }), label)), !isLink && label), !max && (/*#__PURE__*/React.createElement("li", {
42
45
  role: "separator",
43
46
  className: className.stringify(classNames.separator, styled.separator.className),
44
47
  style: styled.separator.style
@@ -19,11 +19,14 @@ var Item = function Item(_ref) {
19
19
  className: "musaex-tem6mo"
20
20
  },
21
21
  1: {
22
- className: "musaex-tem6mo musaex-ipt7de musaex-db68te musaex-10rslkf musaex-1nx0wnt musaex-fagghw musaex-1ptezny"
22
+ className: "musaex-tem6mo musaex-ipt7de musaex-db68te musaex-5nhjnm musaex-1i6b086 musaex-fagghw musaex-1ptezny"
23
23
  }
24
24
  }[!!isLink << 0],
25
25
  separator: {
26
26
  className: "musaex-1erkn4t"
27
+ },
28
+ anchor: {
29
+ className: "musaex-1hl2dhg musaex-1heor9g"
27
30
  }
28
31
  };
29
32
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("li", {
@@ -32,9 +35,9 @@ var Item = function Item(_ref) {
32
35
  "--color-surface": theme.colors.surface,
33
36
  "--color-on-surface": theme.colors["on-surface"]
34
37
  })
35
- }, isLink && /*#__PURE__*/React.createElement("a", {
38
+ }, isLink && (/*#__PURE__*/React.createElement("a", _objectSpread(_objectSpread({}, styled.anchor), {}, {
36
39
  href: href
37
- }, label), !isLink && label), !max && (/*#__PURE__*/React.createElement("li", {
40
+ }), label)), !isLink && label), !max && (/*#__PURE__*/React.createElement("li", {
38
41
  role: "separator",
39
42
  className: stringify(classNames.separator, styled.separator.className),
40
43
  style: styled.separator.style
@@ -6,7 +6,7 @@ var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
6
6
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
7
7
  var React = require('react');
8
8
  var className = require('@aiszlab/relax/class-name');
9
- var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
9
+ var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
10
10
  var tokens_stylex = require('../theme/tokens.stylex.cjs');
11
11
  var hooks = require('../theme/hooks.cjs');
12
12
  var hooks$1 = require('./hooks.cjs');
@@ -2,7 +2,7 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
3
  import React, { forwardRef } from 'react';
4
4
  import { stringify } from '@aiszlab/relax/class-name';
5
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
5
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
6
6
  import { OPACITY } from '../theme/tokens.stylex.mjs';
7
7
  import { useTheme } from '../theme/hooks.mjs';
8
8
  import { useButton } from './hooks.mjs';
@@ -36,7 +36,7 @@ var styles = {
36
36
  kMzoRj: "musaex-k59kd",
37
37
  kWkggS: "musaex-onffnr",
38
38
  kMwMTN: "musaex-1nt3oiv",
39
- kwh8RV: "musaex-8eoi9k",
39
+ kkqDRM: "musaex-52rqan",
40
40
  $$css: true
41
41
  },
42
42
  outlined: {
@@ -44,12 +44,12 @@ var styles = {
44
44
  ksu8eU: "musaex-1y0btm7",
45
45
  kVAM5u: "musaex-1u22kak",
46
46
  kMwMTN: "musaex-erz01e",
47
- kGzVvX: "musaex-liky03",
47
+ kHE3J0: "musaex-iy4r31",
48
48
  $$css: true
49
49
  },
50
50
  text: {
51
51
  kMwMTN: "musaex-erz01e",
52
- kGzVvX: "musaex-liky03",
52
+ kHE3J0: "musaex-iy4r31",
53
53
  $$css: true
54
54
  }
55
55
  },
@@ -117,7 +117,7 @@ var styles = {
117
117
  kGVxlE: null,
118
118
  kVAM5u: null,
119
119
  kWkggS: null,
120
- kwh8RV: null,
120
+ kkqDRM: null,
121
121
  $$css: true
122
122
  },
123
123
  filled: {
@@ -129,7 +129,7 @@ var styles = {
129
129
  $$css: true
130
130
  },
131
131
  text: {
132
- kGzVvX: null,
132
+ kHE3J0: null,
133
133
  $$css: true
134
134
  }
135
135
  }
@@ -31,7 +31,9 @@ declare const styles: {
31
31
  readonly backgroundColor: import("@stylexjs/stylex").StyleXClassNameFor<"backgroundColor", "var(--color-button)">;
32
32
  readonly color: import("@stylexjs/stylex").StyleXClassNameFor<"color", "var(--color-on-button)">;
33
33
  readonly ":hover": import("@stylexjs/stylex").StyleXClassNameFor<":hover", {
34
- readonly boxShadow: import("@stylexjs/stylex").StyleXVar<string>;
34
+ readonly "@media (hover: hover)": {
35
+ readonly boxShadow: import("@stylexjs/stylex").StyleXVar<string>;
36
+ };
35
37
  }>;
36
38
  }>;
37
39
  readonly outlined: Readonly<{
@@ -40,13 +42,17 @@ declare const styles: {
40
42
  readonly borderColor: import("@stylexjs/stylex").StyleXClassNameFor<"borderColor", "var(--color-button)">;
41
43
  readonly color: import("@stylexjs/stylex").StyleXClassNameFor<"color", "var(--color-button)">;
42
44
  readonly ":hover": import("@stylexjs/stylex").StyleXClassNameFor<":hover", {
43
- readonly backgroundColor: "var(--color-button-opacity-08)";
45
+ readonly "@media (hover: hover)": {
46
+ readonly backgroundColor: "var(--color-button-opacity-08)";
47
+ };
44
48
  }>;
45
49
  }>;
46
50
  readonly text: Readonly<{
47
51
  readonly color: import("@stylexjs/stylex").StyleXClassNameFor<"color", "var(--color-button)">;
48
52
  readonly ":hover": import("@stylexjs/stylex").StyleXClassNameFor<":hover", {
49
- readonly backgroundColor: "var(--color-button-opacity-08)";
53
+ readonly "@media (hover: hover)": {
54
+ readonly backgroundColor: "var(--color-button-opacity-08)";
55
+ };
50
56
  }>;
51
57
  }>;
52
58
  }>;
@@ -116,7 +122,9 @@ declare const styles: {
116
122
  readonly borderColor: import("@stylexjs/stylex").StyleXClassNameFor<"borderColor", null>;
117
123
  readonly backgroundColor: import("@stylexjs/stylex").StyleXClassNameFor<"backgroundColor", null>;
118
124
  readonly ":hover": import("@stylexjs/stylex").StyleXClassNameFor<":hover", {
119
- readonly boxShadow: null;
125
+ readonly "@media (hover: hover)": {
126
+ readonly boxShadow: null;
127
+ };
120
128
  }>;
121
129
  }>;
122
130
  readonly filled: Readonly<{
@@ -127,7 +135,9 @@ declare const styles: {
127
135
  }>;
128
136
  readonly text: Readonly<{
129
137
  readonly ":hover": import("@stylexjs/stylex").StyleXClassNameFor<":hover", {
130
- readonly backgroundColor: null;
138
+ readonly "@media (hover: hover)": {
139
+ readonly backgroundColor: null;
140
+ };
131
141
  }>;
132
142
  }>;
133
143
  }>;
@@ -32,7 +32,7 @@ var styles = {
32
32
  kMzoRj: "musaex-k59kd",
33
33
  kWkggS: "musaex-onffnr",
34
34
  kMwMTN: "musaex-1nt3oiv",
35
- kwh8RV: "musaex-8eoi9k",
35
+ kkqDRM: "musaex-52rqan",
36
36
  $$css: true
37
37
  },
38
38
  outlined: {
@@ -40,12 +40,12 @@ var styles = {
40
40
  ksu8eU: "musaex-1y0btm7",
41
41
  kVAM5u: "musaex-1u22kak",
42
42
  kMwMTN: "musaex-erz01e",
43
- kGzVvX: "musaex-liky03",
43
+ kHE3J0: "musaex-iy4r31",
44
44
  $$css: true
45
45
  },
46
46
  text: {
47
47
  kMwMTN: "musaex-erz01e",
48
- kGzVvX: "musaex-liky03",
48
+ kHE3J0: "musaex-iy4r31",
49
49
  $$css: true
50
50
  }
51
51
  },
@@ -113,7 +113,7 @@ var styles = {
113
113
  kGVxlE: null,
114
114
  kVAM5u: null,
115
115
  kWkggS: null,
116
- kwh8RV: null,
116
+ kkqDRM: null,
117
117
  $$css: true
118
118
  },
119
119
  filled: {
@@ -125,7 +125,7 @@ var styles = {
125
125
  $$css: true
126
126
  },
127
127
  text: {
128
- kGzVvX: null,
128
+ kHE3J0: null,
129
129
  $$css: true
130
130
  }
131
131
  }
@@ -6,7 +6,7 @@ var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
6
6
  var React = require('react');
7
7
  var hooks = require('./hooks.cjs');
8
8
  var useClassNames = require('../../hooks/use-class-names.cjs');
9
- var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
9
+ var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
10
10
  var className = require('@aiszlab/relax/class-name');
11
11
  var hooks$1 = require('../theme/hooks.cjs');
12
12
  var iconButton = require('../icon-button/icon-button.cjs');
@@ -38,6 +38,7 @@ var Calendar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
38
38
  var className$1 = _ref.className,
39
39
  style = _ref.style,
40
40
  value = _ref.value,
41
+ disabledDate = _ref.disabledDate,
41
42
  _onClick = _ref.onClick;
42
43
  var classNames = useClassNames.useClassNames(context.CLASS_NAMES);
43
44
  var _useValue = hooks.useValue({
@@ -58,7 +59,8 @@ var Calendar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
58
59
  var dateCells = hooks.useDateCells({
59
60
  timespan: timespan,
60
61
  focusedAt: focusedAt,
61
- click: onClick,
62
+ onClick: onClick,
63
+ disabledDate: disabledDate,
62
64
  classNames: classNames
63
65
  });
64
66
  var headCells = hooks.useHeadCells({
@@ -72,7 +74,7 @@ var Calendar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
72
74
  header: stylex.props(theme.$label.large, styles.header),
73
75
  heading: stylex.props(styles.heading, theme.$body.medium),
74
76
  body: {
75
- className: "musaex-1mwwwfo"
77
+ className: "musaex-1vathgz musaex-4jqler"
76
78
  }
77
79
  };
78
80
  React.useImperativeHandle(ref, function () {
@@ -3,5 +3,6 @@ import type { CalendarRef } from "../../types/calendar";
3
3
  declare const Calendar: React.ForwardRefExoticComponent<import("../../types/element").ComponentProps & {
4
4
  value?: import("dayjs").Dayjs | [import("@aiszlab/relax/types").Partialable<import("dayjs").Dayjs>, import("@aiszlab/relax/types").Partialable<import("dayjs").Dayjs>];
5
5
  onClick?: (value: import("dayjs").Dayjs) => void;
6
+ disabledDate?: (date: import("dayjs").Dayjs) => boolean;
6
7
  } & React.RefAttributes<CalendarRef>>;
7
8
  export default Calendar;
@@ -2,7 +2,7 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import React, { forwardRef, useImperativeHandle } from 'react';
3
3
  import { useValue, useFocusedAt, useDateCells, useHeadCells } from './hooks.mjs';
4
4
  import { useClassNames } from '../../hooks/use-class-names.mjs';
5
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
5
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
6
6
  import { stringify } from '@aiszlab/relax/class-name';
7
7
  import { useTheme } from '../theme/hooks.mjs';
8
8
  import IconButton from '../icon-button/icon-button.mjs';
@@ -34,6 +34,7 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref, ref) {
34
34
  var className = _ref.className,
35
35
  style = _ref.style,
36
36
  value = _ref.value,
37
+ disabledDate = _ref.disabledDate,
37
38
  _onClick = _ref.onClick;
38
39
  var classNames = useClassNames(CLASS_NAMES);
39
40
  var _useValue = useValue({
@@ -54,7 +55,8 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref, ref) {
54
55
  var dateCells = useDateCells({
55
56
  timespan: timespan,
56
57
  focusedAt: focusedAt,
57
- click: onClick,
58
+ onClick: onClick,
59
+ disabledDate: disabledDate,
58
60
  classNames: classNames
59
61
  });
60
62
  var headCells = useHeadCells({
@@ -68,7 +70,7 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref, ref) {
68
70
  header: props($label.large, styles.header),
69
71
  heading: props(styles.heading, $body.medium),
70
72
  body: {
71
- className: "musaex-1mwwwfo"
73
+ className: "musaex-1vathgz musaex-4jqler"
72
74
  }
73
75
  };
74
76
  useImperativeHandle(ref, function () {
@@ -6,7 +6,7 @@ var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
6
6
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
7
7
  var dayjs = require('dayjs');
8
8
  var React = require('react');
9
- var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
9
+ var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
10
10
  var hooks = require('../theme/hooks.cjs');
11
11
  var tooltip = require('../tooltip/tooltip.cjs');
12
12
  var relax = require('@aiszlab/relax');
@@ -2,7 +2,7 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
3
3
  import dayjs from 'dayjs';
4
4
  import React, { useMemo } from 'react';
5
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.17.5/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
5
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.18.3/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
6
6
  import { useTheme } from '../theme/hooks.mjs';
7
7
  import Tooltip from '../tooltip/tooltip.mjs';
8
8
  import { min, clamp, toFunction } from '@aiszlab/relax';