musae 0.5.2 → 0.5.3

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 (34) hide show
  1. package/dist/components/button/button.cjs +1 -1
  2. package/dist/components/button/button.d.ts +1 -1
  3. package/dist/components/button/button.mjs +1 -1
  4. package/dist/components/fab/context.cjs +10 -0
  5. package/dist/components/fab/context.d.ts +8 -0
  6. package/dist/components/fab/context.mjs +10 -0
  7. package/dist/components/fab/fab.cjs +131 -23
  8. package/dist/components/fab/fab.d.ts +1 -1
  9. package/dist/components/fab/fab.mjs +133 -25
  10. package/dist/components/icon/icons/home/index.d.ts +6 -0
  11. package/dist/components/icon/icons/home/wind-power.cjs +29 -0
  12. package/dist/components/icon/icons/home/wind-power.d.ts +3 -0
  13. package/dist/components/icon/icons/home/wind-power.mjs +27 -0
  14. package/dist/components/icon/icons/index.cjs +2 -0
  15. package/dist/components/icon/icons/index.d.ts +1 -0
  16. package/dist/components/icon/icons/index.mjs +1 -0
  17. package/dist/components/notification/notification.cjs +1 -1
  18. package/dist/components/notification/notification.mjs +1 -1
  19. package/dist/components/rich-text-editor/rich-text-editor.cjs +3 -3
  20. package/dist/components/rich-text-editor/rich-text-editor.mjs +3 -3
  21. package/dist/components/theme/hooks.cjs +1 -1
  22. package/dist/components/theme/hooks.mjs +1 -1
  23. package/dist/components/theme/tokens.stylex.d.ts +1 -1
  24. package/dist/components/visually-hidden/visually-hidden.cjs +1 -1
  25. package/dist/components/visually-hidden/visually-hidden.mjs +1 -1
  26. package/dist/hooks/use-class-names.d.ts +0 -3
  27. package/dist/styles.css +34 -22
  28. package/dist/utils/class-name.cjs +0 -5
  29. package/dist/utils/class-name.d.ts +0 -9
  30. package/dist/utils/class-name.mjs +1 -6
  31. package/package.json +10 -12
  32. package/dist/components/fab/floatable.cjs +0 -106
  33. package/dist/components/fab/floatable.d.ts +0 -4
  34. package/dist/components/fab/floatable.mjs +0 -104
