@ringcentral/spring-ui 1.11.2 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion.js +90 -34
- package/AccordionHeader.js +72 -20
- package/Alert.js +120 -28
- package/Animation.js +2 -45
- package/Announcement.js +46 -35
- package/Autocomplete.js +1011 -580
- package/Avatar.js +134 -73
- package/AvatarGroup.js +50 -7
- package/Backdrop.js +45 -7
- package/Badge.js +77 -15
- package/Block.js +34 -12
- package/BlockHeader.js +55 -11
- package/BottomNavigation.js +181 -65
- package/BottomNavigationItem.js +93 -30
- package/Button.js +160 -24
- package/CallButton.js +53 -31
- package/Checkbox.js +88 -26
- package/Chip.js +126 -26
- package/CircularProgressIndicator.js +80 -8
- package/ClickAwayListener.js +4 -1
- package/ComponentsProps.js +1 -0
- package/DatePicker.js +611 -190
- package/DateUtilsContext.js +43 -25
- package/Dialer.js +576 -250
- package/Dialog.js +100 -45
- package/Divider.js +43 -7
- package/DragHandle.js +32 -6
- package/Drawer.js +117 -19
- package/Dropdown.js +154 -74
- package/EmptyState.js +63 -11
- package/FabButton.js +51 -17
- package/FocusTrap.js +109 -12
- package/FormField.js +106 -8
- package/FormLabel.js +81 -7
- package/Icon.js +1 -8
- package/IconButton.js +142 -26
- package/IconButtonGroup.js +35 -12
- package/InlineEditable.js +98 -44
- package/LinearProgressIndicator.js +73 -24
- package/Link.js +40 -11
- package/List.js +54 -9
- package/ListItem.js +152 -23
- package/ListItemText.js +44 -16
- package/ListNavigation.js +272 -20
- package/Menu.js +139 -23
- package/MenuActions.js +37 -12
- package/MenuDivider.js +34 -8
- package/MenuFooter.js +36 -12
- package/MenuHeader.js +54 -15
- package/MenuItem.js +402 -33
- package/MenuItemText.js +51 -8
- package/MenuList.js +87 -34
- package/Modal.js +345 -16
- package/NestedMenuContext.js +183 -11
- package/Option.js +32 -34
- package/Overlap.js +54 -7
- package/PageHeader.js +62 -24
- package/PickerTextField.js +156 -33
- package/Popover.js +262 -21
- package/Popper.js +130 -77
- package/PopperPaper.js +54 -8
- package/Portal.js +6 -1
- package/Radio.js +65 -21
- package/RadioGroup.js +56 -17
- package/Rating.js +223 -87
- package/Select.js +387 -41
- package/SingleFilter.js +148 -77
- package/Skeleton.js +68 -17
- package/Slider.js +168 -69
- package/Snackbar.js +122 -59
- package/SortableList.js +32 -12
- package/SortableListDndContext.js +69 -22
- package/SortableListItem.js +92 -47
- package/SortableVirtualizedList.js +52 -28
- package/SplitButton.js +124 -86
- package/Squircle.js +4 -7
- package/StatusIndicator.js +51 -9
- package/Step.js +63 -38
- package/StepButton.js +51 -23
- package/StepConnector.js +48 -8
- package/StepContent.js +68 -25
- package/StepIcon.js +90 -9
- package/StepLabel.js +90 -14
- package/Stepper.js +65 -23
- package/SubMenu.js +203 -99
- package/SwipeableDrawer.js +439 -194
- package/Switch.js +70 -23
- package/Tab.js +120 -57
- package/TabContext.js +59 -15
- package/TabPanel.js +40 -13
- package/Table.js +60 -17
- package/TableBody.js +42 -12
- package/TableCell.js +84 -50
- package/TableContainer.js +32 -10
- package/TableFooter.js +38 -10
- package/TableHead.js +49 -15
- package/TablePagination.js +153 -77
- package/TableRow.js +60 -21
- package/Tabs.js +593 -268
- package/Tag.js +51 -16
- package/Text.js +68 -37
- package/TextField.js +209 -29
- package/Textarea.js +51 -40
- package/TimePicker.js +490 -230
- package/Tooltip.js +48 -23
- package/Tray.js +237 -13
- package/TrayMenu.js +62 -41
- package/VirtualizedList.js +208 -109
- package/VirtualizedMenu.js +359 -29
- package/VisuallyHidden.js +29 -6
- package/chunks/1250.js +98 -0
- package/chunks/1294.js +126 -0
- package/chunks/2956.js +18 -0
- package/chunks/4476.js +460 -0
- package/chunks/4491.js +10 -0
- package/chunks/4535.js +364 -0
- package/chunks/5047.js +3 -0
- package/chunks/6335.js +24 -0
- package/chunks/7279.js +10 -0
- package/chunks/8011.js +8 -0
- package/chunks/8307.js +56 -0
- package/chunks/8467.js +8 -0
- package/chunks/8809.js +8 -0
- package/chunks/{RadioGroup.context.js → 9551.js} +12 -6
- package/chunks/987.js +8 -0
- package/index.css +2624 -2416
- package/index.js +245 -193
- package/internal/utils/index.d.ts +1 -0
- package/internal/utils/setRef.d.ts +2 -0
- package/package.json +8 -8
- package/src/Alert/Alert.type.d.ts +2 -1
- package/src/Animation/components/Fade/Fade.d.ts +4 -2
- package/src/Animation/components/Grow/Grow.d.ts +4 -2
- package/src/Animation/components/ShowHideEye/ShowHideEye.d.ts +1 -1
- package/src/Animation/components/SlideIn/SlideIn.d.ts +4 -2
- package/src/Animation/components/SlideIn/getSlideIn.d.ts +1 -1
- package/src/Animation/hooks/useMotionSafeTransition/useMotionSafeTransition.d.ts +2 -0
- package/src/Autocomplete/SuggestionList/SuggestionList.d.ts +1 -1
- package/src/Autocomplete/useAutocomplete.d.ts +18 -18
- package/src/Autocomplete/useAutocompleteTag.d.ts +18 -18
- package/src/Badge/Badge.d.ts +2 -1
- package/src/Button/Button.classes.d.ts +1 -1
- package/src/ComponentsProps.d.ts +111 -110
- package/src/DatePicker/DatePickerDataAttributes.d.ts +11 -0
- package/src/DatePicker/utils/DatePickerAriaLabelUtils.d.ts +2 -1
- package/src/DatePicker/utils/DatePickerUtils.d.ts +1 -1
- package/src/Dialer/DialDelete/DialDelete.d.ts +2 -2
- package/src/Dialer/DialPad/DialPad.d.ts +2 -2
- package/src/Dialer/Dialer.d.ts +4 -2
- package/src/Dropdown/Dropdown.type.d.ts +2 -2
- package/src/InlineEditable/InlineEditable.type.d.ts +2 -1
- package/src/ListNavigation/useListNavigation.d.ts +3 -3
- package/src/MenuActions/MenuActions.d.ts +2 -2
- package/src/MenuItem/MenuItem.type.d.ts +1 -0
- package/src/MenuItem/useMenuItem.d.ts +1 -1
- package/src/MenuItem/useVirtualizedMenuItem.d.ts +1 -1
- package/src/MenuList/MenuList.type.d.ts +1 -1
- package/src/MenuList/MenuListContext.d.ts +2 -3
- package/src/Modal/Modal.type.d.ts +1 -0
- package/src/NestedMenuContext/MenuOverlayGroupContext.d.ts +2 -2
- package/src/Popover/Popover.classes.d.ts +1 -1
- package/src/Popover/Popover.internal.d.ts +8 -0
- package/src/Popover/Popover.type.d.ts +1 -0
- package/src/Popper/Popper.type.d.ts +10 -7
- package/src/Rating/utils.d.ts +3 -2
- package/src/Select/Select.type.d.ts +7 -5
- package/src/Slider/Slider.d.ts +2 -2
- package/src/Slider/SliderThumb.d.ts +2 -1
- package/src/Squircle/Squircle.d.ts +1 -1
- package/src/StatusIndicator/StatusIndicator.d.ts +2 -1
- package/src/SubMenu/PopperMenu.type.d.ts +4 -1
- package/src/Table/Table.type.d.ts +3 -0
- package/src/Table/TableContext.d.ts +3 -0
- package/src/Table/TableRowContext.d.ts +7 -0
- package/src/Table/index.d.ts +1 -0
- package/src/TableCell/TableCell.classes.d.ts +1 -1
- package/src/TableFooter/TableFooter.classes.d.ts +1 -1
- package/src/TableFooter/TableFooter.type.d.ts +1 -0
- package/src/TableHead/TableHead.classes.d.ts +1 -1
- package/src/TableHead/TableHead.type.d.ts +1 -0
- package/src/TableRow/TableRow.type.d.ts +2 -0
- package/chunks/AccordionContext.js +0 -6
- package/chunks/Alert.js +0 -48
- package/chunks/AvatarGroup.js +0 -22
- package/chunks/Backdrop.js +0 -18
- package/chunks/Badge.js +0 -32
- package/chunks/BottomNavigationItem.js +0 -36
- package/chunks/Button.js +0 -88
- package/chunks/Chip.js +0 -73
- package/chunks/CircularProgressIndicator.js +0 -36
- package/chunks/Divider.js +0 -19
- package/chunks/DragHandle.js +0 -11
- package/chunks/Drawer.js +0 -32
- package/chunks/ExpandCollapseCaret.js +0 -24
- package/chunks/FormLabel.js +0 -27
- package/chunks/Icon.js +0 -25
- package/chunks/IconButtonLabel.js +0 -68
- package/chunks/List.js +0 -22
- package/chunks/ListItem.js +0 -83
- package/chunks/Menu.js +0 -61
- package/chunks/MenuDivider.js +0 -14
- package/chunks/MenuItemText.js +0 -17
- package/chunks/MenuList.js +0 -46
- package/chunks/Modal.js +0 -212
- package/chunks/Overlap.js +0 -25
- package/chunks/PickerTextField.js +0 -85
- package/chunks/Popover.js +0 -53
- package/chunks/PopperPaper.js +0 -15
- package/chunks/Select.js +0 -220
- package/chunks/ShowHideEye.js +0 -56
- package/chunks/SlideIn.js +0 -19
- package/chunks/SortableArrow.js +0 -73
- package/chunks/Squircle.js +0 -31
- package/chunks/StatusIndicator.js +0 -20
- package/chunks/StepConnector.js +0 -21
- package/chunks/StepIcon.js +0 -43
- package/chunks/StepLabel.js +0 -29
- package/chunks/StepperContext.js +0 -9
- package/chunks/TableContext.js +0 -6
- package/chunks/Tablelvl2Context.js +0 -6
- package/chunks/TabsContext.js +0 -6
- package/chunks/TextField.js +0 -110
- package/chunks/Tooltip.js +0 -217
- package/chunks/VirtualizedMenu.js +0 -164
- package/chunks/VisuallyHidden.js +0 -12
- package/chunks/getFade.js +0 -27
- package/chunks/getGrow.js +0 -70
- package/chunks/getSlideIn.js +0 -30
- package/chunks/hasContent.js +0 -3
- package/chunks/useAnimationFrame.js +0 -15
- package/chunks/useFocusTrapStack.js +0 -36
- package/chunks/useHelperTextId.js +0 -22
- package/chunks/useListNavigation.js +0 -199
- package/chunks/useMenuItemSelect.js +0 -273
- package/chunks/useMotionSafeTransition.js +0 -9
- package/chunks/useNestedMenuItem.js +0 -27
- package/chunks/useNestedParentMenu.js +0 -113
- package/chunks/usePrefersReducedMotion.js +0 -36
- package/chunks/useTooltipForceHide.js +0 -27
- package/chunks/useTrayNavigate.js +0 -150
- package/chunks/withTooltip.js +0 -15
package/chunks/4476.js
ADDED
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { motion } from "framer-motion";
|
|
3
|
+
import { motionTransition } from "@ringcentral/spring-theme";
|
|
4
|
+
import { useClasses } from "@ringcentral/spring-base";
|
|
5
|
+
import { useMotionSafeTransition, usePrefersReducedMotion } from "./1294.js";
|
|
6
|
+
import { Icon as Icon_Icon } from "./8307.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const getFade = ({ toggle = true, prefersReducedMotion = false, toggleOnTransition, toggleOffTransition } = {})=>({
|
|
13
|
+
initial: 'hidden',
|
|
14
|
+
animate: toggle ? 'show' : 'hidden',
|
|
15
|
+
exit: 'hidden',
|
|
16
|
+
variants: {
|
|
17
|
+
show: {
|
|
18
|
+
opacity: 1,
|
|
19
|
+
transition: prefersReducedMotion ? motionTransition.instant : toggleOnTransition || motionTransition["haste-01-fast"]
|
|
20
|
+
},
|
|
21
|
+
hidden: {
|
|
22
|
+
opacity: 0,
|
|
23
|
+
transition: prefersReducedMotion ? motionTransition.instant : toggleOffTransition || motionTransition["haste-01-slow"],
|
|
24
|
+
pointerEvents: 'none',
|
|
25
|
+
// Use transitionEnd to remove inline style, allowing CSS classes to control pointer-events
|
|
26
|
+
transitionEnd: {
|
|
27
|
+
pointerEvents: undefined
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
const Fade = (props)=>{
|
|
38
|
+
const { toggle, toggleOffTransition, toggleOnTransition, children, ...rest } = props;
|
|
39
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
40
|
+
return /*#__PURE__*/ jsx(motion.div, {
|
|
41
|
+
...getFade({
|
|
42
|
+
toggle,
|
|
43
|
+
toggleOffTransition,
|
|
44
|
+
toggleOnTransition,
|
|
45
|
+
prefersReducedMotion
|
|
46
|
+
}),
|
|
47
|
+
...rest,
|
|
48
|
+
children: children
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
const getGrow = ({ toggle = true, direction = 'both', prefersReducedMotion = false, toggleOffTransition, toggleOnTransition, transformOrigin } = {})=>{
|
|
60
|
+
const directionStr = direction === 'both' ? '' : direction.toUpperCase();
|
|
61
|
+
return {
|
|
62
|
+
style: {
|
|
63
|
+
transformOrigin: transformOriginToString(transformOrigin)
|
|
64
|
+
},
|
|
65
|
+
initial: 'invisible',
|
|
66
|
+
animate: toggle ? 'visible' : 'invisible',
|
|
67
|
+
exit: 'invisible',
|
|
68
|
+
variants: {
|
|
69
|
+
invisible: {
|
|
70
|
+
transform: `scale${directionStr}(0.618)`,
|
|
71
|
+
opacity: 0,
|
|
72
|
+
...!prefersReducedMotion && toggleOffTransition && {
|
|
73
|
+
transition: toggleOffTransition
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
visible: {
|
|
77
|
+
transform: `scale${directionStr}(1)`,
|
|
78
|
+
opacity: 1,
|
|
79
|
+
...!prefersReducedMotion && toggleOnTransition && {
|
|
80
|
+
transition: toggleOnTransition
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
transition: prefersReducedMotion ? motionTransition.instant : motionTransition["spring-01-fast"]
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
const transformOriginToString = (transformOrigin)=>{
|
|
88
|
+
if (!transformOrigin) return undefined;
|
|
89
|
+
return `${typeof transformOrigin.vertical === 'number' ? transformOrigin.vertical + 'px' : transformOrigin.vertical} ${typeof transformOrigin.horizontal === 'number' ? transformOrigin.horizontal + 'px' : transformOrigin.horizontal}`;
|
|
90
|
+
};
|
|
91
|
+
const alignmentToHorizontalTransformOrigin = {
|
|
92
|
+
start: 'left',
|
|
93
|
+
end: 'right'
|
|
94
|
+
};
|
|
95
|
+
const alignmentToVerticalTransformOrigin = {
|
|
96
|
+
start: 'top',
|
|
97
|
+
end: 'bottom'
|
|
98
|
+
};
|
|
99
|
+
const getTransformOriginStringForPlacement = (params)=>{
|
|
100
|
+
const { placement } = params;
|
|
101
|
+
const [base, alignment] = placement.split('-');
|
|
102
|
+
if (base === 'top' || base === 'bottom') {
|
|
103
|
+
return transformOriginToString({
|
|
104
|
+
vertical: base === 'top' ? 'bottom' : 'top',
|
|
105
|
+
horizontal: !alignment ? 'center' : alignmentToHorizontalTransformOrigin[alignment]
|
|
106
|
+
});
|
|
107
|
+
} else if (base === 'left' || base === 'right') {
|
|
108
|
+
return transformOriginToString({
|
|
109
|
+
vertical: !alignment ? 'center' : alignmentToVerticalTransformOrigin[alignment],
|
|
110
|
+
horizontal: base === 'left' ? 'right' : 'left'
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return undefined;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
const Grow = (props)=>{
|
|
121
|
+
const { toggle, toggleOffTransition, toggleOnTransition, children, transformOrigin, direction = 'both', style, ...rest } = props;
|
|
122
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
123
|
+
const growProps = getGrow({
|
|
124
|
+
toggle,
|
|
125
|
+
direction,
|
|
126
|
+
prefersReducedMotion,
|
|
127
|
+
toggleOffTransition,
|
|
128
|
+
toggleOnTransition,
|
|
129
|
+
transformOrigin
|
|
130
|
+
});
|
|
131
|
+
return /*#__PURE__*/ jsx(motion.div, {
|
|
132
|
+
...growProps,
|
|
133
|
+
...rest,
|
|
134
|
+
style: {
|
|
135
|
+
...growProps.style,
|
|
136
|
+
...style
|
|
137
|
+
},
|
|
138
|
+
children: children
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
// extracted by css-extract-rspack-plugin
|
|
150
|
+
/* export default */ var ShowHideEye = ({"sui-show-hide-eye-root":"sui-show-hide-eye-root"});
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
const topEyelidVariants = {
|
|
159
|
+
show: {
|
|
160
|
+
d: 'M 17.5 12.25 C 16.75 10.25 13.8 7 10 7 C 6.2 7 3.25 10.25 2.5 12.25'
|
|
161
|
+
},
|
|
162
|
+
hide: {
|
|
163
|
+
d: 'M 17.5 6.75 C 16.75 8.75 14 12.2 10 12.2 C 6 12.2 3.25 8.75 2.5 6.75'
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
const bottomEyelidVariants = {
|
|
167
|
+
show: {
|
|
168
|
+
d: 'M 17.5 11.75 C 16.75 13.75 13.8 17 10 17 C 6.2 17 3.25 13.75 2.5 11.75'
|
|
169
|
+
},
|
|
170
|
+
hide: {
|
|
171
|
+
d: 'M 17.5 6.75 C 16.75 8.75 14 12.2 10 12.2 C 6 12.2 3.25 8.75 2.5 6.75'
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
const eyelashVariants = {
|
|
175
|
+
show: {
|
|
176
|
+
d: 'M 10 4.5 L 10 1.5 M 4 6.35 L 2.5 3.7 M 16 6.35 L 17.5 3.7'
|
|
177
|
+
},
|
|
178
|
+
hide: {
|
|
179
|
+
d: 'M 10 15.5 L 10 18.5 M 16 13.75 L 17.5 16.4 M 4 13.75 L 2.5 16.4'
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
const ShowHideEye_ShowHideEye = (props)=>{
|
|
183
|
+
const { classes, size = 'medium', hide = false, className, ...rest } = props;
|
|
184
|
+
const cls = useClasses('show-hide-eye', classes, className);
|
|
185
|
+
const transition = useMotionSafeTransition(motionTransition["spring-01-fast"]);
|
|
186
|
+
const pupilShowTransition = useMotionSafeTransition({
|
|
187
|
+
delay: 0.05
|
|
188
|
+
});
|
|
189
|
+
const pupilHideTransition = useMotionSafeTransition({
|
|
190
|
+
duration: 0.1
|
|
191
|
+
});
|
|
192
|
+
const pupilVariants = {
|
|
193
|
+
show: {
|
|
194
|
+
ry: 3.75,
|
|
195
|
+
transition: pupilShowTransition
|
|
196
|
+
},
|
|
197
|
+
hide: {
|
|
198
|
+
ry: 0,
|
|
199
|
+
transition: pupilHideTransition
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
return /*#__PURE__*/ jsx(Icon_Icon, {
|
|
203
|
+
...rest,
|
|
204
|
+
size: size,
|
|
205
|
+
className: cls('root'),
|
|
206
|
+
children: /*#__PURE__*/ jsxs(motion.svg, {
|
|
207
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
208
|
+
viewBox: '0 0 20 20',
|
|
209
|
+
animate: hide ? 'hide' : 'show',
|
|
210
|
+
transition: transition,
|
|
211
|
+
children: [
|
|
212
|
+
/*#__PURE__*/ jsx(motion.path, {
|
|
213
|
+
initial: false,
|
|
214
|
+
stroke: "currentColor",
|
|
215
|
+
strokeWidth: 1.5,
|
|
216
|
+
strokeMiterlimit: 1.5,
|
|
217
|
+
strokeLinejoin: 'miter',
|
|
218
|
+
strokeLinecap: 'butt',
|
|
219
|
+
variants: topEyelidVariants,
|
|
220
|
+
transition: transition,
|
|
221
|
+
fill: "transparent"
|
|
222
|
+
}),
|
|
223
|
+
/*#__PURE__*/ jsx(motion.path, {
|
|
224
|
+
initial: false,
|
|
225
|
+
stroke: "currentColor",
|
|
226
|
+
strokeWidth: 1.5,
|
|
227
|
+
strokeMiterlimit: 1.5,
|
|
228
|
+
strokeLinejoin: 'miter',
|
|
229
|
+
strokeLinecap: 'butt',
|
|
230
|
+
variants: bottomEyelidVariants,
|
|
231
|
+
transition: transition,
|
|
232
|
+
fill: "transparent"
|
|
233
|
+
}),
|
|
234
|
+
/*#__PURE__*/ jsx(motion.ellipse, {
|
|
235
|
+
initial: false,
|
|
236
|
+
cx: 10,
|
|
237
|
+
cy: 10.5,
|
|
238
|
+
rx: 3.75,
|
|
239
|
+
fill: "currentColor",
|
|
240
|
+
variants: pupilVariants
|
|
241
|
+
}),
|
|
242
|
+
/*#__PURE__*/ jsx(motion.path, {
|
|
243
|
+
initial: false,
|
|
244
|
+
stroke: "currentColor",
|
|
245
|
+
strokeWidth: 1.5,
|
|
246
|
+
strokeMiterlimit: 1.5,
|
|
247
|
+
strokeLinejoin: 'miter',
|
|
248
|
+
strokeLinecap: 'butt',
|
|
249
|
+
variants: eyelashVariants,
|
|
250
|
+
transition: transition,
|
|
251
|
+
fill: "transparent"
|
|
252
|
+
})
|
|
253
|
+
]
|
|
254
|
+
})
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
const horizontal = [
|
|
267
|
+
'right',
|
|
268
|
+
'left'
|
|
269
|
+
];
|
|
270
|
+
const plus = [
|
|
271
|
+
'right',
|
|
272
|
+
'bottom'
|
|
273
|
+
];
|
|
274
|
+
const getSlideIn = ({ toggle = true, from = 'right', prefersReducedMotion = false, toggleOnTransition, toggleOffTransition, transition } = {})=>{
|
|
275
|
+
const axis = horizontal.includes(from) ? 'x' : 'y';
|
|
276
|
+
const invisibleValue = plus.includes(from) ? '100%' : '-100%';
|
|
277
|
+
return {
|
|
278
|
+
initial: 'invisible',
|
|
279
|
+
animate: toggle ? 'visible' : 'invisible',
|
|
280
|
+
exit: 'invisible',
|
|
281
|
+
variants: {
|
|
282
|
+
visible: {
|
|
283
|
+
[axis]: 0,
|
|
284
|
+
...!prefersReducedMotion && toggleOnTransition && {
|
|
285
|
+
transition: toggleOnTransition
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
invisible: {
|
|
289
|
+
[axis]: invisibleValue,
|
|
290
|
+
...!prefersReducedMotion && toggleOffTransition && {
|
|
291
|
+
transition: toggleOffTransition
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
transition: prefersReducedMotion ? motionTransition.instant : transition ?? motionTransition["spring-01-fast"]
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
const SlideIn = (props)=>{
|
|
304
|
+
const { toggle, toggleOnTransition, toggleOffTransition, transition, children, from = 'right', ...rest } = props;
|
|
305
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
306
|
+
return /*#__PURE__*/ jsx(motion.div, {
|
|
307
|
+
...getSlideIn({
|
|
308
|
+
toggle,
|
|
309
|
+
from,
|
|
310
|
+
prefersReducedMotion,
|
|
311
|
+
toggleOnTransition,
|
|
312
|
+
toggleOffTransition,
|
|
313
|
+
transition
|
|
314
|
+
}),
|
|
315
|
+
...rest,
|
|
316
|
+
children: children
|
|
317
|
+
});
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
const topCaretVariants = {
|
|
334
|
+
initial: {
|
|
335
|
+
d: 'M 5 7.5 L 10 2.5 L 15 7.5',
|
|
336
|
+
opacity: 1
|
|
337
|
+
},
|
|
338
|
+
asc: {
|
|
339
|
+
d: 'M 4.75 9.5 L 10 4 L 15.25 9.5',
|
|
340
|
+
opacity: 1
|
|
341
|
+
},
|
|
342
|
+
desc: {
|
|
343
|
+
d: 'M 10 9.5 L 10 4.5 L 10 9.5',
|
|
344
|
+
opacity: 0,
|
|
345
|
+
transition: {
|
|
346
|
+
ease: 'easeOut',
|
|
347
|
+
duration: 0.15
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
const topLineVariants = {
|
|
352
|
+
initial: {
|
|
353
|
+
d: 'M 10 2.5 L 10 2.5',
|
|
354
|
+
opacity: 0
|
|
355
|
+
},
|
|
356
|
+
asc: {
|
|
357
|
+
d: 'M 10 4.5 L 10 15.5',
|
|
358
|
+
opacity: 1
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
const bottomLineVariants = {
|
|
362
|
+
initial: {
|
|
363
|
+
d: 'M 10 17.5 L 10 17.5',
|
|
364
|
+
opacity: 0
|
|
365
|
+
},
|
|
366
|
+
desc: {
|
|
367
|
+
d: 'M 10 15.5 L 10 4.5',
|
|
368
|
+
opacity: 1
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
const bottomCaretVariants = {
|
|
372
|
+
initial: {
|
|
373
|
+
d: 'M 5 12.5 L 10 17.5 L 15 12.5',
|
|
374
|
+
opacity: 1
|
|
375
|
+
},
|
|
376
|
+
asc: {
|
|
377
|
+
d: 'M 10 10.5 L 10 15.5 L 10 10.5',
|
|
378
|
+
opacity: 0,
|
|
379
|
+
transition: {
|
|
380
|
+
ease: 'easeOut',
|
|
381
|
+
duration: 0.15
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
desc: {
|
|
385
|
+
d: 'M 4.75 10.5 L 10 16 L 15.25 10.5',
|
|
386
|
+
opacity: 1
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
const SortableArrow = (props)=>{
|
|
390
|
+
const { classes, size = 'medium', direction = false, className, ...rest } = props;
|
|
391
|
+
const cls = useClasses('sortable-arrow', classes, className);
|
|
392
|
+
const caretTransition = useMotionSafeTransition(motionTransition["spring-01-fast"]);
|
|
393
|
+
const lineTransition = useMotionSafeTransition(motionTransition["neutral-01-fast"]);
|
|
394
|
+
return /*#__PURE__*/ jsx(Icon_Icon, {
|
|
395
|
+
...rest,
|
|
396
|
+
size: size,
|
|
397
|
+
className: cls('root'),
|
|
398
|
+
children: /*#__PURE__*/ jsxs(motion.svg, {
|
|
399
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
400
|
+
viewBox: '0 0 20 20',
|
|
401
|
+
animate: direction || 'initial',
|
|
402
|
+
children: [
|
|
403
|
+
/*#__PURE__*/ jsx(motion.path, {
|
|
404
|
+
initial: false,
|
|
405
|
+
stroke: "currentColor",
|
|
406
|
+
strokeWidth: 1.5,
|
|
407
|
+
strokeMiterlimit: 1.5,
|
|
408
|
+
strokeLinejoin: 'miter',
|
|
409
|
+
variants: topCaretVariants,
|
|
410
|
+
transition: caretTransition,
|
|
411
|
+
fill: "transparent"
|
|
412
|
+
}),
|
|
413
|
+
direction !== 'desc' && /*#__PURE__*/ jsx(motion.path, {
|
|
414
|
+
initial: false,
|
|
415
|
+
stroke: "currentColor",
|
|
416
|
+
strokeWidth: 1.5,
|
|
417
|
+
strokeLinecap: 'square',
|
|
418
|
+
variants: topLineVariants,
|
|
419
|
+
transition: lineTransition,
|
|
420
|
+
fill: "transparent"
|
|
421
|
+
}),
|
|
422
|
+
direction !== 'asc' && /*#__PURE__*/ jsx(motion.path, {
|
|
423
|
+
initial: false,
|
|
424
|
+
stroke: "currentColor",
|
|
425
|
+
strokeWidth: 1.5,
|
|
426
|
+
strokeLinecap: 'square',
|
|
427
|
+
variants: bottomLineVariants,
|
|
428
|
+
transition: lineTransition,
|
|
429
|
+
fill: "transparent"
|
|
430
|
+
}),
|
|
431
|
+
/*#__PURE__*/ jsx(motion.path, {
|
|
432
|
+
initial: false,
|
|
433
|
+
stroke: "currentColor",
|
|
434
|
+
strokeWidth: 1.5,
|
|
435
|
+
strokeMiterlimit: 1.5,
|
|
436
|
+
strokeLinejoin: 'miter',
|
|
437
|
+
variants: bottomCaretVariants,
|
|
438
|
+
transition: caretTransition,
|
|
439
|
+
fill: "transparent"
|
|
440
|
+
})
|
|
441
|
+
]
|
|
442
|
+
})
|
|
443
|
+
});
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
export { Fade, Grow, ShowHideEye as showHideEyeStyles, ShowHideEye_ShowHideEye as ShowHideEye, SlideIn, SortableArrow, getFade, getGrow, getSlideIn, getTransformOriginStringForPlacement };
|
package/chunks/4491.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const composeEventHandlers = (externalEventHandler, internalEventHandler, options = {})=>(event, ...args)=>{
|
|
2
|
+
const { checkForDefaultPrevented = true } = options;
|
|
3
|
+
externalEventHandler?.(event, ...args);
|
|
4
|
+
if (checkForDefaultPrevented && event.defaultPrevented) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
internalEventHandler?.(event, ...args);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { composeEventHandlers };
|