musae 0.2.6 → 0.2.7

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 (127) hide show
  1. package/dist/components/avatar/avatar.js +1 -1
  2. package/dist/components/breadcrumb/breadcrumb.js +1 -1
  3. package/dist/components/breadcrumb/item.js +1 -1
  4. package/dist/components/button/button.js +13 -16
  5. package/dist/components/calendar/calendar.js +1 -1
  6. package/dist/components/calendar/hooks.js +1 -1
  7. package/dist/components/checkbox/checkbox.d.ts +1 -1
  8. package/dist/components/checkbox/checkbox.js +203 -143
  9. package/dist/components/checkbox/group.d.ts +1 -1
  10. package/dist/components/checkbox/group.js +20 -19
  11. package/dist/components/checkbox/index.d.ts +2 -2
  12. package/dist/components/checkbox/types.d.ts +22 -1
  13. package/dist/components/clock/column.js +1 -1
  14. package/dist/components/collapse/collapse.js +1 -1
  15. package/dist/components/collapse/item.js +14 -8
  16. package/dist/components/date-picker/date-picker.js +1 -1
  17. package/dist/components/dialog/dialog.js +1 -1
  18. package/dist/components/dialog/popup.js +2 -2
  19. package/dist/components/divider/divider.js +1 -1
  20. package/dist/components/drawer/drawer.js +1 -1
  21. package/dist/components/drawer/popup.js +2 -2
  22. package/dist/components/empty/empty.js +1 -1
  23. package/dist/components/floating-action-button/floatable.d.ts +4 -0
  24. package/dist/components/floating-action-button/floatable.js +83 -0
  25. package/dist/components/floating-action-button/floating-action-button.d.ts +4 -0
  26. package/dist/components/floating-action-button/floating-action-button.js +26 -0
  27. package/dist/components/floating-action-button/index.d.ts +2 -0
  28. package/dist/components/floating-action-button/types.d.ts +44 -0
  29. package/dist/components/form/field/error.d.ts +2 -2
  30. package/dist/components/form/field/error.js +36 -22
  31. package/dist/components/form/field/field.js +6 -21
  32. package/dist/components/form/field/layout.js +1 -1
  33. package/dist/components/grid/col.js +1 -1
  34. package/dist/components/grid/row.js +1 -1
  35. package/dist/components/icon/icon.d.ts +1 -1
  36. package/dist/components/icon/icon.js +5 -3
  37. package/dist/components/icon/types.d.ts +6 -1
  38. package/dist/components/image/preview/operations.js +2 -2
  39. package/dist/components/image/preview/preview.js +1 -1
  40. package/dist/components/input/input.d.ts +6 -6
  41. package/dist/components/input/input.js +9 -15
  42. package/dist/components/layout/header.js +1 -1
  43. package/dist/components/layout/layout.js +1 -1
  44. package/dist/components/loading/loading.js +1 -1
  45. package/dist/components/menu/group.js +14 -8
  46. package/dist/components/menu/hooks.js +1 -1
  47. package/dist/components/menu/item.js +1 -1
  48. package/dist/components/notification/holder.js +2 -3
  49. package/dist/components/notification/notification.js +1 -1
  50. package/dist/components/otp-input/otp-input.js +1 -1
  51. package/dist/components/pagination/hooks.d.ts +4 -2
  52. package/dist/components/pagination/hooks.js +9 -4
  53. package/dist/components/pagination/item.js +6 -8
  54. package/dist/components/pagination/pagination.d.ts +1 -1
  55. package/dist/components/pagination/pagination.js +37 -9
  56. package/dist/components/pagination/types.d.ts +6 -0
  57. package/dist/components/picker/picker.js +2 -2
  58. package/dist/components/popover/popover.js +1 -1
  59. package/dist/components/popper/dropdown.js +1 -1
  60. package/dist/components/popper/popper.js +1 -1
  61. package/dist/components/portal/portal.js +6 -2
  62. package/dist/components/portal/types.d.ts +6 -0
  63. package/dist/components/progress/circular.js +1 -1
  64. package/dist/components/progress/linear.js +1 -1
  65. package/dist/components/radio/radio.js +1 -1
  66. package/dist/components/rate/rate.js +1 -1
  67. package/dist/components/rate/star.js +1 -1
  68. package/dist/components/ripple/ripple.js +1 -1
  69. package/dist/components/select/hooks.d.ts +1 -1
  70. package/dist/components/select/select.d.ts +1 -1
  71. package/dist/components/select/select.js +5 -5
  72. package/dist/components/select/selector.d.ts +3 -6
  73. package/dist/components/select/selector.js +16 -10
  74. package/dist/components/select/types.d.ts +3 -1
  75. package/dist/components/space/space.js +1 -1
  76. package/dist/components/steps/item.d.ts +1 -1
  77. package/dist/components/steps/item.js +46 -31
  78. package/dist/components/steps/steps.d.ts +1 -1
  79. package/dist/components/steps/steps.js +6 -4
  80. package/dist/components/steps/types.d.ts +15 -0
  81. package/dist/components/switch/switch.js +1 -1
  82. package/dist/components/table/body.js +1 -1
  83. package/dist/components/table/header/cell.js +1 -1
  84. package/dist/components/table/header/header.js +1 -1
  85. package/dist/components/tabs/hooks.js +5 -5
  86. package/dist/components/tabs/navigation.js +1 -1
  87. package/dist/components/tabs/panels.js +1 -1
  88. package/dist/components/tag/tag.js +1 -1
  89. package/dist/components/theme/tokens.stylex.d.ts +1 -0
  90. package/dist/components/time-picker/panel.js +1 -1
  91. package/dist/components/time-picker/time-picker.js +1 -1
  92. package/dist/components/timeline/item.js +30 -14
  93. package/dist/components/timeline/timeline.d.ts +1 -1
  94. package/dist/components/timeline/timeline.js +5 -3
  95. package/dist/components/timeline/types.d.ts +10 -0
  96. package/dist/components/tour/tour.js +3 -2
  97. package/dist/components/transfer/context.d.ts +6 -0
  98. package/dist/components/transfer/context.js +11 -0
  99. package/dist/components/transfer/hooks.d.ts +19 -0
  100. package/dist/components/transfer/hooks.js +49 -0
  101. package/dist/components/transfer/index.d.ts +2 -0
  102. package/dist/components/transfer/item.d.ts +4 -0
  103. package/dist/components/transfer/item.js +25 -0
  104. package/dist/components/transfer/list.d.ts +4 -0
  105. package/dist/components/transfer/list.js +122 -0
  106. package/dist/components/transfer/transfer.d.ts +4 -0
  107. package/dist/components/transfer/transfer.js +82 -0
  108. package/dist/components/transfer/types.d.ts +83 -0
  109. package/dist/components/tree/list.js +14 -7
  110. package/dist/components/tree/node.js +1 -1
  111. package/dist/components/waterfall/sequential.js +1 -1
  112. package/dist/components/waterfall/waterfall.js +1 -1
  113. package/dist/hooks/use-class-names.d.ts +17 -1
  114. package/dist/hooks/use-container.d.ts +11 -0
  115. package/dist/hooks/use-container.js +23 -0
  116. package/dist/hooks/use-expandable.d.ts +11 -0
  117. package/dist/hooks/use-expandable.js +37 -0
  118. package/dist/index.d.ts +2 -0
  119. package/dist/index.js +2 -0
  120. package/dist/stylex.css +20 -15
  121. package/dist/utils/class-name.d.ts +59 -10
  122. package/dist/utils/class-name.js +40 -6
  123. package/package.json +13 -5
  124. package/dist/hooks/use-expand-effect.d.ts +0 -12
  125. package/dist/hooks/use-expand-effect.js +0 -34
  126. /package/dist/node_modules/.pnpm/{@aiszlab_relax@1.2.56_react-dom@18.3.1_react@18.3.1 → @aiszlab_relax@1.2.59_react-dom@18.3.1_react@18.3.1__react@18.3.1}/node_modules/@aiszlab/relax/dist/dom/contains.js +0 -0
  127. /package/dist/node_modules/.pnpm/{@stylexjs_stylex@0.7.4 → @stylexjs_stylex@0.7.5}/node_modules/@stylexjs/stylex/lib/es/stylex.js +0 -0
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { useClassNames } from '../../hooks/use-class-names.js';
3
3
  import { ComponentToken, CollapseClassToken } from '../../utils/class-name.js';