@@ -23,7 +23,7 @@ var styles = {
23
23
  gap: "musaex-4ttznp",
24
24
  rowGap: null,
25
25
  columnGap: null,
26
- transitionProperty: "musaex-fagghw",
26
+ transitionProperty: "musaex-1yyhn7k",
27
27
  transitionDuration: "musaex-1d8287x",
28
28
  willChange: "musaex-19v51jg",
29
29
  borderWidth: "musaex-1628nlo",
@@ -6,7 +6,7 @@ declare const styles: Readonly<{
6
6
  readonly alignItems: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"alignItems", "center">;
7
7
  readonly justifyContent: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"justifyContent", "center">;
8
8
  readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", string>;
9
- readonly transitionProperty: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"transitionProperty", "all">;
9
+ readonly transitionProperty: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"transitionProperty", "background-color, color, box-shadow">;
10
10
  readonly transitionDuration: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"transitionDuration", "0.3s">;
11
11
  readonly willChange: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"willChange", "background-color, color, box-shadow">;
12
12
  readonly borderWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderWidth", string>;
@@ -21,7 +21,7 @@ var styles = {
21
21
  gap: "musaex-4ttznp",
22
22
  rowGap: null,
23
23
  columnGap: null,
24
- transitionProperty: "musaex-fagghw",
24
+ transitionProperty: "musaex-1yyhn7k",
25
25
  transitionDuration: "musaex-1d8287x",
26
26
  willChange: "musaex-19v51jg",
27
27
  borderWidth: "musaex-1628nlo",
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @description
3
+ * class names
4
+ */
5
+ var CLASS_NAMES = {
6
+ overlay: "fab__overlay",
7
+ fab: "fab"
8
+ };
9
+
10
+ exports.CLASS_NAMES = CLASS_NAMES;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @description
3
+ * class names
4
+ */
5
+ export declare const CLASS_NAMES: {
6
+ overlay: string;
7
+ fab: string;
8
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @description
3
+ * class names
4
+ */
5
+ var CLASS_NAMES = {
6
+ overlay: "fab__overlay",
7
+ fab: "fab"
8
+ };
9
+
10
+ export { CLASS_NAMES };
@@ -1,41 +1,149 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
- var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
4
3
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
5
4
  var React = require('react');
6
- var core = require('@dnd-kit/core');
7
- var floatable = require('./floatable.cjs');
8
- var modifiers = require('@dnd-kit/modifiers');
9
5
  var relax = require('@aiszlab/relax');
6
+ var dom = require('@aiszlab/relax/dom');
10
7
  var useContainer = require('../../hooks/use-container.cjs');
8
+ var portal = require('../portal/portal.cjs');
9
+ var iconButton = require('../icon-button/icon-button.cjs');
10
+ var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.8.0/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
11
+ var tokens_stylex = require('../theme/tokens.stylex.cjs');
12
+ var useClassNames_component = require('../../hooks/use-class-names.component.cjs');
13
+ var context = require('./context.cjs');
11
14
 
15
+ var styles = {
16
+ portal: {
17
+ overflow: "musaex-b3r6kr",
18
+ overflowX: null,
19
+ overflowY: null,
20
+ inset: "musaex-10a8y8t",
21
+ insetInline: null,
22
+ insetInlineStart: null,
23
+ insetInlineEnd: null,
24
+ left: null,
25
+ right: null,
26
+ insetBlock: null,
27
+ top: null,
28
+ bottom: null,
29
+ zIndex: "musaex-438vp",
30
+ $$css: true
31
+ },
32
+ fixed: {
33
+ position: "musaex-ixxii4",
34
+ $$css: true
35
+ },
36
+ disable: {
37
+ pointerEvents: "musaex-47corl",
38
+ $$css: true
39
+ },
40
+ button: function button(props) {
41
+ return [{
42
+ cursor: "musaex-1ypdohk",
43
+ right: null,
44
+ insetInlineStart: "musaex-14hirk2",
45
+ insetInlineEnd: "musaex-hzx67v",
46
+ bottom: "musaex-11gqvze",
47
+ pointerEvents: "musaex-67bb7w",
48
+ transform: "musaex-1v0jg1i",
49
+ left: null,
50
+ top: "musaex-1dhtdto",
51
+ ":not(#\\#)_position": "musaex-1lkkojn",
52
+ $$css: true
53
+ }, {
54
+ "--transform": "translateX(".concat(props.movementX, "px) translateY(").concat(props.movementY, "px)") != null ? "translateX(".concat(props.movementX, "px) translateY(").concat(props.movementY, "px)") : "initial",
55
+ "--insetInlineEnd": function (val) {
56
+ return typeof val === "number" ? val + "px" : val != null ? val : "initial";
57
+ }(props.isDragged ? void 0 : tokens_stylex.spacing.xlarge),
58
+ "--insetBlockEnd": function (val) {
59
+ return typeof val === "number" ? val + "px" : val != null ? val : "initial";
60
+ }(props.isDragged ? void 0 : tokens_stylex.spacing.xlarge),
61
+ "--insetInlineStart": function (val) {
62
+ return typeof val === "number" ? val + "px" : val != null ? val : "initial";
63
+ }(props.isDragged ? props.insetInlineStart : void 0),
64
+ "--insetBlockStart": function (val) {
65
+ return typeof val === "number" ? val + "px" : val != null ? val : "initial";
66
+ }(props.isDragged ? props.insetBlockStart : void 0)
67
+ }];
68
+ }
69
+ };
12
70
  var Fab = function Fab(_ref) {
13
71
  var container = _ref.container,
14
72
  children = _ref.children,
15
- onClick = _ref.onClick;
16
- var _useIdentity = relax.useIdentity(),
17
- _useIdentity2 = _slicedToArray(_useIdentity, 1),
18
- id = _useIdentity2[0];
19
- var floatableRef = React.useRef(null);
73
+ click = _ref.onClick;
74
+ var portalRef = React.useRef(null);
75
+ var buttonRef = React.useRef(null);
20
76
  var _useContainer = useContainer.useContainer({
21
77
  container: container
22
78
  }),
23
79
  _container = _useContainer.container;
24
- var modifier = relax.useEvent(function (args) {
25
- var _floatableRef$current, _floatableRef$current2;
26
- var clientRect = (_floatableRef$current = (_floatableRef$current2 = floatableRef.current) === null || _floatableRef$current2 === void 0 ? void 0 : _floatableRef$current2.getBoundingClientRect()) !== null && _floatableRef$current !== void 0 ? _floatableRef$current : null;
27
- return modifiers.restrictToParentElement(_objectSpread(_objectSpread({}, args), {}, {
28
- draggingNodeRect: clientRect
29
- }));
80
+ var _useDrag = relax.useDrag(),
81
+ _useDrag2 = _slicedToArray(_useDrag, 2),
82
+ _useDrag2$ = _useDrag2[0],
83
+ isDragging = _useDrag2$.isDragging,
84
+ offsetX = _useDrag2$.offsetX,
85
+ offsetY = _useDrag2$.offsetY,
86
+ x = _useDrag2$.x,
87
+ y = _useDrag2$.y,
88
+ movementX = _useDrag2$.movementX,
89
+ movementY = _useDrag2$.movementY,
90
+ isDragged = _useDrag2$.isDragged,
91
+ _useDrag2$2 = _useDrag2[1],
92
+ dragEnd = _useDrag2$2.onDragEnd,
93
+ dragMove = _useDrag2$2.onDragMove,
94
+ dragStart = _useDrag2$2.onDragStart;
95
+ var classNames = useClassNames_component.useClassNames(context.CLASS_NAMES);
96
+ var isMoved = React.useRef(false);
97
+ var styled = {
98
+ portal: stylex.default.props(styles.fixed, styles.portal, !isDragging && styles.disable),
99
+ button: stylex.default.props(styles.button({
100
+ movementX: movementX,
101
+ movementY: movementY,
102
+ isDragged: isDragged,
103
+ insetInlineStart: x - offsetX,
104
+ insetBlockStart: y - offsetY
105
+ })),
106
+ icon: {
107
+ className: "musaex-47corl musaex-3nfvp2"
108
+ }
109
+ };
110
+ var onDragStart = React.useCallback(function (event) {
111
+ if (!dom.contains(buttonRef.current, event.target)) return;
112
+ event.stopPropagation();
113
+ dragStart(event);
114
+ }, [dragStart]);
115
+ var onClick = relax.useEvent(function (event) {
116
+ if (isMoved.current) return;
117
+ click === null || click === void 0 || click(event);
118
+ });
119
+ var onDragMove = React.useCallback(function (event) {
120
+ isMoved.current = true;
121
+ event.stopPropagation();
122
+ dragMove(event);
123
+ }, [dragMove]);
124
+ var onDragEnd = relax.useRaf(function (event) {
125
+ dragEnd(event);
126
+ isMoved.current = false;
30
127
  });
31
- return /*#__PURE__*/React.createElement(core.DndContext, {
32
- id: id,
33
- modifiers: [modifier]
34
- }, /*#__PURE__*/React.createElement(floatable.default, {
35
- ref: floatableRef,
36
- container: _container,
37
- onClick: onClick
38
- }, children));
128
+ return /*#__PURE__*/React.createElement(portal.default, {
129
+ container: _container
130
+ }, /*#__PURE__*/React.createElement("div", {
131
+ ref: portalRef,
132
+ onMouseDown: onDragStart,
133
+ onMouseMove: isDragging ? onDragMove : void 0,
134
+ onMouseUp: onDragEnd,
135
+ className: relax.clsx(classNames.overlay, styled.portal.className),
136
+ style: styled.portal.style
137
+ }, /*#__PURE__*/React.createElement(iconButton.default, {
138
+ ref: buttonRef,
139
+ onClick: onClick,
140
+ className: relax.clsx(classNames.fab, styled.button.className),
141
+ style: styled.button.style,
142
+ ripple: false
143
+ }, /*#__PURE__*/React.createElement("span", {
144
+ className: styled.icon.className,
145
+ style: styled.icon.style
146
+ }, children))));
39
147
  };
40
148
 
41
149
  exports.default = Fab;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import type { FabProps } from "musae/types/fab";
3
- declare const Fab: ({ container, children, onClick }: FabProps) => React.JSX.Element;
3
+ declare const Fab: ({ container, children, onClick: click }: FabProps) => React.JSX.Element;
4
4
  export default Fab;
@@ -1,39 +1,147 @@
1
- import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
1
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
3
- import React, { useRef } from 'react';
4
- import { DndContext } from '@dnd-kit/core';
5
- import Floatable from './floatable.mjs';
6
- import { restrictToParentElement } from '@dnd-kit/modifiers';
7
- import { useIdentity, useEvent } from '@aiszlab/relax';
2
+ import React, { useRef, useCallback } from 'react';
3
+ import { useDrag, useEvent, useRaf, clsx } from '@aiszlab/relax';
4
+ import { contains } from '@aiszlab/relax/dom';
8
5
  import { useContainer } from '../../hooks/use-container.mjs';
6
+ import Portal from '../portal/portal.mjs';
7
+ import IconButton from '../icon-button/icon-button.mjs';
8
+ import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.8.0/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
9
+ import { spacing } from '../theme/tokens.stylex.mjs';
10
+ import { useClassNames } from '../../hooks/use-class-names.component.mjs';
11
+ import { CLASS_NAMES } from './context.mjs';
9
12
 
13
+ var styles = {
14
+ portal: {
15
+ overflow: "musaex-b3r6kr",
16
+ overflowX: null,
17
+ overflowY: null,
18
+ inset: "musaex-10a8y8t",
19
+ insetInline: null,
20
+ insetInlineStart: null,
21
+ insetInlineEnd: null,
22
+ left: null,
23
+ right: null,
24
+ insetBlock: null,
25
+ top: null,
26
+ bottom: null,
27
+ zIndex: "musaex-438vp",
28
+ $$css: true
29
+ },
30
+ fixed: {
31
+ position: "musaex-ixxii4",
32
+ $$css: true
33
+ },
34
+ disable: {
35
+ pointerEvents: "musaex-47corl",
36
+ $$css: true
37
+ },
38
+ button: function button(props) {
39
+ return [{
40
+ cursor: "musaex-1ypdohk",
41
+ right: null,
42
+ insetInlineStart: "musaex-14hirk2",
43
+ insetInlineEnd: "musaex-hzx67v",
44
+ bottom: "musaex-11gqvze",
45
+ pointerEvents: "musaex-67bb7w",
46
+ transform: "musaex-1v0jg1i",
47
+ left: null,
48
+ top: "musaex-1dhtdto",
49
+ ":not(#\\#)_position": "musaex-1lkkojn",
50
+ $$css: true
51
+ }, {
52
+ "--transform": "translateX(".concat(props.movementX, "px) translateY(").concat(props.movementY, "px)") != null ? "translateX(".concat(props.movementX, "px) translateY(").concat(props.movementY, "px)") : "initial",
53
+ "--insetInlineEnd": function (val) {
54
+ return typeof val === "number" ? val + "px" : val != null ? val : "initial";
55
+ }(props.isDragged ? void 0 : spacing.xlarge),
56
+ "--insetBlockEnd": function (val) {
57
+ return typeof val === "number" ? val + "px" : val != null ? val : "initial";
58
+ }(props.isDragged ? void 0 : spacing.xlarge),
59
+ "--insetInlineStart": function (val) {
60
+ return typeof val === "number" ? val + "px" : val != null ? val : "initial";
61
+ }(props.isDragged ? props.insetInlineStart : void 0),
62
+ "--insetBlockStart": function (val) {
63
+ return typeof val === "number" ? val + "px" : val != null ? val : "initial";
64
+ }(props.isDragged ? props.insetBlockStart : void 0)
65
+ }];
66
+ }
67
+ };
10
68
  var Fab = function Fab(_ref) {
11
69
  var container = _ref.container,
12
70
  children = _ref.children,
13
- onClick = _ref.onClick;
14
- var _useIdentity = useIdentity(),
15
- _useIdentity2 = _slicedToArray(_useIdentity, 1),
16
- id = _useIdentity2[0];
17
- var floatableRef = useRef(null);
71
+ click = _ref.onClick;
72
+ var portalRef = useRef(null);
73
+ var buttonRef = useRef(null);
18
74
  var _useContainer = useContainer({
19
75
  container: container
20
76
  }),
21
77
  _container = _useContainer.container;
22
- var modifier = useEvent(function (args) {
23
- var _floatableRef$current, _floatableRef$current2;
24
- var clientRect = (_floatableRef$current = (_floatableRef$current2 = floatableRef.current) === null || _floatableRef$current2 === void 0 ? void 0 : _floatableRef$current2.getBoundingClientRect()) !== null && _floatableRef$current !== void 0 ? _floatableRef$current : null;
25
- return restrictToParentElement(_objectSpread(_objectSpread({}, args), {}, {
26
- draggingNodeRect: clientRect
27
- }));
78
+ var _useDrag = useDrag(),
79
+ _useDrag2 = _slicedToArray(_useDrag, 2),
80
+ _useDrag2$ = _useDrag2[0],
81
+ isDragging = _useDrag2$.isDragging,
82
+ offsetX = _useDrag2$.offsetX,
83
+ offsetY = _useDrag2$.offsetY,
84
+ x = _useDrag2$.x,
85
+ y = _useDrag2$.y,
86
+ movementX = _useDrag2$.movementX,
87
+ movementY = _useDrag2$.movementY,
88
+ isDragged = _useDrag2$.isDragged,
89
+ _useDrag2$2 = _useDrag2[1],
90
+ dragEnd = _useDrag2$2.onDragEnd,
91
+ dragMove = _useDrag2$2.onDragMove,
92
+ dragStart = _useDrag2$2.onDragStart;
93
+ var classNames = useClassNames(CLASS_NAMES);
94
+ var isMoved = useRef(false);
95
+ var styled = {
96
+ portal: _stylex.props(styles.fixed, styles.portal, !isDragging && styles.disable),
97
+ button: _stylex.props(styles.button({
98
+ movementX: movementX,
99
+ movementY: movementY,
100
+ isDragged: isDragged,
101
+ insetInlineStart: x - offsetX,
102
+ insetBlockStart: y - offsetY
103
+ })),
104
+ icon: {
105
+ className: "musaex-47corl musaex-3nfvp2"
106
+ }
107
+ };
108
+ var onDragStart = useCallback(function (event) {
109
+ if (!contains(buttonRef.current, event.target)) return;
110
+ event.stopPropagation();
111
+ dragStart(event);
112
+ }, [dragStart]);
113
+ var onClick = useEvent(function (event) {
114
+ if (isMoved.current) return;
115
+ click === null || click === void 0 || click(event);
116
+ });
117
+ var onDragMove = useCallback(function (event) {
118
+ isMoved.current = true;
119
+ event.stopPropagation();
120
+ dragMove(event);
121
+ }, [dragMove]);
122
+ var onDragEnd = useRaf(function (event) {
123
+ dragEnd(event);
124
+ isMoved.current = false;
28
125
  });
29
- return /*#__PURE__*/React.createElement(DndContext, {
30
- id: id,
31
- modifiers: [modifier]
32
- }, /*#__PURE__*/React.createElement(Floatable, {
33
- ref: floatableRef,
34
- container: _container,
35
- onClick: onClick
36
- }, children));
126
+ return /*#__PURE__*/React.createElement(Portal, {
127
+ container: _container
128
+ }, /*#__PURE__*/React.createElement("div", {
129
+ ref: portalRef,
130
+ onMouseDown: onDragStart,
131
+ onMouseMove: isDragging ? onDragMove : void 0,
132
+ onMouseUp: onDragEnd,
133
+ className: clsx(classNames.overlay, styled.portal.className),
134
+ style: styled.portal.style
135
+ }, /*#__PURE__*/React.createElement(IconButton, {
136
+ ref: buttonRef,
137
+ onClick: onClick,
138
+ className: clsx(classNames.fab, styled.button.className),
139
+ style: styled.button.style,
140
+ ripple: false
141
+ }, /*#__PURE__*/React.createElement("span", {
142
+ className: styled.icon.className,
143
+ style: styled.icon.style
144
+ }, children))));
37
145
  };
38
146
 
39
147
  export { Fab as default };
@@ -0,0 +1,6 @@
1
+ import WindPower from "./wind-power";
2
+ declare const _: {
3
+ WindPower: (props: Omit<import("../../../../types/icon").IconProps, "as">) => import("react").FunctionComponentElement<import("../../../../types/icon").IconProps>;
4
+ };
5
+ export default _;
6
+ export { WindPower };
@@ -0,0 +1,29 @@
1
+ Object.defineProperty(exports, '__esModule', { value: true });
2
+
3
+ var React = require('react');
4
+ var hoc = require('../../hoc.cjs');
5
+
6
+ var WindPower = hoc.withIcon(function (_ref) {
7
+ var size = _ref.size;
8
+ return /*#__PURE__*/React.createElement("svg", {
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ width: size,
11
+ height: size,
12
+ viewBox: "0 0 24 24",
13
+ fill: "none"
14
+ }, /*#__PURE__*/React.createElement("path", {
15
+ d: "M10.2501 2.75H4.25012V4.75H10.2501V2.75Z",
16
+ fill: "currentColor"
17
+ }), /*#__PURE__*/React.createElement("path", {
18
+ d: "M6.25012 6.75H1.25012V8.75H6.25012V6.75Z",
19
+ fill: "currentColor"
20
+ }), /*#__PURE__*/React.createElement("path", {
21
+ d: "M8.25012 18.75H3.25012V20.75H8.25012V18.75Z",
22
+ fill: "currentColor"
23
+ }), /*#__PURE__*/React.createElement("path", {
24
+ d: "M22.4601 18.36L20.1801 14.26C19.9101 13.78 19.4501 13.43 18.9201 13.29L16.2301 12.62C16.2101 12.15 16.0901 11.7 15.8601 11.29L19.8201 4.7C20.4701 3.62 20.1201 2.22 19.0401 1.57C18.6801 1.35 18.2701 1.25 17.8701 1.25C17.3101 1.25 16.7501 1.46 16.3101 1.87L12.8801 5.08C12.4801 5.45 12.2501 5.98 12.2501 6.53V9.93C11.7801 10.1 11.3601 10.38 11.0201 10.75H3.53012C2.27012 10.75 1.25012 11.77 1.25012 13.03C1.25012 14.05 1.92012 14.94 2.90012 15.22L7.41012 16.51C7.59012 16.56 7.78012 16.59 7.96012 16.59C8.32012 16.59 8.68012 16.49 8.99012 16.3L11.2301 14.96C11.5201 15.22 11.8601 15.43 12.2501 15.57V20.75C11.1501 20.75 10.2501 21.65 10.2501 22.75H16.2501C16.2501 21.65 15.3501 20.75 14.2501 20.75V16.47L18.8601 21.08C19.3101 21.53 19.8901 21.75 20.4701 21.75C21.0501 21.75 21.6401 21.53 22.0801 21.08C22.8001 20.36 22.9601 19.25 22.4601 18.36ZM7.97012 14.59L3.45012 13.3C3.33012 13.27 3.25012 13.15 3.25012 13.03C3.25012 12.88 3.38012 12.75 3.53012 12.75H10.2601C10.2601 12.9 10.2701 13.05 10.2901 13.19L7.97012 14.59ZM13.2501 13.75C12.7001 13.75 12.2501 13.3 12.2501 12.75C12.2501 12.2 12.7001 11.75 13.2501 11.75C13.8001 11.75 14.2501 12.2 14.2501 12.75C14.2501 13.3 13.8001 13.75 13.2501 13.75ZM14.2501 9.89V6.53L17.6801 3.32C17.7301 3.27 17.8701 3.2 18.0201 3.28C18.1501 3.36 18.2001 3.53 18.1201 3.66L14.3801 9.9L14.2501 9.89ZM20.6701 19.67C20.6201 19.72 20.4301 19.83 20.2701 19.67L15.4201 14.82C15.5001 14.73 15.5801 14.64 15.6601 14.54L18.4401 15.23L20.7201 19.33C20.7801 19.44 20.7601 19.58 20.6701 19.67Z",
25
+ fill: "currentColor"
26
+ }));
27
+ });
28
+
29
+ exports.default = WindPower;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const WindPower: (props: Omit<import("../../../../types/icon").IconProps, "as">) => React.FunctionComponentElement<import("../../../../types/icon").IconProps>;
3
+ export default WindPower;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { withIcon } from '../../hoc.mjs';
3
+
4
+ var WindPower = withIcon(function (_ref) {
5
+ var size = _ref.size;
6
+ return /*#__PURE__*/React.createElement("svg", {
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: size,
9
+ height: size,
10
+ viewBox: "0 0 24 24",
11
+ fill: "none"
12
+ }, /*#__PURE__*/React.createElement("path", {
13
+ d: "M10.2501 2.75H4.25012V4.75H10.2501V2.75Z",
14
+ fill: "currentColor"
15
+ }), /*#__PURE__*/React.createElement("path", {
16
+ d: "M6.25012 6.75H1.25012V8.75H6.25012V6.75Z",
17
+ fill: "currentColor"
18
+ }), /*#__PURE__*/React.createElement("path", {
19
+ d: "M8.25012 18.75H3.25012V20.75H8.25012V18.75Z",
20
+ fill: "currentColor"
21
+ }), /*#__PURE__*/React.createElement("path", {
22
+ d: "M22.4601 18.36L20.1801 14.26C19.9101 13.78 19.4501 13.43 18.9201 13.29L16.2301 12.62C16.2101 12.15 16.0901 11.7 15.8601 11.29L19.8201 4.7C20.4701 3.62 20.1201 2.22 19.0401 1.57C18.6801 1.35 18.2701 1.25 17.8701 1.25C17.3101 1.25 16.7501 1.46 16.3101 1.87L12.8801 5.08C12.4801 5.45 12.2501 5.98 12.2501 6.53V9.93C11.7801 10.1 11.3601 10.38 11.0201 10.75H3.53012C2.27012 10.75 1.25012 11.77 1.25012 13.03C1.25012 14.05 1.92012 14.94 2.90012 15.22L7.41012 16.51C7.59012 16.56 7.78012 16.59 7.96012 16.59C8.32012 16.59 8.68012 16.49 8.99012 16.3L11.2301 14.96C11.5201 15.22 11.8601 15.43 12.2501 15.57V20.75C11.1501 20.75 10.2501 21.65 10.2501 22.75H16.2501C16.2501 21.65 15.3501 20.75 14.2501 20.75V16.47L18.8601 21.08C19.3101 21.53 19.8901 21.75 20.4701 21.75C21.0501 21.75 21.6401 21.53 22.0801 21.08C22.8001 20.36 22.9601 19.25 22.4601 18.36ZM7.97012 14.59L3.45012 13.3C3.33012 13.27 3.25012 13.15 3.25012 13.03C3.25012 12.88 3.38012 12.75 3.53012 12.75H10.2601C10.2601 12.9 10.2701 13.05 10.2901 13.19L7.97012 14.59ZM13.2501 13.75C12.7001 13.75 12.2501 13.3 12.2501 12.75C12.2501 12.2 12.7001 11.75 13.2501 11.75C13.8001 11.75 14.2501 12.2 14.2501 12.75C14.2501 13.3 13.8001 13.75 13.2501 13.75ZM14.2501 9.89V6.53L17.6801 3.32C17.7301 3.27 17.8701 3.2 18.0201 3.28C18.1501 3.36 18.2001 3.53 18.1201 3.66L14.3801 9.9L14.2501 9.89ZM20.6701 19.67C20.6201 19.72 20.4301 19.83 20.2701 19.67L15.4201 14.82C15.5001 14.73 15.5801 14.64 15.6601 14.54L18.4401 15.23L20.7201 19.33C20.7801 19.44 20.7601 19.58 20.6701 19.67Z",
23
+ fill: "currentColor"
24
+ }));
25
+ });
26
+
27
+ export { WindPower as default };
@@ -63,6 +63,7 @@ var checklist = require('./editor/checklist.cjs');
63
63
  var attchFile = require('./editor/attch-file.cjs');
64
64
  var github = require('./mock/github.cjs');
65
65
  var loading = require('./mock/loading.cjs');
66
+ var windPower = require('./home/wind-power.cjs');
66
67
 
67
68
 
68
69
 
@@ -131,3 +132,4 @@ exports.Checklist = checklist.default;
131
132
  exports.AttachFile = attchFile.default;
132
133
  exports.Github = github.default;
133
134
  exports.Loading = loading.default;
135
+ exports.WindPower = windPower.default;
@@ -7,3 +7,4 @@ export * from "./image";
7
7
  export * from "./toggle";
8
8
  export * from "./editor";
9
9
  export * from "./mock";
10
+ export * from "./home";
@@ -63,3 +63,4 @@ export { default as Checklist } from './editor/checklist.mjs';
63
63
  export { default as AttachFile } from './editor/attch-file.mjs';
64
64
  export { default as Github } from './mock/github.mjs';
65
65
  export { default as Loading } from './mock/loading.mjs';
66
+ export { default as WindPower } from './home/wind-power.mjs';
@@ -50,7 +50,7 @@ var styles = {
50
50
  borderBottomRightRadius: null,
51
51
  boxShadow: "musaex-sgc7hx",
52
52
  maxWidth: "musaex-77asx0",
53
- pointerEvents: "musaex-71s49j",
53
+ pointerEvents: "musaex-67bb7w",
54
54
  overflow: "musaex-b3r6kr",
55
55
  overflowX: null,
56
56
  overflowY: null,
@@ -48,7 +48,7 @@ var styles = {
48
48
  borderBottomRightRadius: null,
49
49
  boxShadow: "musaex-sgc7hx",
50
50
  maxWidth: "musaex-77asx0",
51
- pointerEvents: "musaex-71s49j",
51
+ pointerEvents: "musaex-67bb7w",
52
52
  overflow: "musaex-b3r6kr",
53
53
  overflowX: null,
54
54
  overflowY: null,
@@ -221,13 +221,13 @@ var RichTextEditor = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
221
221
  h5: stylex.default.props(theme.typography.headline.medium),
222
222
  h6: stylex.default.props(theme.typography.headline.small),
223
223
  code: {
224
- className: "musaex-1x8l0va musaex-16c42yj musaex-11ayw28 musaex-1lliihq musaex-ysyzu8"
224
+ className: "musaex-an1lw2 musaex-1lliihq musaex-ysyzu8 musaex-1fioaya musaex-4bkepr musaex-nd81q0 musaex-7jmdrq"
225
225
  },
226
226
  inlineCode: {
227
- className: "musaex-16c42yj musaex-1x8l0va musaex-11ayw28"
227
+ className: "musaex-an1lw2 musaex-11ayw28 musaex-pne1ww musaex-1fpq7td musaex-1sq4p16"
228
228
  },
229
229
  link: {
230
- className: "musaex-1qlt0p8 musaex-1ed109x musaex-1hl2dhg musaex-t0b8zv"
230
+ className: "musaex-zwifym musaex-1ypdohk musaex-1hl2dhg musaex-t0b8zv"
231
231
  },
232
232
  checkbox: stylex.default.props(styles$1.default.input["default"], styles.checkbox),
233
233
  list: {
@@ -219,13 +219,13 @@ var RichTextEditor = /*#__PURE__*/forwardRef(function (_ref, ref) {
219
219
  h5: _stylex.props(typography.headline.medium),
220
220
  h6: _stylex.props(typography.headline.small),
221
221
  code: {
222
- className: "musaex-1x8l0va musaex-16c42yj musaex-11ayw28 musaex-1lliihq musaex-ysyzu8"
222
+ className: "musaex-an1lw2 musaex-1lliihq musaex-ysyzu8 musaex-1fioaya musaex-4bkepr musaex-nd81q0 musaex-7jmdrq"
223
223
  },
224
224
  inlineCode: {
225
- className: "musaex-16c42yj musaex-1x8l0va musaex-11ayw28"
225
+ className: "musaex-an1lw2 musaex-11ayw28 musaex-pne1ww musaex-1fpq7td musaex-1sq4p16"
226
226
  },
227
227
  link: {
228
- className: "musaex-1qlt0p8 musaex-1ed109x musaex-1hl2dhg musaex-t0b8zv"
228
+ className: "musaex-zwifym musaex-1ypdohk musaex-1hl2dhg musaex-t0b8zv"
229
229
  },
230
230
  checkbox: _stylex.props(styles$1.input["default"], styles.checkbox),
231
231
  list: {
@@ -195,7 +195,7 @@ var useSwitchable = function useSwitchable(_ref) {
195
195
  var radius = Math.hypot(Math.max(x, window.innerWidth - x), Math.max(y, window.innerHeight - y));
196
196
  var clipPath = ["circle(0px at ".concat(x, "px ").concat(y, "px)"), "circle(".concat(radius, "px at ").concat(x, "px ").concat(y, "px)")];
197
197
  document.documentElement.animate({
198
- clipPath: isDark ? [].concat(clipPath).reverse() : clipPath
198
+ clipPath: isDark ? clipPath.reverse() : clipPath
199
199
  }, {
200
200
  duration: 300,
201
201
  easing: "ease-in",
@@ -195,7 +195,7 @@ var useSwitchable = function useSwitchable(_ref) {
195
195
  var radius = Math.hypot(Math.max(x, window.innerWidth - x), Math.max(y, window.innerHeight - y));
196
196
  var clipPath = ["circle(0px at ".concat(x, "px ").concat(y, "px)"), "circle(".concat(radius, "px at ").concat(x, "px ").concat(y, "px)")];
197
197
  document.documentElement.animate({
198
- clipPath: isDark ? [].concat(clipPath).reverse() : clipPath
198
+ clipPath: isDark ? clipPath.reverse() : clipPath
199
199
  }, {
200
200
  duration: 300,
201
201
  easing: "ease-in",
@@ -80,7 +80,7 @@ export declare const positions: import("@stylexjs/stylex").VarGroup<Readonly<{
80
80
  min: string;
81
81
  header: string;
82
82
  popper: string;
83
- floatable: string;
83
+ fab: string;
84
84
  dialog: string;
85
85
  drawer: string;
86
86
  tour: string;
@@ -9,7 +9,7 @@ var VisuallyHidden = function VisuallyHidden(_ref) {
9
9
  var children = _ref.children,
10
10
  dangerouslySetInnerHTML = _ref.dangerouslySetInnerHTML;
11
11
  var styled = {
12
- className: "musaex-1k7lhcj musaex-18eqiv3 musaex-9qdtsz musaex-10l6tqk musaex-zpqnlu"
12
+ className: "musaex-1k7lhcj musaex-18eqiv3 musaex-9qdtsz musaex-10l6tqk musaex-zpqnlu musaex-b3r6kr"
13
13
  };
14
14
  var classNames = useClassNames_component.useClassNames(context.CLASS_NAMES);
15
15
  return /*#__PURE__*/React.createElement("div", {
@@ -7,7 +7,7 @@ var VisuallyHidden = function VisuallyHidden(_ref) {
7
7
  var children = _ref.children,
8
8
  dangerouslySetInnerHTML = _ref.dangerouslySetInnerHTML;
9
9
  var styled = {
10
- className: "musaex-1k7lhcj musaex-18eqiv3 musaex-9qdtsz musaex-10l6tqk musaex-zpqnlu"
10
+ className: "musaex-1k7lhcj musaex-18eqiv3 musaex-9qdtsz musaex-10l6tqk musaex-zpqnlu musaex-b3r6kr"
11
11
  };
12
12
  var classNames = useClassNames(CLASS_NAMES);
13
13
  return /*#__PURE__*/React.createElement("div", {
@@ -257,9 +257,6 @@ export declare const useClassNames: <T extends keyof ClassNames>(token: T) => {
257
257
  1: string;
258
258
  2: string;
259
259
  };
260
- fab: {
261
- 0: string;
262
- };
263
260
  textarea: {
264
261
  0: string;
265
262
  1: string;
package/dist/styles.css CHANGED
@@ -4,7 +4,7 @@
4
4
  --musaex-1vh8wei: 1;
5
5
  --musaex-11upij1: 50;
6
6
  --musaex-oqacdq: 60;
7
- --musaex-if0yew: 990;
7
+ --musaex-1wsab3m: 990;
8
8
  --musaex-9gpkaf: 1080;
9
9
  --musaex-80rspi: 1080;
10
10
  --musaex-ah5ngi: 1080;
@@ -607,6 +607,10 @@
607
607
  margin-block: var(--musaex-h30iw9);
608
608
  }
609
609
 
610
+ .musaex-7jmdrq {
611
+ margin-block: var(--musaex-qk2ac7);
612
+ }
613
+
610
614
  .musaex-1sq4p16 {
611
615
  margin-inline: var(--musaex-1h5s2h0);
612
616
  }
@@ -849,14 +853,14 @@
849
853
  background-color: var(--cell-color);
850
854
  }
851
855
 
852
- .musaex-1x8l0va {
853
- background-color: var(--code-background-color);
854
- }
855
-
856
856
  .musaex-1jfbxs4 {
857
857
  background-color: var(--shadow);
858
858
  }
859
859
 
860
+ .musaex-an1lw2 {
861
+ background-color: var(--surface-container-highest);
862
+ }
863
+
860
864
  .musaex-uomep {
861
865
  background-image: linear-gradient(90deg, var(--shadow) 25%, var(--lighter-shadow) 37%, var(--shadow) 63%);
862
866
  }
@@ -917,8 +921,8 @@
917
921
  color: var(--color, revert);
918
922
  }
919
923
 
920
- .musaex-1qlt0p8 {
921
- color: var(--primary-color);
924
+ .musaex-zwifym {
925
+ color: var(--primary);
922
926
  }
923
927
 
924
928
  .musaex-4rvf3u {
@@ -1101,6 +1105,10 @@
1101
1105
  inset-inline-end: 0;
1102
1106
  }
1103
1107
 
1108
+ .musaex-hzx67v {
1109
+ inset-inline-end: var(--insetInlineEnd, revert);
1110
+ }
1111
+
1104
1112
  .musaex-1o0tod {
1105
1113
  inset-inline-start: 0;
1106
1114
  }
@@ -1109,6 +1117,10 @@
1109
1117
  inset-inline-start: calc(100% - var(--musaex-rlgvtq) - var(--musaex-xvo8wr));
1110
1118
  }
1111
1119
 
1120
+ .musaex-14hirk2 {
1121
+ inset-inline-start: var(--insetInlineStart, revert);
1122
+ }
1123
+
1112
1124
  .musaex-1nisehl {
1113
1125
  inset-inline-start: var(--musaex-1h5s2h0);
1114
1126
  }
@@ -1325,10 +1337,6 @@
1325
1337
  padding-inline-start: var(--musaex-1ncxh3n);
1326
1338
  }
1327
1339
 
1328
- .musaex-71s49j {
1329
- pointer-events: all;
1330
- }
1331
-
1332
1340
  .musaex-67bb7w {
1333
1341
  pointer-events: auto;
1334
1342
  }
@@ -1469,6 +1477,10 @@
1469
1477
  transition-property: background-color, border, color;
1470
1478
  }
1471
1479
 
1480
+ .musaex-1yyhn7k {
1481
+ transition-property: background-color, color, box-shadow;
1482
+ }
1483
+
1472
1484
  .musaex-kdsq27 {
1473
1485
  transition-property: box-shadow;
1474
1486
  }
@@ -1566,6 +1578,10 @@
1566
1578
  z-index: var(--musaex-1vh8wei);
1567
1579
  }
1568
1580
 
1581
+ .musaex-438vp {
1582
+ z-index: var(--musaex-1wsab3m);
1583
+ }
1584
+
1569
1585
  .musaex-yzdold {
1570
1586
  z-index: var(--musaex-7fr0d6);
1571
1587
  }
@@ -1586,10 +1602,6 @@
1586
1602
  z-index: var(--musaex-dlxqgz);
1587
1603
  }
1588
1604
 
1589
- .musaex-n0d15w {
1590
- z-index: var(--musaex-if0yew);
1591
- }
1592
-
1593
1605
  .musaex-1jhhwlq {
1594
1606
  z-index: var(--musaex-oqacdq);
1595
1607
  }
@@ -1650,7 +1662,7 @@
1650
1662
  opacity: var(--musaex-1itczwt);
1651
1663
  }
1652
1664
 
1653
- .musaex-1l7jasa:not([aria-checked="false"]):after, .musaex-no41pc:not(:last-of-type):after, .musaex-1lkkojn:not(#\#) {
1665
+ .musaex-1l7jasa:not([aria-checked="false"]):after, .musaex-1lkkojn:not(#\#), .musaex-no41pc:not(:last-of-type):after {
1654
1666
  position: absolute;
1655
1667
  }
1656
1668
 
@@ -1748,8 +1760,8 @@
1748
1760
  bottom: 0;
1749
1761
  }
1750
1762
 
1751
- .musaex-jnlgov {
1752
- bottom: 20px;
1763
+ .musaex-11gqvze {
1764
+ bottom: var(--insetBlockEnd, revert);
1753
1765
  }
1754
1766
 
1755
1767
  .musaex-vw9jmq {
@@ -2048,10 +2060,6 @@
2048
2060
  right: 0;
2049
2061
  }
2050
2062
 
2051
- .musaex-k6ci0l {
2052
- right: 20px;
2053
- }
2054
-
2055
2063
  .musaex-13vifvy {
2056
2064
  top: 0;
2057
2065
  }
@@ -2064,6 +2072,10 @@
2064
2072
  top: calc(var(--musaex-xrqq76) + var(--musaex-15cw4i4));
2065
2073
  }
2066
2074
 
2075
+ .musaex-1dhtdto {
2076
+ top: var(--insetBlockStart, revert);
2077
+ }
2078
+
2067
2079
  .musaex-1sporqg {
2068
2080
  top: var(--musaex-xvo8wr);
2069
2081
  }
@@ -328,10 +328,6 @@ exports.UploadClassToken = void 0;
328
328
  UploadClassToken[UploadClassToken["UploadedItem"] = 2] = "UploadedItem";
329
329
  UploadClassToken[UploadClassToken["UploadedPictureItem"] = 3] = "UploadedPictureItem";
330
330
  })(exports.UploadClassToken || (exports.UploadClassToken = {}));
331
- exports.FabClassToken = void 0;
332
- (function (FabClassToken) {
333
- FabClassToken[FabClassToken["Fab"] = 0] = "Fab";
334
- })(exports.FabClassToken || (exports.FabClassToken = {}));
335
331
  exports.TextareaClassToken = void 0;
336
332
  (function (TextareaClassToken) {
337
333
  TextareaClassToken[TextareaClassToken["Textarea"] = 0] = "Textarea";
@@ -398,7 +394,6 @@ var CLASS_NAMES = {
398
394
  upload: _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, exports.UploadClassToken.Upload, "upload"), exports.UploadClassToken.UploadedList, "upload__uploaded-list"), exports.UploadClassToken.UploadedItem, "upload__uploaded-item"), exports.UploadClassToken.UploadedPictureItem, "upload__uploaded-item--picture"),
399
395
  image: _defineProperty({}, exports.ImageClassToken.Image, "image"),
400
396
  table: _defineProperty(_defineProperty(_defineProperty({}, exports.TableClassToken.Table, "table"), exports.TableClassToken.Header, "table__header"), exports.TableClassToken.Body, "table__body"),
401
- fab: _defineProperty({}, exports.FabClassToken.Fab, "fab"),
402
397
  textarea: _defineProperty(_defineProperty({}, exports.TextareaClassToken.Textarea, "textarea"), exports.TextareaClassToken.Input, "textarea__input"),
403
398
  guideline: _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, exports.GuidelineClassToken.Guideline, "guideline"), exports.GuidelineClassToken.Figure, "guideline__figure"), exports.GuidelineClassToken.CaptionLabel, "guideline__caption-label"), exports.GuidelineClassToken.Caption, "guideline__caption")
404
399
  };
@@ -268,9 +268,6 @@ export declare enum UploadClassToken {
268
268
  UploadedItem = 2,
269
269
  UploadedPictureItem = 3
270
270
  }
271
- export declare enum FabClassToken {
272
- Fab = 0
273
- }
274
271
  export declare enum TextareaClassToken {
275
272
  Textarea = 0,
276
273
  Input = 1
@@ -542,9 +539,6 @@ export declare const CLASS_NAMES: {
542
539
  1: string;
543
540
  2: string;
544
541
  };
545
- fab: {
546
- 0: string;
547
- };
548
542
  textarea: {
549
543
  0: string;
550
544
  1: string;
@@ -819,9 +813,6 @@ export declare const DEFAULT_CLASS_NAMES: {
819
813
  1: string;
820
814
  2: string;
821
815
  };
822
- fab: {
823
- 0: string;
824
- };
825
816
  textarea: {
826
817
  0: string;
827
818
  1: string;
@@ -328,10 +328,6 @@ var UploadClassToken;
328
328
  UploadClassToken[UploadClassToken["UploadedItem"] = 2] = "UploadedItem";
329
329
  UploadClassToken[UploadClassToken["UploadedPictureItem"] = 3] = "UploadedPictureItem";
330
330
  })(UploadClassToken || (UploadClassToken = {}));
331
- var FabClassToken;
332
- (function (FabClassToken) {
333
- FabClassToken[FabClassToken["Fab"] = 0] = "Fab";
334
- })(FabClassToken || (FabClassToken = {}));
335
331
  var TextareaClassToken;
336
332
  (function (TextareaClassToken) {
337
333
  TextareaClassToken[TextareaClassToken["Textarea"] = 0] = "Textarea";
@@ -398,7 +394,6 @@ var CLASS_NAMES = {
398
394
  upload: _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, UploadClassToken.Upload, "upload"), UploadClassToken.UploadedList, "upload__uploaded-list"), UploadClassToken.UploadedItem, "upload__uploaded-item"), UploadClassToken.UploadedPictureItem, "upload__uploaded-item--picture"),
399
395
  image: _defineProperty({}, ImageClassToken.Image, "image"),
400
396
  table: _defineProperty(_defineProperty(_defineProperty({}, TableClassToken.Table, "table"), TableClassToken.Header, "table__header"), TableClassToken.Body, "table__body"),
401
- fab: _defineProperty({}, FabClassToken.Fab, "fab"),
402
397
  textarea: _defineProperty(_defineProperty({}, TextareaClassToken.Textarea, "textarea"), TextareaClassToken.Input, "textarea__input"),
403
398
  guideline: _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, GuidelineClassToken.Guideline, "guideline"), GuidelineClassToken.Figure, "guideline__figure"), GuidelineClassToken.CaptionLabel, "guideline__caption-label"), GuidelineClassToken.Caption, "guideline__caption")
404
399
  };
@@ -425,4 +420,4 @@ var addPrefix = function addPrefix(classNames, prefix) {
425
420
  */
426
421
  var DEFAULT_CLASS_NAMES = addPrefix(CLASS_NAMES, Token.Prefix);
427
422
 
428
- export { AvatarClassToken, BadgeClassToken, BreadcrumbClassToken, CLASS_NAMES, CalendarClassToken, CascaderClassToken, ClockClassToken, CollapseClassToken, DEFAULT_CLASS_NAMES, DatePickerClassToken, DateRangePickerClassToken, DialogClassToken, DividerClassToken, DrawerClassToken, EmptyClassToken, FabClassToken, FormClassToken, GridClassToken, GuidelineClassToken, HighlightClassToken, I18nButtonClassToken, IconClassToken, ImageClassToken, InputClassToken, LoadingClassToken, MenuClassToken, NotificationClassToken, PaginationClassToken, PickerClassToken, PopconfirmClassToken, PopoverClassToken, PopperClassToken, ProgressClassToken, QuoteClassToken, RadioClassToken, RateClassToken, RichTextEditorClassToken, SelectClassToken, StepsClassToken, SwitchClassToken, TableClassToken, TabsClassToken, TagClassToken, TextareaClassToken, TimePickerClassToken, TimelineClassToken, TooltipClassToken, TransferClassToken, TreeClassToken, UploadClassToken, VisuallyHiddenClassToken, WaterfallClassToken, addPrefix, withPrefix };
423
+ export { AvatarClassToken, BadgeClassToken, BreadcrumbClassToken, CLASS_NAMES, CalendarClassToken, CascaderClassToken, ClockClassToken, CollapseClassToken, DEFAULT_CLASS_NAMES, DatePickerClassToken, DateRangePickerClassToken, DialogClassToken, DividerClassToken, DrawerClassToken, EmptyClassToken, FormClassToken, GridClassToken, GuidelineClassToken, HighlightClassToken, I18nButtonClassToken, IconClassToken, ImageClassToken, InputClassToken, LoadingClassToken, MenuClassToken, NotificationClassToken, PaginationClassToken, PickerClassToken, PopconfirmClassToken, PopoverClassToken, PopperClassToken, ProgressClassToken, QuoteClassToken, RadioClassToken, RateClassToken, RichTextEditorClassToken, SelectClassToken, StepsClassToken, SwitchClassToken, TableClassToken, TabsClassToken, TagClassToken, TextareaClassToken, TimePickerClassToken, TimelineClassToken, TooltipClassToken, TransferClassToken, TreeClassToken, UploadClassToken, VisuallyHiddenClassToken, WaterfallClassToken, addPrefix, withPrefix };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musae",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "musae-ui",
5
5
  "author": "tutu@fantufantu.com",
6
6
  "license": "MIT",
@@ -53,11 +53,9 @@
53
53
  "pnpm": ">=9"
54
54
  },
55
55
  "dependencies": {
56
- "@aiszlab/fuzzy": "^1.5.2",
57
- "@aiszlab/relax": "^1.5.2",
58
- "@babel/runtime": "^7.25.9",
59
- "@dnd-kit/core": "^6.1.0",
60
- "@dnd-kit/modifiers": "^7.0.0",
56
+ "@aiszlab/fuzzy": "^1.5.3",
57
+ "@aiszlab/relax": "^1.5.3",
58
+ "@babel/runtime": "^7.26.0",
61
59
  "@emotion/is-prop-valid": "^1.3.1",
62
60
  "@floating-ui/dom": "^1.6.11",
63
61
  "@lexical/code": "^0.18.0",
@@ -70,18 +68,18 @@
70
68
  "@lexical/utils": "^0.18.0",
71
69
  "@tanstack/react-table": "^8.20.5",
72
70
  "dayjs": "^1.11.13",
73
- "framer-motion": "^11.11.9",
71
+ "framer-motion": "^11.11.10",
74
72
  "lexical": "^0.18.0",
75
73
  "react-hook-form": "^7.53.1",
76
74
  "rxjs": "^7.8.1"
77
75
  },
78
76
  "devDependencies": {
79
77
  "@aiszlab/jarvis": "^1.0.2",
80
- "@babel/core": "^7.25.9",
78
+ "@babel/core": "^7.26.0",
81
79
  "@babel/plugin-transform-runtime": "^7.25.9",
82
- "@babel/preset-env": "^7.25.9",
80
+ "@babel/preset-env": "^7.26.0",
83
81
  "@babel/preset-react": "^7.25.9",
84
- "@babel/preset-typescript": "^7.25.9",
82
+ "@babel/preset-typescript": "^7.26.0",
85
83
  "@rollup/plugin-babel": "^6.0.4",
86
84
  "@rollup/plugin-commonjs": "^28.0.1",
87
85
  "@rollup/plugin-node-resolve": "^15.3.0",
@@ -93,7 +91,7 @@
93
91
  "@testing-library/react": "^16.0.1",
94
92
  "@testing-library/user-event": "^14.5.2",
95
93
  "@types/jest": "^29.5.14",
96
- "@types/node": "^22.7.9",
94
+ "@types/node": "^22.8.1",
97
95
  "@types/react": "^18.3.12",
98
96
  "@types/react-dom": "^18.3.1",
99
97
  "babel-jest": "^29.7.0",
@@ -104,7 +102,7 @@
104
102
  "jest-environment-jsdom": "^29.7.0",
105
103
  "react": "^18.3.1",
106
104
  "react-dom": "^18.3.1",
107
- "rollup": "^4.24.0",
105
+ "rollup": "^4.24.1",
108
106
  "typescript": "^5.6.3",
109
107
  "zx": "^8.1.9"
110
108
  },
@@ -1,106 +0,0 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
-
3
- var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
4
- var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
5
- var relax = require('@aiszlab/relax');
6
- var core = require('@dnd-kit/core');
7
- var React = require('react');
8
- var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.8.0/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
9
- var portal = require('../portal/portal.cjs');
10
- var useContainer = require('../../hooks/use-container.cjs');
11
- var useClassNames = require('../../hooks/use-class-names.cjs');
12
- var className = require('../../utils/class-name.cjs');
13
- var iconButton = require('../icon-button/icon-button.cjs');
14
-
15
- var styles = {
16
- floatable: function floatable(props) {
17
- return [{
18
- position: "musaex-10l6tqk",
19
- transform: "musaex-1v0jg1i",
20
- willChange: "musaex-1so62im",
21
- right: "musaex-k6ci0l",
22
- insetInlineStart: null,
23
- insetInlineEnd: null,
24
- bottom: "musaex-jnlgov",
25
- zIndex: "musaex-n0d15w",
26
- $$css: true
27
- }, {
28
- "--transform": "translate3d(".concat(props.x, "px, ").concat(props.y, "px, 0)") != null ? "translate3d(".concat(props.x, "px, ").concat(props.y, "px, 0)") : "initial"
29
- }];
30
- },
31
- fixed: {
32
- position: "musaex-ixxii4",
33
- $$css: true
34
- }
35
- };
36
- var Floatable = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
37
- var _transform$x, _transform$y;
38
- var container = _ref2.container,
39
- children = _ref2.children,
40
- onClick = _ref2.onClick;
41
- var classNames = useClassNames.useClassNames("fab");
42
- var _useIdentity = relax.useIdentity(),
43
- _useIdentity2 = _slicedToArray(_useIdentity, 1),
44
- id = _useIdentity2[0];
45
- var _ref = React.useRef(null);
46
- var _useDraggable = core.useDraggable({
47
- id: id
48
- }),
49
- attributes = _useDraggable.attributes,
50
- listeners = _useDraggable.listeners,
51
- setNodeRef = _useDraggable.setNodeRef,
52
- transform = _useDraggable.transform;
53
- var floatableRef = relax.useComposedRef(_ref, setNodeRef);
54
- var _useContainer = useContainer.useContainer({
55
- container: container
56
- }),
57
- _container = _useContainer.container,
58
- isDocumentBody = _useContainer.isDocumentBody;
59
- var _useState = React.useState(0),
60
- _useState2 = _slicedToArray(_useState, 2),
61
- offsetX = _useState2[0],
62
- setOffsetX = _useState2[1];
63
- var _useState3 = React.useState(0),
64
- _useState4 = _slicedToArray(_useState3, 2),
65
- offsetY = _useState4[0],
66
- setOffsetY = _useState4[1];
67
- var _useState5 = React.useState(),
68
- _useState6 = _slicedToArray(_useState5, 2),
69
- clientRect = _useState6[0],
70
- setClientRect = _useState6[1];
71
- core.useDndMonitor({
72
- onDragEnd: function onDragEnd(event) {
73
- var _ref$current;
74
- setOffsetX(function (_offsetX) {
75
- return _offsetX + event.delta.x;
76
- });
77
- setOffsetY(function (_offsetY) {
78
- return _offsetY + event.delta.y;
79
- });
80
- setClientRect((_ref$current = _ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect());
81
- }
82
- });
83
- React.useImperativeHandle(ref, function () {
84
- return {
85
- getBoundingClientRect: function getBoundingClientRect() {
86
- return clientRect;
87
- }
88
- };
89
- });
90
- var styled = stylex.default.props(styles.floatable({
91
- x: offsetX + ((_transform$x = transform === null || transform === void 0 ? void 0 : transform.x) !== null && _transform$x !== void 0 ? _transform$x : 0),
92
- y: offsetY + ((_transform$y = transform === null || transform === void 0 ? void 0 : transform.y) !== null && _transform$y !== void 0 ? _transform$y : 0)
93
- }), isDocumentBody && styles.fixed);
94
- return /*#__PURE__*/React.createElement(portal.default, {
95
- container: _container
96
- }, /*#__PURE__*/React.createElement("div", _objectSpread(_objectSpread(_objectSpread({
97
- ref: floatableRef
98
- }, listeners), attributes), {}, {
99
- className: relax.clsx(classNames[className.FabClassToken.Fab], styled.className),
100
- style: styled.style
101
- }), /*#__PURE__*/React.createElement(iconButton.default, {
102
- onClick: onClick
103
- }, children)));
104
- });
105
-
106
- exports.default = Floatable;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import type { FloatableProps, FloatableRef } from "musae/types/fab";
3
- declare const Floatable: React.ForwardRefExoticComponent<FloatableProps & React.RefAttributes<FloatableRef>>;
4
- export default Floatable;
@@ -1,104 +0,0 @@
1
- import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
- import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
3
- import { useIdentity, useComposedRef, clsx } from '@aiszlab/relax';
4
- import { useDraggable, useDndMonitor } from '@dnd-kit/core';
5
- import React, { forwardRef, useRef, useState, useImperativeHandle } from 'react';
6
- import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.8.0/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
7
- import Portal from '../portal/portal.mjs';
8
- import { useContainer } from '../../hooks/use-container.mjs';
9
- import { useClassNames } from '../../hooks/use-class-names.mjs';
10
- import { FabClassToken } from '../../utils/class-name.mjs';
11
- import IconButton from '../icon-button/icon-button.mjs';
12
-
13
- var styles = {
14
- floatable: function floatable(props) {
15
- return [{
16
- position: "musaex-10l6tqk",
17
- transform: "musaex-1v0jg1i",
18
- willChange: "musaex-1so62im",
19
- right: "musaex-k6ci0l",
20
- insetInlineStart: null,
21
- insetInlineEnd: null,
22
- bottom: "musaex-jnlgov",
23
- zIndex: "musaex-n0d15w",
24
- $$css: true
25
- }, {
26
- "--transform": "translate3d(".concat(props.x, "px, ").concat(props.y, "px, 0)") != null ? "translate3d(".concat(props.x, "px, ").concat(props.y, "px, 0)") : "initial"
27
- }];
28
- },
29
- fixed: {
30
- position: "musaex-ixxii4",
31
- $$css: true
32
- }
33
- };
34
- var Floatable = /*#__PURE__*/forwardRef(function (_ref2, ref) {
35
- var _transform$x, _transform$y;
36
- var container = _ref2.container,
37
- children = _ref2.children,
38
- onClick = _ref2.onClick;
39
- var classNames = useClassNames("fab");
40
- var _useIdentity = useIdentity(),
41
- _useIdentity2 = _slicedToArray(_useIdentity, 1),
42
- id = _useIdentity2[0];
43
- var _ref = useRef(null);
44
- var _useDraggable = useDraggable({
45
- id: id
46
- }),
47
- attributes = _useDraggable.attributes,
48
- listeners = _useDraggable.listeners,
49
- setNodeRef = _useDraggable.setNodeRef,
50
- transform = _useDraggable.transform;
51
- var floatableRef = useComposedRef(_ref, setNodeRef);
52
- var _useContainer = useContainer({
53
- container: container
54
- }),
55
- _container = _useContainer.container,
56
- isDocumentBody = _useContainer.isDocumentBody;
57
- var _useState = useState(0),
58
- _useState2 = _slicedToArray(_useState, 2),
59
- offsetX = _useState2[0],
60
- setOffsetX = _useState2[1];
61
- var _useState3 = useState(0),
62
- _useState4 = _slicedToArray(_useState3, 2),
63
- offsetY = _useState4[0],
64
- setOffsetY = _useState4[1];
65
- var _useState5 = useState(),
66
- _useState6 = _slicedToArray(_useState5, 2),
67
- clientRect = _useState6[0],
68
- setClientRect = _useState6[1];
69
- useDndMonitor({
70
- onDragEnd: function onDragEnd(event) {
71
- var _ref$current;
72
- setOffsetX(function (_offsetX) {
73
- return _offsetX + event.delta.x;
74
- });
75
- setOffsetY(function (_offsetY) {
76
- return _offsetY + event.delta.y;
77
- });
78
- setClientRect((_ref$current = _ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect());
79
- }
80
- });
81
- useImperativeHandle(ref, function () {
82
- return {
83
- getBoundingClientRect: function getBoundingClientRect() {
84
- return clientRect;
85
- }
86
- };
87
- });
88
- var styled = _stylex.props(styles.floatable({
89
- x: offsetX + ((_transform$x = transform === null || transform === void 0 ? void 0 : transform.x) !== null && _transform$x !== void 0 ? _transform$x : 0),
90
- y: offsetY + ((_transform$y = transform === null || transform === void 0 ? void 0 : transform.y) !== null && _transform$y !== void 0 ? _transform$y : 0)
91
- }), isDocumentBody && styles.fixed);
92
- return /*#__PURE__*/React.createElement(Portal, {
93
- container: _container
94
- }, /*#__PURE__*/React.createElement("div", _objectSpread(_objectSpread(_objectSpread({
95
- ref: floatableRef
96
- }, listeners), attributes), {}, {
97
- className: clsx(classNames[FabClassToken.Fab], styled.className),
98
- style: styled.style
99
- }), /*#__PURE__*/React.createElement(IconButton, {
100
- onClick: onClick
101
- }, children)));
102
- });
103
-
104
- export { Floatable as default };