@marigold/components 1.3.0 → 2.0.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/dist/index.d.ts +9 -7
- package/dist/index.js +64 -39
- package/dist/index.mjs +119 -100
- package/package.json +47 -46
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export { useAsyncList, useListData } from '@react-stately/data';
|
|
1
2
|
import { ThemeExtension, ThemeComponentProps, ThemeExtensionsWithParts, BoxOwnProps, StateAttrProps, CSSObject, Theme as Theme$1, ResponsiveStyleValue, ThemeProviderProps, GlobalProps } from '@marigold/system';
|
|
2
3
|
export { Box, BoxOwnProps, BoxProps, StyleProps, ThemeProvider, useTheme } from '@marigold/system';
|
|
3
|
-
import React, { ReactNode, HTMLAttributes, Key, LabelHTMLAttributes, ForwardRefExoticComponent, RefAttributes, ReactElement
|
|
4
|
+
import React, { ReactNode, HTMLAttributes, Key, LabelHTMLAttributes, ForwardRefExoticComponent, RefAttributes, ReactElement } from 'react';
|
|
4
5
|
import { ComponentProps, PolymorphicPropsWithRef, PolymorphicComponentWithRef, NonZeroPercentage } from '@marigold/types';
|
|
5
6
|
import * as _react_types_shared from '@react-types/shared';
|
|
6
7
|
import { PressEvents, CollectionElement } from '@react-types/shared';
|
|
@@ -14,13 +15,13 @@ import { Item, Section } from '@react-stately/collections';
|
|
|
14
15
|
import { AriaSelectProps } from '@react-types/select';
|
|
15
16
|
import { AriaSliderProps } from '@react-types/slider';
|
|
16
17
|
import { AriaSwitchProps } from '@react-types/switch';
|
|
17
|
-
import {
|
|
18
|
+
import { AriaTableProps } from '@react-aria/table';
|
|
18
19
|
import { TableStateProps, TableBody, Cell, Column, TableHeader, Row } from '@react-stately/table';
|
|
19
20
|
import { AriaTextFieldProps } from '@react-types/textfield';
|
|
20
21
|
import { PositionProps } from '@react-types/overlays';
|
|
21
22
|
import { TooltipTriggerProps as TooltipTriggerProps$1 } from '@react-types/tooltip';
|
|
22
23
|
import { aspect, size } from '@marigold/tokens';
|
|
23
|
-
import {
|
|
24
|
+
import { AriaOverlayProps } from '@react-aria/overlays';
|
|
24
25
|
export { SSRProvider } from '@react-aria/ssr';
|
|
25
26
|
export { VisuallyHidden } from '@react-aria/visually-hidden';
|
|
26
27
|
|
|
@@ -35,10 +36,11 @@ declare const Badge: ({ variant, size, children, ...props }: BadgeProps) => JSX.
|
|
|
35
36
|
|
|
36
37
|
interface ButtonThemeExtension extends ThemeExtension<'Button'> {
|
|
37
38
|
}
|
|
38
|
-
interface ButtonOwnProps extends PressEvents {
|
|
39
|
+
interface ButtonOwnProps extends PressEvents, ComponentProps<'button'> {
|
|
39
40
|
children?: ReactNode;
|
|
40
41
|
variant?: string;
|
|
41
42
|
size?: string;
|
|
43
|
+
fullWidth?: boolean;
|
|
42
44
|
}
|
|
43
45
|
interface ButtonProps extends PolymorphicPropsWithRef<ButtonOwnProps, 'button'> {
|
|
44
46
|
}
|
|
@@ -303,7 +305,7 @@ interface OverlayProps extends ComponentProps<'div'> {
|
|
|
303
305
|
}
|
|
304
306
|
declare const Overlay: ({ children, open, container, ...props }: OverlayProps) => JSX.Element | null;
|
|
305
307
|
|
|
306
|
-
interface PopoverProps extends Omit<
|
|
308
|
+
interface PopoverProps extends Omit<AriaOverlayProps, 'isOpen' | 'isDismissable' | 'isKeyboardDismissDisabled'> {
|
|
307
309
|
children?: ReactNode;
|
|
308
310
|
open?: boolean;
|
|
309
311
|
dismissable?: boolean;
|
|
@@ -428,7 +430,7 @@ interface TableThemeExtension extends ThemeExtensionsWithParts<'Table', [
|
|
|
428
430
|
'cell'
|
|
429
431
|
]> {
|
|
430
432
|
}
|
|
431
|
-
interface TableProps extends Pick<
|
|
433
|
+
interface TableProps extends Pick<AriaTableProps<object>, 'focusMode' | 'onRowAction' | 'onCellAction'>, Omit<TableStateProps<object>, 'showSelectionCheckboxes'> {
|
|
432
434
|
variant?: string;
|
|
433
435
|
size?: string;
|
|
434
436
|
stretch?: boolean;
|
|
@@ -500,7 +502,7 @@ interface Theme extends Theme$1 {
|
|
|
500
502
|
}
|
|
501
503
|
|
|
502
504
|
interface AsideProps {
|
|
503
|
-
children: [
|
|
505
|
+
children: [ReactElement, ReactElement];
|
|
504
506
|
side?: 'left' | 'right';
|
|
505
507
|
sideWidth?: ResponsiveStyleValue<string>;
|
|
506
508
|
space?: ResponsiveStyleValue<string>;
|
package/dist/index.js
CHANGED
|
@@ -73,11 +73,16 @@ __export(src_exports, {
|
|
|
73
73
|
Tooltip: () => Tooltip,
|
|
74
74
|
Underlay: () => Underlay,
|
|
75
75
|
VisuallyHidden: () => import_visually_hidden.VisuallyHidden,
|
|
76
|
+
useAsyncList: () => import_data.useAsyncList,
|
|
76
77
|
useCheckboxGroupContext: () => useCheckboxGroupContext,
|
|
78
|
+
useListData: () => import_data.useListData,
|
|
77
79
|
useTheme: () => import_system28.useTheme
|
|
78
80
|
});
|
|
79
81
|
module.exports = __toCommonJS(src_exports);
|
|
80
82
|
|
|
83
|
+
// src/hooks.ts
|
|
84
|
+
var import_data = require("@react-stately/data");
|
|
85
|
+
|
|
81
86
|
// src/Aside/Aside.tsx
|
|
82
87
|
var import_react = __toESM(require("react"));
|
|
83
88
|
|
|
@@ -180,6 +185,7 @@ var Breakout = ({
|
|
|
180
185
|
var import_react5 = __toESM(require("react"));
|
|
181
186
|
var import_button = require("@react-aria/button");
|
|
182
187
|
var import_focus = require("@react-aria/focus");
|
|
188
|
+
var import_interactions = require("@react-aria/interactions");
|
|
183
189
|
var import_utils = require("@react-aria/utils");
|
|
184
190
|
var import_system3 = require("@marigold/system");
|
|
185
191
|
var Button = (0, import_react5.forwardRef)(
|
|
@@ -189,26 +195,42 @@ var Button = (0, import_react5.forwardRef)(
|
|
|
189
195
|
variant,
|
|
190
196
|
size,
|
|
191
197
|
disabled,
|
|
198
|
+
onClick,
|
|
199
|
+
onPress,
|
|
200
|
+
onPressStart,
|
|
201
|
+
onPressEnd,
|
|
202
|
+
onPressChange,
|
|
203
|
+
onPressUp,
|
|
204
|
+
fullWidth,
|
|
192
205
|
...props
|
|
193
206
|
}, ref) => {
|
|
194
|
-
const buttonRef = (0,
|
|
195
|
-
(0,
|
|
207
|
+
const buttonRef = (0, import_utils.useObjectRef)(ref);
|
|
208
|
+
const { hoverProps, isHovered } = (0, import_interactions.useHover)({ isDisabled: disabled });
|
|
209
|
+
const { isFocusVisible, focusProps } = (0, import_focus.useFocusRing)({
|
|
210
|
+
autoFocus: props.autoFocus
|
|
211
|
+
});
|
|
196
212
|
const { buttonProps, isPressed } = (0, import_button.useButton)(
|
|
197
213
|
{
|
|
198
214
|
...props,
|
|
215
|
+
onClick,
|
|
216
|
+
onPress,
|
|
217
|
+
onPressStart,
|
|
218
|
+
onPressEnd,
|
|
219
|
+
onPressChange,
|
|
220
|
+
onPressUp,
|
|
199
221
|
elementType: typeof as === "string" ? as : "span",
|
|
200
222
|
isDisabled: disabled
|
|
201
223
|
},
|
|
202
224
|
buttonRef
|
|
203
225
|
);
|
|
204
|
-
const { isFocusVisible, focusProps } = (0, import_focus.useFocusRing)();
|
|
205
226
|
const styles = (0, import_system3.useComponentStyles)("Button", { variant, size });
|
|
206
227
|
const stateProps = (0, import_system3.useStateProps)({
|
|
207
228
|
active: isPressed,
|
|
208
|
-
|
|
229
|
+
focusVisible: isFocusVisible,
|
|
230
|
+
hover: isHovered
|
|
209
231
|
});
|
|
210
232
|
return /* @__PURE__ */ import_react5.default.createElement(import_system3.Box, {
|
|
211
|
-
...(0, import_utils.mergeProps)(buttonProps, focusProps),
|
|
233
|
+
...(0, import_utils.mergeProps)(buttonProps, focusProps, hoverProps, props),
|
|
212
234
|
...stateProps,
|
|
213
235
|
as,
|
|
214
236
|
ref: buttonRef,
|
|
@@ -216,7 +238,11 @@ var Button = (0, import_react5.forwardRef)(
|
|
|
216
238
|
display: "inline-flex",
|
|
217
239
|
alignItems: "center",
|
|
218
240
|
gap: "0.5ch",
|
|
219
|
-
cursor: disabled ? "not-allowed" : "pointer"
|
|
241
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
242
|
+
width: fullWidth ? "100%" : void 0,
|
|
243
|
+
"&:focus": {
|
|
244
|
+
outline: 0
|
|
245
|
+
}
|
|
220
246
|
},
|
|
221
247
|
css: styles
|
|
222
248
|
}, children);
|
|
@@ -259,7 +285,7 @@ var Center = ({
|
|
|
259
285
|
var import_react10 = __toESM(require("react"));
|
|
260
286
|
var import_checkbox3 = require("@react-aria/checkbox");
|
|
261
287
|
var import_focus2 = require("@react-aria/focus");
|
|
262
|
-
var
|
|
288
|
+
var import_interactions2 = require("@react-aria/interactions");
|
|
263
289
|
var import_utils2 = require("@react-aria/utils");
|
|
264
290
|
var import_toggle = require("@react-stately/toggle");
|
|
265
291
|
var import_system7 = require("@marigold/system");
|
|
@@ -429,7 +455,7 @@ var Checkbox = (0, import_react10.forwardRef)(
|
|
|
429
455
|
},
|
|
430
456
|
{ parts: ["container", "label", "checkbox"] }
|
|
431
457
|
);
|
|
432
|
-
const { hoverProps, isHovered } = (0,
|
|
458
|
+
const { hoverProps, isHovered } = (0, import_interactions2.useHover)({});
|
|
433
459
|
const { isFocusVisible, focusProps } = (0, import_focus2.useFocusRing)();
|
|
434
460
|
const stateProps = (0, import_system7.useStateProps)({
|
|
435
461
|
hover: isHovered,
|
|
@@ -620,7 +646,7 @@ var useDialogContext = () => (0, import_react16.useContext)(DialogContext);
|
|
|
620
646
|
|
|
621
647
|
// src/Dialog/DialogTrigger.tsx
|
|
622
648
|
var import_react21 = __toESM(require("react"));
|
|
623
|
-
var
|
|
649
|
+
var import_interactions3 = require("@react-aria/interactions");
|
|
624
650
|
var import_overlays4 = require("@react-stately/overlays");
|
|
625
651
|
|
|
626
652
|
// src/Overlay/Modal.tsx
|
|
@@ -753,7 +779,7 @@ var DialogTrigger = ({
|
|
|
753
779
|
const ctx = { open: state.isOpen, close: state.close };
|
|
754
780
|
return /* @__PURE__ */ import_react21.default.createElement(DialogContext.Provider, {
|
|
755
781
|
value: ctx
|
|
756
|
-
}, /* @__PURE__ */ import_react21.default.createElement(
|
|
782
|
+
}, /* @__PURE__ */ import_react21.default.createElement(import_interactions3.PressResponder, {
|
|
757
783
|
ref: dialogTriggerRef,
|
|
758
784
|
isPressed: state.isOpen,
|
|
759
785
|
onPress: state.toggle
|
|
@@ -1027,7 +1053,7 @@ var import_react33 = __toESM(require("react"));
|
|
|
1027
1053
|
var import_menu = require("@react-stately/menu");
|
|
1028
1054
|
var import_menu2 = require("@react-aria/menu");
|
|
1029
1055
|
var import_overlays5 = require("@react-aria/overlays");
|
|
1030
|
-
var
|
|
1056
|
+
var import_interactions4 = require("@react-aria/interactions");
|
|
1031
1057
|
var MenuTrigger = ({ disabled, children }) => {
|
|
1032
1058
|
const [menuTrigger, menu] = import_react33.default.Children.toArray(children);
|
|
1033
1059
|
const menuTriggerRef = (0, import_react33.useRef)(null);
|
|
@@ -1052,7 +1078,7 @@ var MenuTrigger = ({ disabled, children }) => {
|
|
|
1052
1078
|
};
|
|
1053
1079
|
return /* @__PURE__ */ import_react33.default.createElement(MenuContext.Provider, {
|
|
1054
1080
|
value: menuContext
|
|
1055
|
-
}, /* @__PURE__ */ import_react33.default.createElement(
|
|
1081
|
+
}, /* @__PURE__ */ import_react33.default.createElement(import_interactions4.PressResponder, {
|
|
1056
1082
|
...menuTriggerProps,
|
|
1057
1083
|
ref: menuTriggerRef,
|
|
1058
1084
|
isPressed: state.isOpen
|
|
@@ -1186,7 +1212,7 @@ var Message = ({
|
|
|
1186
1212
|
// src/NumberField/NumberField.tsx
|
|
1187
1213
|
var import_react40 = __toESM(require("react"));
|
|
1188
1214
|
var import_focus6 = require("@react-aria/focus");
|
|
1189
|
-
var
|
|
1215
|
+
var import_interactions6 = require("@react-aria/interactions");
|
|
1190
1216
|
var import_i18n = require("@react-aria/i18n");
|
|
1191
1217
|
var import_numberfield = require("@react-aria/numberfield");
|
|
1192
1218
|
var import_utils8 = require("@react-aria/utils");
|
|
@@ -1272,7 +1298,7 @@ var FieldBase = ({
|
|
|
1272
1298
|
// src/NumberField/StepButton.tsx
|
|
1273
1299
|
var import_react39 = __toESM(require("react"));
|
|
1274
1300
|
var import_button3 = require("@react-aria/button");
|
|
1275
|
-
var
|
|
1301
|
+
var import_interactions5 = require("@react-aria/interactions");
|
|
1276
1302
|
var import_utils7 = require("@react-aria/utils");
|
|
1277
1303
|
var import_system25 = require("@marigold/system");
|
|
1278
1304
|
var Plus = () => /* @__PURE__ */ import_react39.default.createElement(import_system25.Box, {
|
|
@@ -1301,7 +1327,7 @@ var StepButton = ({ direction, css, ...props }) => {
|
|
|
1301
1327
|
{ ...props, elementType: "div" },
|
|
1302
1328
|
ref
|
|
1303
1329
|
);
|
|
1304
|
-
const { hoverProps, isHovered } = (0,
|
|
1330
|
+
const { hoverProps, isHovered } = (0, import_interactions5.useHover)(props);
|
|
1305
1331
|
const stateProps = (0, import_system25.useStateProps)({
|
|
1306
1332
|
active: isPressed,
|
|
1307
1333
|
hover: isHovered,
|
|
@@ -1354,7 +1380,7 @@ var NumberField = (0, import_react40.forwardRef)(
|
|
|
1354
1380
|
incrementButtonProps,
|
|
1355
1381
|
decrementButtonProps
|
|
1356
1382
|
} = (0, import_numberfield.useNumberField)(props, state, inputRef);
|
|
1357
|
-
const { hoverProps, isHovered } = (0,
|
|
1383
|
+
const { hoverProps, isHovered } = (0, import_interactions6.useHover)({ isDisabled: disabled });
|
|
1358
1384
|
const { focusProps, isFocused } = (0, import_focus6.useFocusRing)({
|
|
1359
1385
|
within: true,
|
|
1360
1386
|
isTextInput: true,
|
|
@@ -1448,7 +1474,7 @@ function MarigoldProvider({
|
|
|
1448
1474
|
|
|
1449
1475
|
// src/Radio/Radio.tsx
|
|
1450
1476
|
var import_react44 = __toESM(require("react"));
|
|
1451
|
-
var
|
|
1477
|
+
var import_interactions7 = require("@react-aria/interactions");
|
|
1452
1478
|
var import_focus7 = require("@react-aria/focus");
|
|
1453
1479
|
var import_radio3 = require("@react-aria/radio");
|
|
1454
1480
|
var import_utils9 = require("@react-aria/utils");
|
|
@@ -1559,7 +1585,7 @@ var Radio = (0, import_react44.forwardRef)(
|
|
|
1559
1585
|
{ variant: variant || props.variant, size: size || props.size },
|
|
1560
1586
|
{ parts: ["container", "label", "radio"] }
|
|
1561
1587
|
);
|
|
1562
|
-
const { hoverProps, isHovered } = (0,
|
|
1588
|
+
const { hoverProps, isHovered } = (0, import_interactions7.useHover)({});
|
|
1563
1589
|
const { isFocusVisible, focusProps } = (0, import_focus7.useFocusRing)();
|
|
1564
1590
|
const stateProps = (0, import_system30.useStateProps)({
|
|
1565
1591
|
hover: isHovered,
|
|
@@ -1899,22 +1925,16 @@ var Thumb = ({ state, trackRef, styles, ...props }) => {
|
|
|
1899
1925
|
state.setThumbEditable(0, !disabled);
|
|
1900
1926
|
}, [disabled, state]);
|
|
1901
1927
|
return /* @__PURE__ */ import_react50.default.createElement(import_system.Box, {
|
|
1902
|
-
__baseCSS: {
|
|
1903
|
-
|
|
1904
|
-
top: 16,
|
|
1905
|
-
transform: "translateX(-50%)",
|
|
1906
|
-
left: `${state.getThumbPercent(0) * 100}%`
|
|
1907
|
-
}
|
|
1908
|
-
}, /* @__PURE__ */ import_react50.default.createElement(import_system.Box, {
|
|
1928
|
+
__baseCSS: { top: "50%" },
|
|
1929
|
+
css: styles,
|
|
1909
1930
|
...thumbProps,
|
|
1910
|
-
__baseCSS: styles,
|
|
1911
1931
|
...stateProps
|
|
1912
1932
|
}, /* @__PURE__ */ import_react50.default.createElement(import_visually_hidden.VisuallyHidden, null, /* @__PURE__ */ import_react50.default.createElement(import_system.Box, {
|
|
1913
1933
|
as: "input",
|
|
1914
1934
|
type: "range",
|
|
1915
1935
|
ref: inputRef,
|
|
1916
1936
|
...(0, import_utils12.mergeProps)(inputProps, focusProps)
|
|
1917
|
-
})))
|
|
1937
|
+
})));
|
|
1918
1938
|
};
|
|
1919
1939
|
|
|
1920
1940
|
// src/Slider/Slider.tsx
|
|
@@ -1960,13 +1980,16 @@ var Slider = (0, import_react51.forwardRef)(
|
|
|
1960
1980
|
...trackProps,
|
|
1961
1981
|
ref: trackRef,
|
|
1962
1982
|
__baseCSS: {
|
|
1963
|
-
position: "relative",
|
|
1964
1983
|
height: 32,
|
|
1965
1984
|
width: "100%",
|
|
1966
1985
|
cursor: props.disabled ? "not-allowed" : "pointer"
|
|
1967
1986
|
}
|
|
1968
1987
|
}, /* @__PURE__ */ import_react51.default.createElement(import_system.Box, {
|
|
1969
|
-
__baseCSS:
|
|
1988
|
+
__baseCSS: {
|
|
1989
|
+
top: "50%",
|
|
1990
|
+
transform: "translateY(-50%)"
|
|
1991
|
+
},
|
|
1992
|
+
css: styles.track
|
|
1970
1993
|
}), /* @__PURE__ */ import_react51.default.createElement(Thumb, {
|
|
1971
1994
|
state,
|
|
1972
1995
|
trackRef,
|
|
@@ -2230,7 +2253,7 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
2230
2253
|
// src/Table/TableColumnHeader.tsx
|
|
2231
2254
|
var import_react59 = __toESM(require("react"));
|
|
2232
2255
|
var import_focus13 = require("@react-aria/focus");
|
|
2233
|
-
var
|
|
2256
|
+
var import_interactions8 = require("@react-aria/interactions");
|
|
2234
2257
|
var import_table4 = require("@react-aria/table");
|
|
2235
2258
|
var import_utils18 = require("@react-aria/utils");
|
|
2236
2259
|
var import_system41 = require("@marigold/system");
|
|
@@ -2258,7 +2281,7 @@ var TableColumnHeader = ({ column }) => {
|
|
|
2258
2281
|
state,
|
|
2259
2282
|
ref
|
|
2260
2283
|
);
|
|
2261
|
-
const { hoverProps, isHovered } = (0,
|
|
2284
|
+
const { hoverProps, isHovered } = (0, import_interactions8.useHover)({});
|
|
2262
2285
|
const { focusProps, isFocusVisible } = (0, import_focus13.useFocusRing)();
|
|
2263
2286
|
const stateProps = (0, import_system41.useStateProps)({
|
|
2264
2287
|
hover: isHovered,
|
|
@@ -2303,7 +2326,7 @@ var TableHeaderRow = ({ item, children }) => {
|
|
|
2303
2326
|
// src/Table/TableRow.tsx
|
|
2304
2327
|
var import_react62 = __toESM(require("react"));
|
|
2305
2328
|
var import_focus14 = require("@react-aria/focus");
|
|
2306
|
-
var
|
|
2329
|
+
var import_interactions9 = require("@react-aria/interactions");
|
|
2307
2330
|
var import_table7 = require("@react-aria/table");
|
|
2308
2331
|
var import_utils19 = require("@react-aria/utils");
|
|
2309
2332
|
var import_system42 = require("@marigold/system");
|
|
@@ -2320,7 +2343,7 @@ var TableRow = ({ children, row }) => {
|
|
|
2320
2343
|
const disabled = state.disabledKeys.has(row.key);
|
|
2321
2344
|
const selected = state.selectionManager.isSelected(row.key);
|
|
2322
2345
|
const { focusProps, isFocusVisible } = (0, import_focus14.useFocusRing)({ within: true });
|
|
2323
|
-
const { hoverProps, isHovered } = (0,
|
|
2346
|
+
const { hoverProps, isHovered } = (0, import_interactions9.useHover)({ isDisabled: disabled });
|
|
2324
2347
|
const stateProps = (0, import_system42.useStateProps)({
|
|
2325
2348
|
disabled,
|
|
2326
2349
|
selected,
|
|
@@ -2340,7 +2363,7 @@ var TableRow = ({ children, row }) => {
|
|
|
2340
2363
|
// src/Table/TableSelectAllCell.tsx
|
|
2341
2364
|
var import_react63 = __toESM(require("react"));
|
|
2342
2365
|
var import_focus15 = require("@react-aria/focus");
|
|
2343
|
-
var
|
|
2366
|
+
var import_interactions10 = require("@react-aria/interactions");
|
|
2344
2367
|
var import_table8 = require("@react-aria/table");
|
|
2345
2368
|
var import_utils20 = require("@react-aria/utils");
|
|
2346
2369
|
var import_system43 = require("@marigold/system");
|
|
@@ -2355,7 +2378,7 @@ var TableSelectAllCell = ({ column }) => {
|
|
|
2355
2378
|
ref
|
|
2356
2379
|
);
|
|
2357
2380
|
const { checkboxProps } = mapCheckboxProps((0, import_table8.useTableSelectAllCheckbox)(state));
|
|
2358
|
-
const { hoverProps, isHovered } = (0,
|
|
2381
|
+
const { hoverProps, isHovered } = (0, import_interactions10.useHover)({});
|
|
2359
2382
|
const { focusProps, isFocusVisible } = (0, import_focus15.useFocusRing)();
|
|
2360
2383
|
const stateProps = (0, import_system43.useStateProps)({
|
|
2361
2384
|
hover: isHovered,
|
|
@@ -2471,7 +2494,7 @@ var Text = ({
|
|
|
2471
2494
|
|
|
2472
2495
|
// src/TextArea/TextArea.tsx
|
|
2473
2496
|
var import_react66 = __toESM(require("react"));
|
|
2474
|
-
var
|
|
2497
|
+
var import_interactions11 = require("@react-aria/interactions");
|
|
2475
2498
|
var import_focus16 = require("@react-aria/focus");
|
|
2476
2499
|
var import_textfield = require("@react-aria/textfield");
|
|
2477
2500
|
var import_utils22 = require("@react-aria/utils");
|
|
@@ -2501,7 +2524,7 @@ var TextArea = (0, import_react66.forwardRef)(
|
|
|
2501
2524
|
},
|
|
2502
2525
|
textAreaRef
|
|
2503
2526
|
);
|
|
2504
|
-
const { hoverProps, isHovered } = (0,
|
|
2527
|
+
const { hoverProps, isHovered } = (0, import_interactions11.useHover)({});
|
|
2505
2528
|
const { focusProps, isFocusVisible } = (0, import_focus16.useFocusRing)();
|
|
2506
2529
|
const stateProps = (0, import_system47.useStateProps)({
|
|
2507
2530
|
hover: isHovered,
|
|
@@ -2539,7 +2562,7 @@ var TextArea = (0, import_react66.forwardRef)(
|
|
|
2539
2562
|
|
|
2540
2563
|
// src/TextField/TextField.tsx
|
|
2541
2564
|
var import_react67 = __toESM(require("react"));
|
|
2542
|
-
var
|
|
2565
|
+
var import_interactions12 = require("@react-aria/interactions");
|
|
2543
2566
|
var import_focus17 = require("@react-aria/focus");
|
|
2544
2567
|
var import_textfield2 = require("@react-aria/textfield");
|
|
2545
2568
|
var import_utils23 = require("@react-aria/utils");
|
|
@@ -2558,7 +2581,7 @@ var TextField = (0, import_react67.forwardRef)(
|
|
|
2558
2581
|
},
|
|
2559
2582
|
inputRef
|
|
2560
2583
|
);
|
|
2561
|
-
const { hoverProps, isHovered } = (0,
|
|
2584
|
+
const { hoverProps, isHovered } = (0, import_interactions12.useHover)({});
|
|
2562
2585
|
const { focusProps, isFocusVisible } = (0, import_focus17.useFocusRing)({
|
|
2563
2586
|
isTextInput: true,
|
|
2564
2587
|
autoFocus
|
|
@@ -2757,6 +2780,8 @@ Tooltip.Trigger = TooltipTrigger;
|
|
|
2757
2780
|
Tooltip,
|
|
2758
2781
|
Underlay,
|
|
2759
2782
|
VisuallyHidden,
|
|
2783
|
+
useAsyncList,
|
|
2760
2784
|
useCheckboxGroupContext,
|
|
2785
|
+
useListData,
|
|
2761
2786
|
useTheme
|
|
2762
2787
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/hooks.ts
|
|
2
|
+
import { useAsyncList, useListData } from "@react-stately/data";
|
|
3
|
+
|
|
1
4
|
// src/Aside/Aside.tsx
|
|
2
5
|
import React from "react";
|
|
3
6
|
|
|
@@ -97,14 +100,11 @@ var Breakout = ({
|
|
|
97
100
|
};
|
|
98
101
|
|
|
99
102
|
// src/Button/Button.tsx
|
|
100
|
-
import React5, {
|
|
101
|
-
forwardRef,
|
|
102
|
-
useImperativeHandle,
|
|
103
|
-
useRef
|
|
104
|
-
} from "react";
|
|
103
|
+
import React5, { forwardRef } from "react";
|
|
105
104
|
import { useButton } from "@react-aria/button";
|
|
106
105
|
import { useFocusRing } from "@react-aria/focus";
|
|
107
|
-
import {
|
|
106
|
+
import { useHover } from "@react-aria/interactions";
|
|
107
|
+
import { mergeProps, useObjectRef } from "@react-aria/utils";
|
|
108
108
|
import {
|
|
109
109
|
Box as Box2,
|
|
110
110
|
useComponentStyles as useComponentStyles2,
|
|
@@ -117,26 +117,42 @@ var Button = forwardRef(
|
|
|
117
117
|
variant,
|
|
118
118
|
size,
|
|
119
119
|
disabled,
|
|
120
|
+
onClick,
|
|
121
|
+
onPress,
|
|
122
|
+
onPressStart,
|
|
123
|
+
onPressEnd,
|
|
124
|
+
onPressChange,
|
|
125
|
+
onPressUp,
|
|
126
|
+
fullWidth,
|
|
120
127
|
...props
|
|
121
128
|
}, ref) => {
|
|
122
|
-
const buttonRef =
|
|
123
|
-
|
|
129
|
+
const buttonRef = useObjectRef(ref);
|
|
130
|
+
const { hoverProps, isHovered } = useHover({ isDisabled: disabled });
|
|
131
|
+
const { isFocusVisible, focusProps } = useFocusRing({
|
|
132
|
+
autoFocus: props.autoFocus
|
|
133
|
+
});
|
|
124
134
|
const { buttonProps, isPressed } = useButton(
|
|
125
135
|
{
|
|
126
136
|
...props,
|
|
137
|
+
onClick,
|
|
138
|
+
onPress,
|
|
139
|
+
onPressStart,
|
|
140
|
+
onPressEnd,
|
|
141
|
+
onPressChange,
|
|
142
|
+
onPressUp,
|
|
127
143
|
elementType: typeof as === "string" ? as : "span",
|
|
128
144
|
isDisabled: disabled
|
|
129
145
|
},
|
|
130
146
|
buttonRef
|
|
131
147
|
);
|
|
132
|
-
const { isFocusVisible, focusProps } = useFocusRing();
|
|
133
148
|
const styles = useComponentStyles2("Button", { variant, size });
|
|
134
149
|
const stateProps = useStateProps({
|
|
135
150
|
active: isPressed,
|
|
136
|
-
|
|
151
|
+
focusVisible: isFocusVisible,
|
|
152
|
+
hover: isHovered
|
|
137
153
|
});
|
|
138
154
|
return /* @__PURE__ */ React5.createElement(Box2, {
|
|
139
|
-
...mergeProps(buttonProps, focusProps),
|
|
155
|
+
...mergeProps(buttonProps, focusProps, hoverProps, props),
|
|
140
156
|
...stateProps,
|
|
141
157
|
as,
|
|
142
158
|
ref: buttonRef,
|
|
@@ -144,7 +160,11 @@ var Button = forwardRef(
|
|
|
144
160
|
display: "inline-flex",
|
|
145
161
|
alignItems: "center",
|
|
146
162
|
gap: "0.5ch",
|
|
147
|
-
cursor: disabled ? "not-allowed" : "pointer"
|
|
163
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
164
|
+
width: fullWidth ? "100%" : void 0,
|
|
165
|
+
"&:focus": {
|
|
166
|
+
outline: 0
|
|
167
|
+
}
|
|
148
168
|
},
|
|
149
169
|
css: styles
|
|
150
170
|
}, children);
|
|
@@ -190,8 +210,8 @@ var Center = ({
|
|
|
190
210
|
import React10, { forwardRef as forwardRef2 } from "react";
|
|
191
211
|
import { useCheckbox, useCheckboxGroupItem } from "@react-aria/checkbox";
|
|
192
212
|
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
193
|
-
import { useHover } from "@react-aria/interactions";
|
|
194
|
-
import { useObjectRef } from "@react-aria/utils";
|
|
213
|
+
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
214
|
+
import { useObjectRef as useObjectRef2 } from "@react-aria/utils";
|
|
195
215
|
import { useToggleState } from "@react-stately/toggle";
|
|
196
216
|
import {
|
|
197
217
|
Box as Box6,
|
|
@@ -330,7 +350,7 @@ var Checkbox = forwardRef2(
|
|
|
330
350
|
error,
|
|
331
351
|
...props
|
|
332
352
|
}, ref) => {
|
|
333
|
-
const inputRef =
|
|
353
|
+
const inputRef = useObjectRef2(ref);
|
|
334
354
|
const checkboxProps = {
|
|
335
355
|
isIndeterminate: indeterminate,
|
|
336
356
|
isDisabled: disabled,
|
|
@@ -369,7 +389,7 @@ var Checkbox = forwardRef2(
|
|
|
369
389
|
},
|
|
370
390
|
{ parts: ["container", "label", "checkbox"] }
|
|
371
391
|
);
|
|
372
|
-
const { hoverProps, isHovered } =
|
|
392
|
+
const { hoverProps, isHovered } = useHover2({});
|
|
373
393
|
const { isFocusVisible, focusProps } = useFocusRing2();
|
|
374
394
|
const stateProps = useStateProps2({
|
|
375
395
|
hover: isHovered,
|
|
@@ -518,7 +538,7 @@ var Content = ({
|
|
|
518
538
|
};
|
|
519
539
|
|
|
520
540
|
// src/Dialog/Dialog.tsx
|
|
521
|
-
import React21, { useRef as
|
|
541
|
+
import React21, { useRef as useRef3 } from "react";
|
|
522
542
|
import { useButton as useButton2 } from "@react-aria/button";
|
|
523
543
|
import { useDialog } from "@react-aria/dialog";
|
|
524
544
|
import {
|
|
@@ -570,7 +590,7 @@ var DialogContext = createContext2({});
|
|
|
570
590
|
var useDialogContext = () => useContext2(DialogContext);
|
|
571
591
|
|
|
572
592
|
// src/Dialog/DialogTrigger.tsx
|
|
573
|
-
import React20, { useRef as
|
|
593
|
+
import React20, { useRef as useRef2 } from "react";
|
|
574
594
|
import { PressResponder } from "@react-aria/interactions";
|
|
575
595
|
import { useOverlayTriggerState } from "@react-stately/overlays";
|
|
576
596
|
|
|
@@ -578,7 +598,7 @@ import { useOverlayTriggerState } from "@react-stately/overlays";
|
|
|
578
598
|
import React17, { forwardRef as forwardRef3 } from "react";
|
|
579
599
|
import { FocusScope } from "@react-aria/focus";
|
|
580
600
|
import { useModal, useOverlay, usePreventScroll } from "@react-aria/overlays";
|
|
581
|
-
import { mergeProps as mergeProps2, useObjectRef as
|
|
601
|
+
import { mergeProps as mergeProps2, useObjectRef as useObjectRef3 } from "@react-aria/utils";
|
|
582
602
|
|
|
583
603
|
// src/Overlay/Underlay.tsx
|
|
584
604
|
import React16 from "react";
|
|
@@ -599,7 +619,7 @@ var Underlay = ({ size, variant, ...props }) => {
|
|
|
599
619
|
// src/Overlay/Modal.tsx
|
|
600
620
|
var Modal = forwardRef3(
|
|
601
621
|
({ children, open, dismissable, keyboardDismissable, onClose, ...props }, ref) => {
|
|
602
|
-
const modalRef =
|
|
622
|
+
const modalRef = useObjectRef3(ref);
|
|
603
623
|
const { overlayProps, underlayProps } = useOverlay(
|
|
604
624
|
{
|
|
605
625
|
isOpen: open,
|
|
@@ -655,7 +675,7 @@ var Overlay = ({
|
|
|
655
675
|
};
|
|
656
676
|
|
|
657
677
|
// src/Overlay/Popover.tsx
|
|
658
|
-
import React19, { forwardRef as forwardRef4, useRef
|
|
678
|
+
import React19, { forwardRef as forwardRef4, useRef } from "react";
|
|
659
679
|
import { useModal as useModal2, useOverlay as useOverlay2 } from "@react-aria/overlays";
|
|
660
680
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
661
681
|
var Popover = forwardRef4(
|
|
@@ -668,7 +688,7 @@ var Popover = forwardRef4(
|
|
|
668
688
|
minWidth = 0,
|
|
669
689
|
...props
|
|
670
690
|
}, ref) => {
|
|
671
|
-
const fallbackRef =
|
|
691
|
+
const fallbackRef = useRef(null);
|
|
672
692
|
const popoverRef = ref || fallbackRef;
|
|
673
693
|
const { overlayProps } = useOverlay2(
|
|
674
694
|
{
|
|
@@ -699,7 +719,7 @@ var DialogTrigger = ({
|
|
|
699
719
|
keyboardDismissable = true
|
|
700
720
|
}) => {
|
|
701
721
|
const [dialogTrigger, dialog] = React20.Children.toArray(children);
|
|
702
|
-
const dialogTriggerRef =
|
|
722
|
+
const dialogTriggerRef = useRef2(null);
|
|
703
723
|
const state = useOverlayTriggerState({});
|
|
704
724
|
const ctx = { open: state.isOpen, close: state.close };
|
|
705
725
|
return /* @__PURE__ */ React20.createElement(DialogContext.Provider, {
|
|
@@ -720,7 +740,7 @@ var DialogTrigger = ({
|
|
|
720
740
|
|
|
721
741
|
// src/Dialog/Dialog.tsx
|
|
722
742
|
var CloseButton = ({ css }) => {
|
|
723
|
-
const ref =
|
|
743
|
+
const ref = useRef3(null);
|
|
724
744
|
const { close } = useDialogContext();
|
|
725
745
|
const { buttonProps } = useButton2(
|
|
726
746
|
{
|
|
@@ -778,7 +798,7 @@ var Dialog = ({
|
|
|
778
798
|
closeButton,
|
|
779
799
|
...props
|
|
780
800
|
}) => {
|
|
781
|
-
const ref =
|
|
801
|
+
const ref = useRef3(null);
|
|
782
802
|
const { close } = useDialogContext();
|
|
783
803
|
const { dialogProps, titleProps } = useDialog(props, ref);
|
|
784
804
|
const styles = useComponentStyles11(
|
|
@@ -885,7 +905,7 @@ var Input = forwardRef5(
|
|
|
885
905
|
import React27, { forwardRef as forwardRef6 } from "react";
|
|
886
906
|
import { useLink } from "@react-aria/link";
|
|
887
907
|
import { useComponentStyles as useComponentStyles16 } from "@marigold/system";
|
|
888
|
-
import { useObjectRef as
|
|
908
|
+
import { useObjectRef as useObjectRef4 } from "@react-aria/utils";
|
|
889
909
|
var Link = forwardRef6(
|
|
890
910
|
({
|
|
891
911
|
as = "a",
|
|
@@ -897,7 +917,7 @@ var Link = forwardRef6(
|
|
|
897
917
|
onPressStart,
|
|
898
918
|
...props
|
|
899
919
|
}, ref) => {
|
|
900
|
-
const linkRef =
|
|
920
|
+
const linkRef = useObjectRef4(ref);
|
|
901
921
|
const { linkProps } = useLink(
|
|
902
922
|
{
|
|
903
923
|
...props,
|
|
@@ -965,7 +985,7 @@ var List = ({
|
|
|
965
985
|
List.Item = ListItem;
|
|
966
986
|
|
|
967
987
|
// src/Menu/Menu.tsx
|
|
968
|
-
import React32, { useRef as
|
|
988
|
+
import React32, { useRef as useRef6 } from "react";
|
|
969
989
|
import { FocusScope as FocusScope2 } from "@react-aria/focus";
|
|
970
990
|
import { useMenu } from "@react-aria/menu";
|
|
971
991
|
import { DismissButton } from "@react-aria/overlays";
|
|
@@ -982,15 +1002,15 @@ var MenuContext = createContext4({});
|
|
|
982
1002
|
var useMenuContext = () => useContext4(MenuContext);
|
|
983
1003
|
|
|
984
1004
|
// src/Menu/MenuTrigger.tsx
|
|
985
|
-
import React30, { useRef as
|
|
1005
|
+
import React30, { useRef as useRef4 } from "react";
|
|
986
1006
|
import { useMenuTriggerState } from "@react-stately/menu";
|
|
987
1007
|
import { useMenuTrigger } from "@react-aria/menu";
|
|
988
1008
|
import { useOverlayPosition } from "@react-aria/overlays";
|
|
989
1009
|
import { PressResponder as PressResponder2 } from "@react-aria/interactions";
|
|
990
1010
|
var MenuTrigger = ({ disabled, children }) => {
|
|
991
1011
|
const [menuTrigger, menu] = React30.Children.toArray(children);
|
|
992
|
-
const menuTriggerRef =
|
|
993
|
-
const overlayRef =
|
|
1012
|
+
const menuTriggerRef = useRef4(null);
|
|
1013
|
+
const overlayRef = useRef4(null);
|
|
994
1014
|
const state = useMenuTriggerState({});
|
|
995
1015
|
const { menuTriggerProps, menuProps } = useMenuTrigger(
|
|
996
1016
|
{ trigger: "press", isDisabled: disabled },
|
|
@@ -1026,13 +1046,13 @@ var MenuTrigger = ({ disabled, children }) => {
|
|
|
1026
1046
|
};
|
|
1027
1047
|
|
|
1028
1048
|
// src/Menu/MenuItem.tsx
|
|
1029
|
-
import React31, { useRef as
|
|
1049
|
+
import React31, { useRef as useRef5 } from "react";
|
|
1030
1050
|
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
1031
1051
|
import { useMenuItem } from "@react-aria/menu";
|
|
1032
1052
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
1033
1053
|
import { Box as Box15, useStateProps as useStateProps3 } from "@marigold/system";
|
|
1034
1054
|
var MenuItem = ({ item, state, onAction, css }) => {
|
|
1035
|
-
const ref =
|
|
1055
|
+
const ref = useRef5(null);
|
|
1036
1056
|
const { onClose } = useMenuContext();
|
|
1037
1057
|
const { menuItemProps } = useMenuItem(
|
|
1038
1058
|
{
|
|
@@ -1065,7 +1085,7 @@ var MenuItem = ({ item, state, onAction, css }) => {
|
|
|
1065
1085
|
var Menu = ({ variant, size, ...props }) => {
|
|
1066
1086
|
const { triggerWidth, ...menuContext } = useMenuContext();
|
|
1067
1087
|
const ownProps = { ...props, ...menuContext };
|
|
1068
|
-
const ref =
|
|
1088
|
+
const ref = useRef6(null);
|
|
1069
1089
|
const state = useTreeState({ ...ownProps, selectionMode: "none" });
|
|
1070
1090
|
const { menuProps } = useMenu(ownProps, state, ref);
|
|
1071
1091
|
const styles = useComponentStyles18(
|
|
@@ -1145,10 +1165,10 @@ var Message = ({
|
|
|
1145
1165
|
// src/NumberField/NumberField.tsx
|
|
1146
1166
|
import React37, { forwardRef as forwardRef7 } from "react";
|
|
1147
1167
|
import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
|
|
1148
|
-
import { useHover as
|
|
1168
|
+
import { useHover as useHover4 } from "@react-aria/interactions";
|
|
1149
1169
|
import { useLocale } from "@react-aria/i18n";
|
|
1150
1170
|
import { useNumberField } from "@react-aria/numberfield";
|
|
1151
|
-
import { mergeProps as mergeProps6, useObjectRef as
|
|
1171
|
+
import { mergeProps as mergeProps6, useObjectRef as useObjectRef5 } from "@react-aria/utils";
|
|
1152
1172
|
import { useNumberFieldState } from "@react-stately/numberfield";
|
|
1153
1173
|
import {
|
|
1154
1174
|
Box as Box20,
|
|
@@ -1236,9 +1256,9 @@ var FieldBase = ({
|
|
|
1236
1256
|
};
|
|
1237
1257
|
|
|
1238
1258
|
// src/NumberField/StepButton.tsx
|
|
1239
|
-
import React36, { useRef as
|
|
1259
|
+
import React36, { useRef as useRef7 } from "react";
|
|
1240
1260
|
import { useButton as useButton3 } from "@react-aria/button";
|
|
1241
|
-
import { useHover as
|
|
1261
|
+
import { useHover as useHover3 } from "@react-aria/interactions";
|
|
1242
1262
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
1243
1263
|
import { Box as Box19, useStateProps as useStateProps4 } from "@marigold/system";
|
|
1244
1264
|
var Plus = () => /* @__PURE__ */ React36.createElement(Box19, {
|
|
@@ -1262,12 +1282,12 @@ var Minus = () => /* @__PURE__ */ React36.createElement(Box19, {
|
|
|
1262
1282
|
d: "M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
|
1263
1283
|
}));
|
|
1264
1284
|
var StepButton = ({ direction, css, ...props }) => {
|
|
1265
|
-
const ref =
|
|
1285
|
+
const ref = useRef7(null);
|
|
1266
1286
|
const { buttonProps, isPressed } = useButton3(
|
|
1267
1287
|
{ ...props, elementType: "div" },
|
|
1268
1288
|
ref
|
|
1269
1289
|
);
|
|
1270
|
-
const { hoverProps, isHovered } =
|
|
1290
|
+
const { hoverProps, isHovered } = useHover3(props);
|
|
1271
1291
|
const stateProps = useStateProps4({
|
|
1272
1292
|
active: isPressed,
|
|
1273
1293
|
hover: isHovered,
|
|
@@ -1309,7 +1329,7 @@ var NumberField = forwardRef7(
|
|
|
1309
1329
|
};
|
|
1310
1330
|
const showStepper = !hideStepper;
|
|
1311
1331
|
const { locale } = useLocale();
|
|
1312
|
-
const inputRef =
|
|
1332
|
+
const inputRef = useObjectRef5(ref);
|
|
1313
1333
|
const state = useNumberFieldState({ ...props, locale });
|
|
1314
1334
|
const {
|
|
1315
1335
|
labelProps,
|
|
@@ -1320,7 +1340,7 @@ var NumberField = forwardRef7(
|
|
|
1320
1340
|
incrementButtonProps,
|
|
1321
1341
|
decrementButtonProps
|
|
1322
1342
|
} = useNumberField(props, state, inputRef);
|
|
1323
|
-
const { hoverProps, isHovered } =
|
|
1343
|
+
const { hoverProps, isHovered } = useHover4({ isDisabled: disabled });
|
|
1324
1344
|
const { focusProps, isFocused } = useFocusRing4({
|
|
1325
1345
|
within: true,
|
|
1326
1346
|
isTextInput: true,
|
|
@@ -1421,10 +1441,10 @@ function MarigoldProvider({
|
|
|
1421
1441
|
import React40, {
|
|
1422
1442
|
forwardRef as forwardRef8
|
|
1423
1443
|
} from "react";
|
|
1424
|
-
import { useHover as
|
|
1444
|
+
import { useHover as useHover5 } from "@react-aria/interactions";
|
|
1425
1445
|
import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
1426
1446
|
import { useRadio } from "@react-aria/radio";
|
|
1427
|
-
import { useObjectRef as
|
|
1447
|
+
import { useObjectRef as useObjectRef6 } from "@react-aria/utils";
|
|
1428
1448
|
import {
|
|
1429
1449
|
Box as Box22,
|
|
1430
1450
|
useComponentStyles as useComponentStyles23,
|
|
@@ -1528,7 +1548,7 @@ var Radio = forwardRef8(
|
|
|
1528
1548
|
width: groupWidth,
|
|
1529
1549
|
...state
|
|
1530
1550
|
} = useRadioGroupContext();
|
|
1531
|
-
const inputRef =
|
|
1551
|
+
const inputRef = useObjectRef6(ref);
|
|
1532
1552
|
const { inputProps } = useRadio(
|
|
1533
1553
|
{ isDisabled: disabled, ...props },
|
|
1534
1554
|
state,
|
|
@@ -1539,7 +1559,7 @@ var Radio = forwardRef8(
|
|
|
1539
1559
|
{ variant: variant || props.variant, size: size || props.size },
|
|
1540
1560
|
{ parts: ["container", "label", "radio"] }
|
|
1541
1561
|
);
|
|
1542
|
-
const { hoverProps, isHovered } =
|
|
1562
|
+
const { hoverProps, isHovered } = useHover5({});
|
|
1543
1563
|
const { isFocusVisible, focusProps } = useFocusRing5();
|
|
1544
1564
|
const stateProps = useStateProps6({
|
|
1545
1565
|
hover: isHovered,
|
|
@@ -1591,7 +1611,7 @@ Radio.Group = RadioGroup;
|
|
|
1591
1611
|
// src/Select/Select.tsx
|
|
1592
1612
|
import React44, {
|
|
1593
1613
|
forwardRef as forwardRef10,
|
|
1594
|
-
useRef as
|
|
1614
|
+
useRef as useRef9
|
|
1595
1615
|
} from "react";
|
|
1596
1616
|
import { useButton as useButton4 } from "@react-aria/button";
|
|
1597
1617
|
import { FocusScope as FocusScope3, useFocusRing as useFocusRing6 } from "@react-aria/focus";
|
|
@@ -1600,7 +1620,7 @@ import { DismissButton as DismissButton2, useOverlayPosition as useOverlayPositi
|
|
|
1600
1620
|
import { HiddenSelect, useSelect } from "@react-aria/select";
|
|
1601
1621
|
import { useSelectState } from "@react-stately/select";
|
|
1602
1622
|
import { Item as Item2, Section } from "@react-stately/collections";
|
|
1603
|
-
import { mergeProps as mergeProps7, useObjectRef as
|
|
1623
|
+
import { mergeProps as mergeProps7, useObjectRef as useObjectRef8 } from "@react-aria/utils";
|
|
1604
1624
|
import {
|
|
1605
1625
|
Box as Box26,
|
|
1606
1626
|
useComponentStyles as useComponentStyles25,
|
|
@@ -1609,7 +1629,7 @@ import {
|
|
|
1609
1629
|
|
|
1610
1630
|
// src/ListBox/ListBox.tsx
|
|
1611
1631
|
import React43, { forwardRef as forwardRef9 } from "react";
|
|
1612
|
-
import { useObjectRef as
|
|
1632
|
+
import { useObjectRef as useObjectRef7 } from "@react-aria/utils";
|
|
1613
1633
|
import {
|
|
1614
1634
|
Box as Box25,
|
|
1615
1635
|
useComponentStyles as useComponentStyles24
|
|
@@ -1627,11 +1647,11 @@ import { useListBoxSection } from "@react-aria/listbox";
|
|
|
1627
1647
|
import { Box as Box24 } from "@marigold/system";
|
|
1628
1648
|
|
|
1629
1649
|
// src/ListBox/ListBoxOption.tsx
|
|
1630
|
-
import React41, { useRef as
|
|
1650
|
+
import React41, { useRef as useRef8 } from "react";
|
|
1631
1651
|
import { useOption } from "@react-aria/listbox";
|
|
1632
1652
|
import { Box as Box23, useStateProps as useStateProps7 } from "@marigold/system";
|
|
1633
1653
|
var ListBoxOption = ({ item, state }) => {
|
|
1634
|
-
const ref =
|
|
1654
|
+
const ref = useRef8(null);
|
|
1635
1655
|
const { optionProps, isSelected, isDisabled, isFocused } = useOption(
|
|
1636
1656
|
{
|
|
1637
1657
|
key: item.key
|
|
@@ -1683,7 +1703,7 @@ var ListBoxSection = ({ section, state }) => {
|
|
|
1683
1703
|
// src/ListBox/ListBox.tsx
|
|
1684
1704
|
var ListBox = forwardRef9(
|
|
1685
1705
|
({ state, variant, size, ...props }, ref) => {
|
|
1686
|
-
const innerRef =
|
|
1706
|
+
const innerRef = useObjectRef7(ref);
|
|
1687
1707
|
const { listBoxProps } = useListBox(props, state, innerRef);
|
|
1688
1708
|
const styles = useComponentStyles24(
|
|
1689
1709
|
"ListBox",
|
|
@@ -1741,7 +1761,7 @@ var Chevron = ({ css }) => /* @__PURE__ */ React44.createElement(Box26, {
|
|
|
1741
1761
|
var Select = forwardRef10(
|
|
1742
1762
|
({ variant, size, width, open, disabled, required, error, ...rest }, ref) => {
|
|
1743
1763
|
const formatMessage = useMessageFormatter(messages);
|
|
1744
|
-
const buttonRef =
|
|
1764
|
+
const buttonRef = useObjectRef8(ref);
|
|
1745
1765
|
const props = {
|
|
1746
1766
|
isOpen: open,
|
|
1747
1767
|
isDisabled: disabled,
|
|
@@ -1764,7 +1784,7 @@ var Select = forwardRef10(
|
|
|
1764
1784
|
buttonRef
|
|
1765
1785
|
);
|
|
1766
1786
|
const { focusProps, isFocusVisible } = useFocusRing6();
|
|
1767
|
-
const overlayRef =
|
|
1787
|
+
const overlayRef = useRef9(null);
|
|
1768
1788
|
const { overlayProps: positionProps } = useOverlayPosition2({
|
|
1769
1789
|
targetRef: buttonRef,
|
|
1770
1790
|
overlayRef,
|
|
@@ -1853,7 +1873,7 @@ import React46, { forwardRef as forwardRef11 } from "react";
|
|
|
1853
1873
|
import { useSlider } from "@react-aria/slider";
|
|
1854
1874
|
import { useSliderState } from "@react-stately/slider";
|
|
1855
1875
|
import { useNumberFormatter } from "@react-aria/i18n";
|
|
1856
|
-
import { useObjectRef as
|
|
1876
|
+
import { useObjectRef as useObjectRef9 } from "@react-aria/utils";
|
|
1857
1877
|
import { useComponentStyles as useComponentStyles26 } from "@marigold/system";
|
|
1858
1878
|
|
|
1859
1879
|
// src/Slider/Thumb.tsx
|
|
@@ -1889,29 +1909,23 @@ var Thumb = ({ state, trackRef, styles, ...props }) => {
|
|
|
1889
1909
|
state.setThumbEditable(0, !disabled);
|
|
1890
1910
|
}, [disabled, state]);
|
|
1891
1911
|
return /* @__PURE__ */ React45.createElement(Box, {
|
|
1892
|
-
__baseCSS: {
|
|
1893
|
-
|
|
1894
|
-
top: 16,
|
|
1895
|
-
transform: "translateX(-50%)",
|
|
1896
|
-
left: `${state.getThumbPercent(0) * 100}%`
|
|
1897
|
-
}
|
|
1898
|
-
}, /* @__PURE__ */ React45.createElement(Box, {
|
|
1912
|
+
__baseCSS: { top: "50%" },
|
|
1913
|
+
css: styles,
|
|
1899
1914
|
...thumbProps,
|
|
1900
|
-
__baseCSS: styles,
|
|
1901
1915
|
...stateProps
|
|
1902
1916
|
}, /* @__PURE__ */ React45.createElement(VisuallyHidden, null, /* @__PURE__ */ React45.createElement(Box, {
|
|
1903
1917
|
as: "input",
|
|
1904
1918
|
type: "range",
|
|
1905
1919
|
ref: inputRef,
|
|
1906
1920
|
...mergeProps8(inputProps, focusProps)
|
|
1907
|
-
})))
|
|
1921
|
+
})));
|
|
1908
1922
|
};
|
|
1909
1923
|
|
|
1910
1924
|
// src/Slider/Slider.tsx
|
|
1911
1925
|
var Slider = forwardRef11(
|
|
1912
1926
|
({ variant, size, width = "100%", ...props }, ref) => {
|
|
1913
1927
|
const { formatOptions } = props;
|
|
1914
|
-
const trackRef =
|
|
1928
|
+
const trackRef = useObjectRef9(ref);
|
|
1915
1929
|
const numberFormatter = useNumberFormatter(formatOptions);
|
|
1916
1930
|
const state = useSliderState({ ...props, numberFormatter });
|
|
1917
1931
|
const { groupProps, trackProps, labelProps, outputProps } = useSlider(
|
|
@@ -1950,13 +1964,16 @@ var Slider = forwardRef11(
|
|
|
1950
1964
|
...trackProps,
|
|
1951
1965
|
ref: trackRef,
|
|
1952
1966
|
__baseCSS: {
|
|
1953
|
-
position: "relative",
|
|
1954
1967
|
height: 32,
|
|
1955
1968
|
width: "100%",
|
|
1956
1969
|
cursor: props.disabled ? "not-allowed" : "pointer"
|
|
1957
1970
|
}
|
|
1958
1971
|
}, /* @__PURE__ */ React46.createElement(Box, {
|
|
1959
|
-
__baseCSS:
|
|
1972
|
+
__baseCSS: {
|
|
1973
|
+
top: "50%",
|
|
1974
|
+
transform: "translateY(-50%)"
|
|
1975
|
+
},
|
|
1976
|
+
css: styles.track
|
|
1960
1977
|
}), /* @__PURE__ */ React46.createElement(Thumb, {
|
|
1961
1978
|
state,
|
|
1962
1979
|
trackRef,
|
|
@@ -2011,7 +2028,7 @@ var Stack = ({
|
|
|
2011
2028
|
import React49, { forwardRef as forwardRef12 } from "react";
|
|
2012
2029
|
import { useFocusRing as useFocusRing8 } from "@react-aria/focus";
|
|
2013
2030
|
import { useSwitch } from "@react-aria/switch";
|
|
2014
|
-
import { useObjectRef as
|
|
2031
|
+
import { useObjectRef as useObjectRef10 } from "@react-aria/utils";
|
|
2015
2032
|
import { useToggleState as useToggleState2 } from "@react-stately/toggle";
|
|
2016
2033
|
import {
|
|
2017
2034
|
useComponentStyles as useComponentStyles27,
|
|
@@ -2028,7 +2045,7 @@ var Switch = forwardRef12(
|
|
|
2028
2045
|
defaultChecked,
|
|
2029
2046
|
...rest
|
|
2030
2047
|
}, ref) => {
|
|
2031
|
-
const inputRef =
|
|
2048
|
+
const inputRef = useObjectRef10(ref);
|
|
2032
2049
|
const props = {
|
|
2033
2050
|
isSelected: checked,
|
|
2034
2051
|
isDisabled: disabled,
|
|
@@ -2112,7 +2129,7 @@ var Switch = forwardRef12(
|
|
|
2112
2129
|
);
|
|
2113
2130
|
|
|
2114
2131
|
// src/Table/Table.tsx
|
|
2115
|
-
import React58, { useRef as
|
|
2132
|
+
import React58, { useRef as useRef16 } from "react";
|
|
2116
2133
|
import { useTable } from "@react-aria/table";
|
|
2117
2134
|
import {
|
|
2118
2135
|
Cell,
|
|
@@ -2143,13 +2160,13 @@ var TableBody = ({ children }) => {
|
|
|
2143
2160
|
};
|
|
2144
2161
|
|
|
2145
2162
|
// src/Table/TableCell.tsx
|
|
2146
|
-
import React51, { useRef as
|
|
2163
|
+
import React51, { useRef as useRef10 } from "react";
|
|
2147
2164
|
import { useTableCell } from "@react-aria/table";
|
|
2148
2165
|
import { useFocusRing as useFocusRing9 } from "@react-aria/focus";
|
|
2149
2166
|
import { mergeProps as mergeProps9 } from "@react-aria/utils";
|
|
2150
2167
|
import { Box as Box28, useStateProps as useStateProps11 } from "@marigold/system";
|
|
2151
2168
|
var TableCell = ({ cell }) => {
|
|
2152
|
-
const ref =
|
|
2169
|
+
const ref = useRef10(null);
|
|
2153
2170
|
const { state, styles } = useTableContext();
|
|
2154
2171
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
2155
2172
|
const { gridCellProps } = useTableCell(
|
|
@@ -2171,7 +2188,7 @@ var TableCell = ({ cell }) => {
|
|
|
2171
2188
|
};
|
|
2172
2189
|
|
|
2173
2190
|
// src/Table/TableCheckboxCell.tsx
|
|
2174
|
-
import React52, { useRef as
|
|
2191
|
+
import React52, { useRef as useRef11 } from "react";
|
|
2175
2192
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
2176
2193
|
import { useFocusRing as useFocusRing10 } from "@react-aria/focus";
|
|
2177
2194
|
import { mergeProps as mergeProps10 } from "@react-aria/utils";
|
|
@@ -2199,7 +2216,7 @@ var mapCheckboxProps = ({
|
|
|
2199
2216
|
|
|
2200
2217
|
// src/Table/TableCheckboxCell.tsx
|
|
2201
2218
|
var TableCheckboxCell = ({ cell }) => {
|
|
2202
|
-
const ref =
|
|
2219
|
+
const ref = useRef11(null);
|
|
2203
2220
|
const { state, styles } = useTableContext();
|
|
2204
2221
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
2205
2222
|
const { gridCellProps } = useTableCell2(
|
|
@@ -2231,9 +2248,9 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
2231
2248
|
};
|
|
2232
2249
|
|
|
2233
2250
|
// src/Table/TableColumnHeader.tsx
|
|
2234
|
-
import React53, { useRef as
|
|
2251
|
+
import React53, { useRef as useRef12 } from "react";
|
|
2235
2252
|
import { useFocusRing as useFocusRing11 } from "@react-aria/focus";
|
|
2236
|
-
import { useHover as
|
|
2253
|
+
import { useHover as useHover6 } from "@react-aria/interactions";
|
|
2237
2254
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
2238
2255
|
import { mergeProps as mergeProps11 } from "@react-aria/utils";
|
|
2239
2256
|
import { Box as Box30, useStateProps as useStateProps13 } from "@marigold/system";
|
|
@@ -2252,7 +2269,7 @@ var SortIndicator = ({
|
|
|
2252
2269
|
}, direction === "ascending" ? "\u25B2" : "\u25BC");
|
|
2253
2270
|
var TableColumnHeader = ({ column }) => {
|
|
2254
2271
|
var _a, _b;
|
|
2255
|
-
const ref =
|
|
2272
|
+
const ref = useRef12(null);
|
|
2256
2273
|
const { state, styles } = useTableContext();
|
|
2257
2274
|
const { columnHeaderProps } = useTableColumnHeader(
|
|
2258
2275
|
{
|
|
@@ -2261,7 +2278,7 @@ var TableColumnHeader = ({ column }) => {
|
|
|
2261
2278
|
state,
|
|
2262
2279
|
ref
|
|
2263
2280
|
);
|
|
2264
|
-
const { hoverProps, isHovered } =
|
|
2281
|
+
const { hoverProps, isHovered } = useHover6({});
|
|
2265
2282
|
const { focusProps, isFocusVisible } = useFocusRing11();
|
|
2266
2283
|
const stateProps = useStateProps13({
|
|
2267
2284
|
hover: isHovered,
|
|
@@ -2291,11 +2308,11 @@ var TableHeader = ({ children }) => {
|
|
|
2291
2308
|
};
|
|
2292
2309
|
|
|
2293
2310
|
// src/Table/TableHeaderRow.tsx
|
|
2294
|
-
import React55, { useRef as
|
|
2311
|
+
import React55, { useRef as useRef13 } from "react";
|
|
2295
2312
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
2296
2313
|
var TableHeaderRow = ({ item, children }) => {
|
|
2297
2314
|
const { state } = useTableContext();
|
|
2298
|
-
const ref =
|
|
2315
|
+
const ref = useRef13(null);
|
|
2299
2316
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
2300
2317
|
return /* @__PURE__ */ React55.createElement("tr", {
|
|
2301
2318
|
...rowProps,
|
|
@@ -2304,14 +2321,14 @@ var TableHeaderRow = ({ item, children }) => {
|
|
|
2304
2321
|
};
|
|
2305
2322
|
|
|
2306
2323
|
// src/Table/TableRow.tsx
|
|
2307
|
-
import React56, { useRef as
|
|
2324
|
+
import React56, { useRef as useRef14 } from "react";
|
|
2308
2325
|
import { useFocusRing as useFocusRing12 } from "@react-aria/focus";
|
|
2309
|
-
import { useHover as
|
|
2326
|
+
import { useHover as useHover7 } from "@react-aria/interactions";
|
|
2310
2327
|
import { useTableRow } from "@react-aria/table";
|
|
2311
2328
|
import { mergeProps as mergeProps12 } from "@react-aria/utils";
|
|
2312
2329
|
import { Box as Box31, useStateProps as useStateProps14 } from "@marigold/system";
|
|
2313
2330
|
var TableRow = ({ children, row }) => {
|
|
2314
|
-
const ref =
|
|
2331
|
+
const ref = useRef14(null);
|
|
2315
2332
|
const { state, styles } = useTableContext();
|
|
2316
2333
|
const { rowProps, isPressed } = useTableRow(
|
|
2317
2334
|
{
|
|
@@ -2323,7 +2340,7 @@ var TableRow = ({ children, row }) => {
|
|
|
2323
2340
|
const disabled = state.disabledKeys.has(row.key);
|
|
2324
2341
|
const selected = state.selectionManager.isSelected(row.key);
|
|
2325
2342
|
const { focusProps, isFocusVisible } = useFocusRing12({ within: true });
|
|
2326
|
-
const { hoverProps, isHovered } =
|
|
2343
|
+
const { hoverProps, isHovered } = useHover7({ isDisabled: disabled });
|
|
2327
2344
|
const stateProps = useStateProps14({
|
|
2328
2345
|
disabled,
|
|
2329
2346
|
selected,
|
|
@@ -2341,9 +2358,9 @@ var TableRow = ({ children, row }) => {
|
|
|
2341
2358
|
};
|
|
2342
2359
|
|
|
2343
2360
|
// src/Table/TableSelectAllCell.tsx
|
|
2344
|
-
import React57, { useRef as
|
|
2361
|
+
import React57, { useRef as useRef15 } from "react";
|
|
2345
2362
|
import { useFocusRing as useFocusRing13 } from "@react-aria/focus";
|
|
2346
|
-
import { useHover as
|
|
2363
|
+
import { useHover as useHover8 } from "@react-aria/interactions";
|
|
2347
2364
|
import {
|
|
2348
2365
|
useTableColumnHeader as useTableColumnHeader2,
|
|
2349
2366
|
useTableSelectAllCheckbox
|
|
@@ -2351,7 +2368,7 @@ import {
|
|
|
2351
2368
|
import { mergeProps as mergeProps13 } from "@react-aria/utils";
|
|
2352
2369
|
import { Box as Box32, useStateProps as useStateProps15 } from "@marigold/system";
|
|
2353
2370
|
var TableSelectAllCell = ({ column }) => {
|
|
2354
|
-
const ref =
|
|
2371
|
+
const ref = useRef15(null);
|
|
2355
2372
|
const { state, styles } = useTableContext();
|
|
2356
2373
|
const { columnHeaderProps } = useTableColumnHeader2(
|
|
2357
2374
|
{
|
|
@@ -2361,7 +2378,7 @@ var TableSelectAllCell = ({ column }) => {
|
|
|
2361
2378
|
ref
|
|
2362
2379
|
);
|
|
2363
2380
|
const { checkboxProps } = mapCheckboxProps(useTableSelectAllCheckbox(state));
|
|
2364
|
-
const { hoverProps, isHovered } =
|
|
2381
|
+
const { hoverProps, isHovered } = useHover8({});
|
|
2365
2382
|
const { focusProps, isFocusVisible } = useFocusRing13();
|
|
2366
2383
|
const stateProps = useStateProps15({
|
|
2367
2384
|
hover: isHovered,
|
|
@@ -2390,7 +2407,7 @@ var Table = ({
|
|
|
2390
2407
|
stretch,
|
|
2391
2408
|
...props
|
|
2392
2409
|
}) => {
|
|
2393
|
-
const tableRef =
|
|
2410
|
+
const tableRef = useRef16(null);
|
|
2394
2411
|
const state = useTableState({
|
|
2395
2412
|
...props,
|
|
2396
2413
|
showSelectionCheckboxes: props.selectionMode === "multiple" && props.selectionBehavior !== "replace"
|
|
@@ -2479,10 +2496,10 @@ var Text = ({
|
|
|
2479
2496
|
|
|
2480
2497
|
// src/TextArea/TextArea.tsx
|
|
2481
2498
|
import React60, { forwardRef as forwardRef13 } from "react";
|
|
2482
|
-
import { useHover as
|
|
2499
|
+
import { useHover as useHover9 } from "@react-aria/interactions";
|
|
2483
2500
|
import { useFocusRing as useFocusRing14 } from "@react-aria/focus";
|
|
2484
2501
|
import { useTextField } from "@react-aria/textfield";
|
|
2485
|
-
import { useObjectRef as
|
|
2502
|
+
import { useObjectRef as useObjectRef11 } from "@react-aria/utils";
|
|
2486
2503
|
import {
|
|
2487
2504
|
Box as Box35,
|
|
2488
2505
|
useComponentStyles as useComponentStyles30,
|
|
@@ -2501,7 +2518,7 @@ var TextArea = forwardRef13(
|
|
|
2501
2518
|
...props
|
|
2502
2519
|
}, ref) => {
|
|
2503
2520
|
const { label, description, errorMessage } = props;
|
|
2504
|
-
const textAreaRef =
|
|
2521
|
+
const textAreaRef = useObjectRef11(ref);
|
|
2505
2522
|
const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField(
|
|
2506
2523
|
{
|
|
2507
2524
|
inputElementType: "textarea",
|
|
@@ -2513,7 +2530,7 @@ var TextArea = forwardRef13(
|
|
|
2513
2530
|
},
|
|
2514
2531
|
textAreaRef
|
|
2515
2532
|
);
|
|
2516
|
-
const { hoverProps, isHovered } =
|
|
2533
|
+
const { hoverProps, isHovered } = useHover9({});
|
|
2517
2534
|
const { focusProps, isFocusVisible } = useFocusRing14();
|
|
2518
2535
|
const stateProps = useStateProps16({
|
|
2519
2536
|
hover: isHovered,
|
|
@@ -2551,15 +2568,15 @@ var TextArea = forwardRef13(
|
|
|
2551
2568
|
|
|
2552
2569
|
// src/TextField/TextField.tsx
|
|
2553
2570
|
import React61, { forwardRef as forwardRef14 } from "react";
|
|
2554
|
-
import { useHover as
|
|
2571
|
+
import { useHover as useHover10 } from "@react-aria/interactions";
|
|
2555
2572
|
import { useFocusRing as useFocusRing15 } from "@react-aria/focus";
|
|
2556
2573
|
import { useTextField as useTextField2 } from "@react-aria/textfield";
|
|
2557
|
-
import { useObjectRef as
|
|
2574
|
+
import { useObjectRef as useObjectRef12 } from "@react-aria/utils";
|
|
2558
2575
|
import { useStateProps as useStateProps17 } from "@marigold/system";
|
|
2559
2576
|
var TextField = forwardRef14(
|
|
2560
2577
|
({ variant, size, width, disabled, required, readOnly, error, ...props }, ref) => {
|
|
2561
2578
|
const { label, description, errorMessage, autoFocus } = props;
|
|
2562
|
-
const inputRef =
|
|
2579
|
+
const inputRef = useObjectRef12(ref);
|
|
2563
2580
|
const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField2(
|
|
2564
2581
|
{
|
|
2565
2582
|
isDisabled: disabled,
|
|
@@ -2570,7 +2587,7 @@ var TextField = forwardRef14(
|
|
|
2570
2587
|
},
|
|
2571
2588
|
inputRef
|
|
2572
2589
|
);
|
|
2573
|
-
const { hoverProps, isHovered } =
|
|
2590
|
+
const { hoverProps, isHovered } = useHover10({});
|
|
2574
2591
|
const { focusProps, isFocusVisible } = useFocusRing15({
|
|
2575
2592
|
isTextInput: true,
|
|
2576
2593
|
autoFocus
|
|
@@ -2635,7 +2652,7 @@ var TooltipContext = createContext8({});
|
|
|
2635
2652
|
var useTooltipContext = () => useContext8(TooltipContext);
|
|
2636
2653
|
|
|
2637
2654
|
// src/Tooltip/TooltipTrigger.tsx
|
|
2638
|
-
import React63, { useRef as
|
|
2655
|
+
import React63, { useRef as useRef17 } from "react";
|
|
2639
2656
|
import { FocusableProvider } from "@react-aria/focus";
|
|
2640
2657
|
import { useOverlayPosition as useOverlayPosition3 } from "@react-aria/overlays";
|
|
2641
2658
|
import { useTooltipTrigger } from "@react-aria/tooltip";
|
|
@@ -2656,8 +2673,8 @@ var TooltipTrigger = ({
|
|
|
2656
2673
|
delay,
|
|
2657
2674
|
placement
|
|
2658
2675
|
};
|
|
2659
|
-
const tooltipTriggerRef =
|
|
2660
|
-
const overlayRef =
|
|
2676
|
+
const tooltipTriggerRef = useRef17(null);
|
|
2677
|
+
const overlayRef = useRef17(null);
|
|
2661
2678
|
const state = useTooltipTriggerState(props);
|
|
2662
2679
|
const { triggerProps, tooltipProps } = useTooltipTrigger(
|
|
2663
2680
|
props,
|
|
@@ -2771,6 +2788,8 @@ export {
|
|
|
2771
2788
|
Tooltip,
|
|
2772
2789
|
Underlay,
|
|
2773
2790
|
VisuallyHidden,
|
|
2791
|
+
useAsyncList,
|
|
2774
2792
|
useCheckboxGroupContext,
|
|
2793
|
+
useListData,
|
|
2775
2794
|
useTheme2 as useTheme
|
|
2776
2795
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marigold/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Components for the Marigold Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -23,51 +23,52 @@
|
|
|
23
23
|
"directory": "packages/components"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@marigold/icons": "0.
|
|
27
|
-
"@marigold/system": "
|
|
28
|
-
"@marigold/tokens": "3.
|
|
26
|
+
"@marigold/icons": "1.0.0",
|
|
27
|
+
"@marigold/system": "2.0.0",
|
|
28
|
+
"@marigold/tokens": "3.1.0",
|
|
29
29
|
"@marigold/types": "0.5.2",
|
|
30
|
-
"@react-aria/button": "3.
|
|
31
|
-
"@react-aria/checkbox": "3.
|
|
32
|
-
"@react-aria/dialog": "3.
|
|
33
|
-
"@react-aria/focus": "3.
|
|
34
|
-
"@react-aria/i18n": "3.
|
|
35
|
-
"@react-aria/interactions": "3.
|
|
36
|
-
"@react-aria/link": "3.3.
|
|
37
|
-
"@react-aria/listbox": "3.
|
|
38
|
-
"@react-aria/menu": "3.
|
|
39
|
-
"@react-aria/numberfield": "3.
|
|
40
|
-
"@react-aria/overlays": "3.
|
|
41
|
-
"@react-aria/radio": "3.
|
|
42
|
-
"@react-aria/select": "3.
|
|
43
|
-
"@react-aria/separator": "3.2.
|
|
44
|
-
"@react-aria/slider": "3.
|
|
45
|
-
"@react-aria/ssr": "3.
|
|
46
|
-
"@react-aria/switch": "3.2.
|
|
47
|
-
"@react-aria/table": "3.
|
|
48
|
-
"@react-aria/textfield": "3.
|
|
49
|
-
"@react-aria/tooltip": "3.
|
|
50
|
-
"@react-aria/utils": "3.13.
|
|
51
|
-
"@react-aria/visually-hidden": "3.
|
|
52
|
-
"@react-stately/checkbox": "3.
|
|
53
|
-
"@react-stately/collections": "3.4.
|
|
54
|
-
"@react-stately/
|
|
55
|
-
"@react-stately/
|
|
56
|
-
"@react-stately/
|
|
57
|
-
"@react-stately/
|
|
58
|
-
"@react-stately/
|
|
59
|
-
"@react-stately/
|
|
60
|
-
"@react-stately/
|
|
61
|
-
"@react-stately/
|
|
62
|
-
"@react-stately/
|
|
63
|
-
"@react-stately/
|
|
64
|
-
"@react-stately/
|
|
65
|
-
"@react-
|
|
66
|
-
"@react-types/
|
|
67
|
-
"@react-types/
|
|
68
|
-
"@react-types/
|
|
69
|
-
"@react-types/
|
|
70
|
-
"@react-types/
|
|
30
|
+
"@react-aria/button": "3.6.0",
|
|
31
|
+
"@react-aria/checkbox": "3.5.0",
|
|
32
|
+
"@react-aria/dialog": "3.3.0",
|
|
33
|
+
"@react-aria/focus": "3.7.0",
|
|
34
|
+
"@react-aria/i18n": "3.5.1",
|
|
35
|
+
"@react-aria/interactions": "3.10.0",
|
|
36
|
+
"@react-aria/link": "3.3.2",
|
|
37
|
+
"@react-aria/listbox": "3.6.0",
|
|
38
|
+
"@react-aria/menu": "3.6.0",
|
|
39
|
+
"@react-aria/numberfield": "3.3.0",
|
|
40
|
+
"@react-aria/overlays": "3.10.0",
|
|
41
|
+
"@react-aria/radio": "3.3.0",
|
|
42
|
+
"@react-aria/select": "3.8.0",
|
|
43
|
+
"@react-aria/separator": "3.2.2",
|
|
44
|
+
"@react-aria/slider": "3.2.0",
|
|
45
|
+
"@react-aria/ssr": "3.3.0",
|
|
46
|
+
"@react-aria/switch": "3.2.2",
|
|
47
|
+
"@react-aria/table": "3.4.0",
|
|
48
|
+
"@react-aria/textfield": "3.7.0",
|
|
49
|
+
"@react-aria/tooltip": "3.3.0",
|
|
50
|
+
"@react-aria/utils": "3.13.2",
|
|
51
|
+
"@react-aria/visually-hidden": "3.4.0",
|
|
52
|
+
"@react-stately/checkbox": "3.2.0",
|
|
53
|
+
"@react-stately/collections": "3.4.2",
|
|
54
|
+
"@react-stately/data": "^3.6.0",
|
|
55
|
+
"@react-stately/list": "3.5.2",
|
|
56
|
+
"@react-stately/menu": "3.4.0",
|
|
57
|
+
"@react-stately/numberfield": "3.2.0",
|
|
58
|
+
"@react-stately/overlays": "3.4.0",
|
|
59
|
+
"@react-stately/radio": "3.5.0",
|
|
60
|
+
"@react-stately/select": "3.3.0",
|
|
61
|
+
"@react-stately/slider": "3.2.0",
|
|
62
|
+
"@react-stately/table": "3.3.0",
|
|
63
|
+
"@react-stately/toggle": "3.4.0",
|
|
64
|
+
"@react-stately/tooltip": "3.2.0",
|
|
65
|
+
"@react-stately/tree": "3.3.2",
|
|
66
|
+
"@react-types/checkbox": "3.3.2",
|
|
67
|
+
"@react-types/dialog": "3.4.2",
|
|
68
|
+
"@react-types/numberfield": "3.3.2",
|
|
69
|
+
"@react-types/radio": "3.2.2",
|
|
70
|
+
"@react-types/shared": "3.14.0",
|
|
71
|
+
"@react-types/tooltip": "3.2.2",
|
|
71
72
|
"react-is": "18.2.0"
|
|
72
73
|
},
|
|
73
74
|
"peerDependencies": {
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
"@marigold/tsconfig": "0.3.0",
|
|
79
80
|
"react": "18.2.0",
|
|
80
81
|
"react-dom": "18.2.0",
|
|
81
|
-
"tsup": "6.
|
|
82
|
+
"tsup": "6.2.2"
|
|
82
83
|
},
|
|
83
84
|
"scripts": {
|
|
84
85
|
"build": "tsup src/index.ts",
|