4
4
  import CollapseItem from './item.js';
5
- import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
+ import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
6
6
  import clsx from 'clsx';
7
7
  import { useActiveKeys } from './hooks.js';
8
8
  import { Context } from './context.js';
@@ -1,12 +1,12 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { useClassNames } from '../../hooks/use-class-names.js';
3
3
  import { ComponentToken, CollapseClassToken } from '../../utils/class-name.js';
4
- import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
- import { useEvent } from '@aiszlab/relax';
4
+ import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
+ import { useUpdateEffect, useEvent } from '@aiszlab/relax';
6
6
  import { useAnimate } from 'framer-motion';
7
7
  import clsx from 'clsx';
8
8
  import { Context } from './context.js';
9
- import { useExpandEffect } from '../../hooks/use-expand-effect.js';
9
+ import { useExpandable } from '../../hooks/use-expandable.js';
10
10
  import { useTheme } from '../theme/hooks.js';
11
11
  import { ColorToken } from '../../utils/colors.js';
12
12
  import KeyboardArrowRight from '../icon/icons/hardware/keyboard-arrow-right.js';
@@ -98,11 +98,17 @@ const CollapseItem = ({
98
98
  const isExpanded = activeKeys.has(value);
99
99
  const [collapser, animate] = useAnimate();
100
100
  const theme = useTheme();
101
- useExpandEffect({
102
- animate,
103
- expanded: isExpanded,
104
- target: collapser
105
- });
101
+ const {
102
+ expand,
103
+ collapse
104
+ } = useExpandable();
105
+ useUpdateEffect(async () => {
106
+ if (isExpanded) {
107
+ await expand([collapser, animate]);
108
+ return;
109
+ }
110
+ await collapse([collapser, animate]);
111
+ }, [isExpanded]);
106
112
  const styled = {
107
113
  item: _stylex.props(styles.item.default({
108
114
  outlineColor: theme.colors[ColorToken.OutlineVariant]
@@ -4,7 +4,7 @@ import Calendar from '../calendar/calendar.js';
4
4
  import { useValue } from './hooks.js';
5
5
  import { useClassNames } from '../../hooks/use-class-names.js';
6
6
  import { ComponentToken, DatePickerClassToken } from '../../utils/class-name.js';
7
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
7
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
8
8
  import clsx from 'clsx';
9
9
  import { styles } from '../input/input.js';
10
10
 
@@ -12,7 +12,7 @@ const Dialog = ({ open, dismissable = true, ...props }) => {
12
12
  }
13
13
  // eslint-disable-next-line react-hooks/exhaustive-deps
14
14
  }, [open]);
15
- return (React.createElement(Portal, { open: open || _isVisible },
15
+ return (React.createElement(Portal, { open: open || _isVisible, lockable: true },
16
16
  React.createElement(Popup, { ...props, dismissable: true, open: open, onClosed: turnOff })));
17
17
  };
18
18
  var Dialog$1 = Dialog;
@@ -3,13 +3,13 @@ import { useFooter } from './hooks.js';
3
3
  import { useAnimate } from 'framer-motion';
4
4
  import { ComponentToken, DialogClassToken } from '../../utils/class-name.js';
5
5
  import { useClassNames } from '../../hooks/use-class-names.js';
6
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
6
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
7
7
  import { useTheme } from '../theme/hooks.js';
8
8
  import { ColorToken } from '../../utils/colors.js';
9
9
  import { typography } from '../theme/theme.js';
10
10
  import clsx from 'clsx';
11
11
  import { useDismissable } from '../../hooks/use-dismissable.js';
12
- import { contains } from '../../node_modules/.pnpm/@aiszlab_relax@1.2.56_react-dom@18.3.1_react@18.3.1/node_modules/@aiszlab/relax/dist/dom/contains.js';
12
+ import { contains } from '../../node_modules/.pnpm/@aiszlab_relax@1.2.59_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@aiszlab/relax/dist/dom/contains.js';
13
13
 
14
14
  const styles = {
15
15
  header: {
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { useOffset } from './hooks.js';
3
3
  import { useClassNames } from '../../hooks/use-class-names.js';
4
4
  import { ComponentToken, DividerClassToken } from '../../utils/class-name.js';
5
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
6
6
  import { useTheme } from '../theme/hooks.js';
7
7
  import { ColorToken } from '../../utils/colors.js';
8
8
  import { typography } from '../theme/theme.js';
@@ -12,7 +12,7 @@ const Drawer = ({ open, size = 400, dismissable = true, placement = "right", ...
12
12
  }
13
13
  // eslint-disable-next-line react-hooks/exhaustive-deps
14
14
  }, [open]);
15
- return (React.createElement(Portal, { open: open || _isVisible },
15
+ return (React.createElement(Portal, { open: open || _isVisible, lockable: true },
16
16
  React.createElement(Popup, { ...props, onClosed: turnOff, size: size, open: open, dismissable: dismissable, placement: placement })));
17
17
  };
18
18
  var Drawer$1 = Drawer;
@@ -3,13 +3,13 @@ import { useAnimate } from 'framer-motion';
3
3
  import { PLACEMENTS } from './hooks.js';
4
4
  import { ComponentToken, DrawerClassToken } from '../../utils/class-name.js';
5
5
  import { useClassNames } from '../../hooks/use-class-names.js';
6
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
6
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
7
7
  import { useTheme } from '../theme/hooks.js';
8
8
  import { ColorToken } from '../../utils/colors.js';
9
9
  import clsx from 'clsx';
10
10
  import { typography } from '../theme/theme.js';
11
11
  import { useDismissable } from '../../hooks/use-dismissable.js';
12
- import { contains } from '../../node_modules/.pnpm/@aiszlab_relax@1.2.56_react-dom@18.3.1_react@18.3.1/node_modules/@aiszlab/relax/dist/dom/contains.js';
12
+ import { contains } from '../../node_modules/.pnpm/@aiszlab_relax@1.2.59_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@aiszlab/relax/dist/dom/contains.js';
13
13
 
14
14
  const styles = {
15
15
  popup: {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { useClassNames } from '../../hooks/use-class-names.js';
3
3
  import { ComponentToken, EmptyClassToken } from '../../utils/class-name.js';
4
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
4
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
5
  import clsx from 'clsx';
6
6
  import { typography } from '../theme/theme.js';
7
7
 
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { FloatableProps, FloatableRef } from "./types";
3
+ declare const Floatable: React.ForwardRefExoticComponent<FloatableProps & React.RefAttributes<FloatableRef>>;
4
+ export default Floatable;
@@ -0,0 +1,83 @@
1
+ import { useIdentity, useRefs } from '@aiszlab/relax';
2
+ import { useDraggable, useDndMonitor } from '@dnd-kit/core';
3
+ import React, { forwardRef, useRef, useState, useImperativeHandle } from 'react';
4
+ import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
+ import Button from '../button/button.js';
6
+ import Portal from '../portal/portal.js';
7
+ import { useContainer } from '../../hooks/use-container.js';
8
+
9
+ const styles = {
10
+ floatable: props => [{
11
+ position: "musae-10l6tqk",
12
+ transform: "musae-1v0jg1i",
13
+ willChange: "musae-1so62im",
14
+ right: "musae-k6ci0l",
15
+ insetInlineStart: null,
16
+ insetInlineEnd: null,
17
+ bottom: "musae-jnlgov",
18
+ zIndex: "musae-aefx0h",
19
+ $$css: true
20
+ }, {
21
+ "--transform": `translate3d(${props.x}px, ${props.y}px, 0)` != null ? `translate3d(${props.x}px, ${props.y}px, 0)` : "initial"
22
+ }],
23
+ fixed: {
24
+ position: "musae-ixxii4",
25
+ $$css: true
26
+ }
27
+ };
28
+ const Floatable = forwardRef(({
29
+ container,
30
+ children
31
+ }, ref) => {
32
+ const [id] = useIdentity();
33
+ const _ref = useRef(null);
34
+ const {
35
+ attributes,
36
+ listeners,
37
+ setNodeRef,
38
+ transform
39
+ } = useDraggable({
40
+ id
41
+ });
42
+ const floatableRef = useRefs(_ref, setNodeRef);
43
+ const {
44
+ container: _container,
45
+ isDocumentBody
46
+ } = useContainer({
47
+ container
48
+ });
49
+ const [offsetX, setOffsetX] = useState(0);
50
+ const [offsetY, setOffsetY] = useState(0);
51
+ const [clientRect, setClientRect] = useState();
52
+ useDndMonitor({
53
+ onDragEnd: event => {
54
+ setOffsetX(_offsetX => _offsetX + event.delta.x);
55
+ setOffsetY(_offsetY => _offsetY + event.delta.y);
56
+ setClientRect(_ref.current?.getBoundingClientRect());
57
+ }
58
+ });
59
+ useImperativeHandle(ref, () => {
60
+ return {
61
+ getBoundingClientRect: () => {
62
+ return clientRect;
63
+ }
64
+ };
65
+ });
66
+ const styled = _stylex.props(styles.floatable({
67
+ x: offsetX + (transform?.x ?? 0),
68
+ y: offsetY + (transform?.y ?? 0)
69
+ }), isDocumentBody && styles.fixed);
70
+ return React.createElement(Portal, {
71
+ container: _container
72
+ }, React.createElement("div", {
73
+ ref: floatableRef,
74
+ ...listeners,
75
+ ...attributes,
76
+ className: styled.className,
77
+ style: styled.style
78
+ }, React.createElement(Button, {
79
+ shape: "circular"
80
+ }, children)));
81
+ });
82
+
83
+ export { Floatable as default };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { FloatingActionButtonProps } from "./types";
3
+ declare const FloatingActionButton: ({ container, children }: FloatingActionButtonProps) => React.JSX.Element;
4
+ export default FloatingActionButton;
@@ -0,0 +1,26 @@
1
+ import React, { useRef } from 'react';
2
+ import { DndContext } from '@dnd-kit/core';
3
+ import Floatable from './floatable.js';
4
+ import { restrictToParentElement } from '@dnd-kit/modifiers';
5
+ import { useIdentity, useEvent } from '@aiszlab/relax';
6
+ import { useContainer } from '../../hooks/use-container.js';
7
+
8
+ const FloatingActionButton = ({ container, children }) => {
9
+ const [id] = useIdentity();
10
+ const floatableRef = useRef(null);
11
+ const { container: _container } = useContainer({ container });
12
+ const modifier = useEvent((args) => {
13
+ const clientRect = floatableRef.current?.getBoundingClientRect();
14
+ return restrictToParentElement({
15
+ ...args,
16
+ ...(!!clientRect && {
17
+ draggingNodeRect: clientRect,
18
+ }),
19
+ });
20
+ });
21
+ return (React.createElement(DndContext, { id: id, modifiers: [modifier] },
22
+ React.createElement(Floatable, { ref: floatableRef, container: _container }, children)));
23
+ };
24
+ var FloatingActionButton$1 = FloatingActionButton;
25
+
26
+ export { FloatingActionButton$1 as default };
@@ -0,0 +1,2 @@
1
+ import FloatingActionButton from "./floating-action-button";
2
+ export { FloatingActionButton };
@@ -0,0 +1,44 @@
1
+ import type { ReactNode } from "react";
2
+ import type { PortalProps } from "../portal/types";
3
+ /**
4
+ * @description
5
+ * floatable ref
6
+ */
7
+ export type FloatableRef = {
8
+ /**
9
+ * @description
10
+ * get rect
11
+ */
12
+ getBoundingClientRect: () => DOMRect | undefined;
13
+ };
14
+ /**
15
+ * @description
16
+ * props
17
+ */
18
+ export type FloatingActionButtonProps = {
19
+ /**
20
+ * @description
21
+ * container
22
+ */
23
+ container?: PortalProps["container"];
24
+ /**
25
+ * @description
26
+ * children
27
+ */
28
+ children?: ReactNode;
29
+ };
30
+ /**
31
+ * @description
32
+ * floatable props
33
+ */
34
+ export type FloatableProps = {
35
+ /**
36
+ * @link {FloatingActionButtonProps.container}
37
+ */
38
+ container?: FloatingActionButtonProps["container"];
39
+ /**
40
+ * @description
41
+ * children
42
+ */
43
+ children?: ReactNode;
44
+ };
@@ -1,5 +1,5 @@
1
- import { FieldError } from "react-hook-form";
2
- import { ComponentProps } from "../../../types/element";
1
+ import { type FieldError } from "react-hook-form";
2
+ import type { ComponentProps } from "../../../types/element";
3
3
  import React from "react";
4
4
  type Props = ComponentProps & {
5
5
  /**
@@ -2,50 +2,64 @@ import React, { useEffect } from 'react';
2
2
  import { ComponentToken, FormClassToken } from '../../../utils/class-name.js';
3
3
  import clsx from 'clsx';
4
4
  import { useAnimate, usePresence } from 'framer-motion';
5
+ import _stylex from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
6
  import { useClassNames } from '../../../hooks/use-class-names.js';
7
+ import { useTheme } from '../../theme/hooks.js';
8
+ import { ColorToken } from '../../../utils/colors.js';
6
9
 
10
+ const styles = {
11
+ error: props => [{
12
+ paddingInline: "musae-1xkwav8",
13
+ paddingStart: null,
14
+ paddingLeft: null,
15
+ paddingEnd: null,
16
+ paddingRight: null,
17
+ color: "musae-19dipnz",
18
+ height: "musae-qtp20y",
19
+ overflow: "musae-b3r6kr",
20
+ overflowX: null,
21
+ overflowY: null,
22
+ $$css: true
23
+ }, {
24
+ "--color": props.color != null ? props.color : "initial"
25
+ }]
26
+ };
7
27
  const Error = ({
8
28
  error,
9
29
  className,
10
30
  style
11
31
  }) => {
12
32
  const classNames = useClassNames(ComponentToken.Form);
13
- const styled = {
14
- className: "musae-1xkwav8 musae-1p848mt musae-ri8twg"
15
- };
16
33
  const [scope, animate] = useAnimate();
17
34
  const [isPresent, safeToRemove] = usePresence();
35
+ const theme = useTheme();
18
36
  useEffect(() => {
19
37
  if (isPresent) {
20
- const enter = async () => {
21
- await animate(scope.current, {
22
- height: "auto"
23
- }, {
24
- duration: 0.1
25
- });
26
- };
27
- enter();
28
- return;
29
- }
30
- const exit = async () => {
31
- await animate(scope.current, {
32
- height: 0
38
+ animate(scope.current, {
39
+ height: "auto"
33
40
  }, {
34
- duration: 0.1
41
+ duration: 0.2
35
42
  });
43
+ return;
44
+ }
45
+ animate(scope.current, {
46
+ height: 0
47
+ }).then(() => {
36
48
  safeToRemove();
37
- };
38
- exit();
49
+ });
39
50
  // eslint-disable-next-line react-hooks/exhaustive-deps
40
51
  }, [isPresent]);
52
+ const styled = _stylex.props(styles.error({
53
+ color: theme.colors[ColorToken.Error]
54
+ }));
41
55
  return React.createElement("div", {
42
56
  className: clsx(classNames[FormClassToken.FieldError], className, styled.className),
43
57
  style: {
44
- ...style,
45
- ...styled.style
58
+ ...styled.style,
59
+ ...style
46
60
  },
47
61
  ref: scope
48
- }, error?.message);
62
+ }, React.createElement("p", null, error?.message));
49
63
  };
50
64
 
51
65
  export { Error as default };
@@ -2,10 +2,8 @@ import React, { useMemo, isValidElement, cloneElement } from 'react';
2
2
  import { useController } from 'react-hook-form';
3
3
  import { chain, isRefable } from '@aiszlab/relax';
4
4
  import { ComponentToken, FormClassToken } from '../../../utils/class-name.js';
5
- import { props } from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
+ import { props } from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
6
6
  import clsx from 'clsx';
7
- import { useTheme } from '../../theme/hooks.js';
8
- import { ColorToken } from '../../../utils/colors.js';
9
7
  import Layout from './layout.js';
10
8
  import Error from './error.js';
11
9
  import { AnimatePresence } from 'framer-motion';
@@ -13,18 +11,9 @@ import { typography } from '../../theme/theme.js';
13
11
  import { useClassNames } from '../../../hooks/use-class-names.js';
14
12
 
15
13
  const styles = {
16
- error: props => [{
17
- color: "musae-19dipnz",
18
- overflow: "musae-b3r6kr",
19
- overflowX: null,
20
- overflowY: null,
21
- $$css: true
22
- }, {
23
- "--color": props.color != null ? props.color : "initial"
24
- }],
25
14
  supporting: {
26
15
  minHeight: "musae-1sal0kv",
27
- paddingBottom: "musae-78w2x6",
16
+ paddingBlock: "musae-ovjknk",
28
17
  $$css: true
29
18
  }
30
19
  };
@@ -39,7 +28,6 @@ const Field = ({
39
28
  ...props$1
40
29
  }) => {
41
30
  const classNames = useClassNames(ComponentToken.Form);
42
- const theme = useTheme();
43
31
  const {
44
32
  field: {
45
33
  onBlur,
@@ -82,9 +70,6 @@ const Field = ({
82
70
  });
83
71
  }, [_children, name, value, invalid, ref, onChange, onBlur]);
84
72
  const styled = {
85
- error: props(styles.error({
86
- color: theme.colors[ColorToken.Error]
87
- })),
88
73
  supporting: props(styles.supporting, typography.body.small)
89
74
  };
90
75
  return React.createElement("div", {
@@ -95,10 +80,10 @@ const Field = ({
95
80
  }, React.createElement("div", null, children), React.createElement("div", {
96
81
  className: clsx(classNames[FormClassToken.FieldSupporting], styled.supporting.className),
97
82
  style: styled.supporting.style
98
- }, React.createElement(AnimatePresence, null, invalid && React.createElement(Error, {
99
- error: error,
100
- className: styled.error.className,
101
- style: styled.error.style
83
+ }, React.createElement(AnimatePresence, {
84
+ mode: "wait"
85
+ }, invalid && React.createElement(Error, {
86
+ error: error
102
87
  })))));
103
88
  };
104
89
 
@@ -1,7 +1,7 @@
1
1
  import React, { useContext } from 'react';
2
2
  import Context from '../context.js';
3
3
  import { Grid } from '../../grid/index.js';
4
- import { props } from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
4
+ import { props } from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
5
  import { typography } from '../../theme/theme.js';
6
6
  import { useTheme } from '../../theme/hooks.js';
7
7
  import { ColorToken } from '../../../utils/colors.js';
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { useClassNames } from '../../hooks/use-class-names.js';
3
3
  import { ComponentToken, GridClassToken } from '../../utils/class-name.js';
4
4
  import clsx from 'clsx';
5
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
6
6
 
7
7
  const styles = {
8
8
  col: props => [{
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { useClassNames } from '../../hooks/use-class-names.js';
3
3
  import { ComponentToken, GridClassToken } from '../../utils/class-name.js';
4
4
  import clsx from 'clsx';
5
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
6
6
  import { useGutters } from '../../hooks/use-gutters.js';
7
7
 
8
8
  const styles = {
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import type { IconProps } from "./types";
3
- declare const Icon: ({ as, color, size, onClick, style, className }: IconProps) => React.JSX.Element;
3
+ declare const Icon: ({ as, color, size, onClick, style, className, ...props }: IconProps) => React.JSX.Element;
4
4
  export default Icon;
@@ -2,7 +2,7 @@ import React, { useMemo, createElement } from 'react';
2
2
  import { isFunction } from '@aiszlab/relax';
3
3
  import { ComponentToken, IconClassToken } from '../../utils/class-name.js';
4
4
  import clsx from 'clsx';
5
- import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
+ import { props } from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
6
6
  import { useClassNames } from '../../hooks/use-class-names.js';
7
7
 
8
8
  const styles = {
@@ -26,7 +26,8 @@ const Icon = ({
26
26
  size,
27
27
  onClick,
28
28
  style,
29
- className
29
+ className,
30
+ ...props$1
30
31
  }) => {
31
32
  const classNames = useClassNames(ComponentToken.Icon);
32
33
  const asProps = useMemo(() => {
@@ -49,7 +50,8 @@ const Icon = ({
49
50
  ...styled.style,
50
51
  ...style
51
52
  },
52
- onClick: onClick
53
+ onClick: onClick,
54
+ ...props$1
53
55
  }, children);
54
56
  };
55
57
  var Icon$1 = Icon;
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, FC, MouseEventHandler, ReactNode, ReactPortal } from "react";
1
+ import type { CSSProperties, FC, HTMLAttributes, MouseEventHandler, ReactNode, ReactPortal } from "react";
2
2
  import { ComponentProps } from "../../types/element";
3
3
  export type AsProps = Required<Pick<IconProps, "size">>;
4
4
  type Size = "small" | "medium" | "large";
@@ -27,5 +27,10 @@ export interface IconProps extends ComponentProps {
27
27
  * click handler
28
28
  */
29
29
  onClick?: MouseEventHandler<HTMLSpanElement>;
30
+ /**
31
+ * @description
32
+ * role
33
+ */
34
+ role?: HTMLAttributes<HTMLSpanElement>["role"];
30
35
  }
31
36
  export {};
@@ -1,5 +1,5 @@
1
1
  import React, { useContext } from 'react';
2
- import _stylex from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
2
+ import _stylex from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
3
3
  import Portal from '../../portal/portal.js';
4
4
  import { useTheme } from '../../theme/hooks.js';
5
5
  import { ColorToken } from '../../../utils/colors.js';
@@ -98,7 +98,7 @@ const Operations = ({
98
98
  } = useContext(PreviewGroupContext) ?? {};
99
99
  const isMultiple = total > 1;
100
100
  return React.createElement(Portal, {
101
- open: true
101
+ lockable: true
102
102
  }, React.createElement("div", {
103
103
  className: styled.operations.className,
104
104
  style: styled.operations.style
@@ -1,7 +1,7 @@
1
1
  import React, { forwardRef, useState, useImperativeHandle } from 'react';
2
2
  import Dialog from '../../dialog/dialog.js';
3
3
  import Operations from './operations.js';
4
- import _stylex from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.4/node_modules/@stylexjs/stylex/lib/es/stylex.js';
4
+ import _stylex from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.js';
5
5
 
6
6
  const styles = {
7
7
  image: props => [{
@@ -4,22 +4,22 @@ export declare const styles: Readonly<{
4
4
  readonly wrapper: (props: {
5
5
  outlineColor: CSSProperties["borderColor"];
6
6
  }) => Readonly<[import("@stylexjs/stylex/lib/StyleXTypes").MapNamespace<{
7
- display: "flex";
7
+ display: "inline-flex";
8
8
  alignItems: "center";
9
9
  cursor: "text";
10
+ borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
11
+ verticalAlign: string;
10
12
  minHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
11
13
  minWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
12
- borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
14
+ maxWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
13
15
  boxShadow: string;
14
16
  margin: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
15
17
  paddingBlock: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
16
18
  paddingInline: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
17
- transition: string;
19
+ transitionProperty: string;
20
+ transitionDuration: string;
18
21
  willChange: string;
19
22
  }>, import("@stylexjs/stylex/lib/StyleXTypes").InlineStyles]>;
20
- readonly flexible: Readonly<{
21
- readonly minWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"minWidth", null>;
22
- }>;
23
23
  readonly focused: (props: {
24
24
  outlineColor: CSSProperties["borderColor"];
25
25
  }) => Readonly<[import("@stylexjs/stylex/lib/StyleXTypes").MapNamespace<{