@marigold/components 11.4.0 → 11.5.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.mts +256 -72
- package/dist/index.d.ts +256 -72
- package/dist/index.js +1302 -1266
- package/dist/index.mjs +1218 -1179
- package/package.json +24 -24
package/dist/index.mjs
CHANGED
|
@@ -206,7 +206,7 @@ var require_react_is_development = __commonJS({
|
|
|
206
206
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
207
207
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
208
208
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
209
|
-
var
|
|
209
|
+
var Fragment13 = REACT_FRAGMENT_TYPE;
|
|
210
210
|
var Lazy = REACT_LAZY_TYPE;
|
|
211
211
|
var Memo = REACT_MEMO_TYPE;
|
|
212
212
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -265,7 +265,7 @@ var require_react_is_development = __commonJS({
|
|
|
265
265
|
exports.ContextProvider = ContextProvider;
|
|
266
266
|
exports.Element = Element2;
|
|
267
267
|
exports.ForwardRef = ForwardRef;
|
|
268
|
-
exports.Fragment =
|
|
268
|
+
exports.Fragment = Fragment13;
|
|
269
269
|
exports.Lazy = Lazy;
|
|
270
270
|
exports.Memo = Memo;
|
|
271
271
|
exports.Portal = Portal;
|
|
@@ -1058,7 +1058,7 @@ var HelpText = ({
|
|
|
1058
1058
|
return Array.isArray(messages) ? messages.map((msg, idx) => /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-start gap-1", children: [
|
|
1059
1059
|
/* @__PURE__ */ jsx8(Icon, { className: classNames3.icon }),
|
|
1060
1060
|
msg
|
|
1061
|
-
] }, idx)) : /* @__PURE__ */ jsxs3("div", { className: "flex items-
|
|
1061
|
+
] }, idx)) : /* @__PURE__ */ jsxs3("div", { className: "flex items-start justify-start gap-1", children: [
|
|
1062
1062
|
/* @__PURE__ */ jsx8(Icon, { className: classNames3.icon }),
|
|
1063
1063
|
messages
|
|
1064
1064
|
] });
|
|
@@ -1089,7 +1089,7 @@ var _Label = ({ size: size2, variant, children, ...props }) => {
|
|
|
1089
1089
|
Label,
|
|
1090
1090
|
{
|
|
1091
1091
|
...props,
|
|
1092
|
-
className: cn5(classNames3.container, "flex w-[var(--labelWidth)]"),
|
|
1092
|
+
className: cn5(classNames3.container, "inline-flex w-[var(--labelWidth)]"),
|
|
1093
1093
|
style: createVar3({ labelWidth }),
|
|
1094
1094
|
children: [
|
|
1095
1095
|
children,
|
|
@@ -1309,7 +1309,7 @@ import { ListBoxItem } from "react-aria-components";
|
|
|
1309
1309
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1310
1310
|
var _ListBoxItem = ({ ...props }) => {
|
|
1311
1311
|
const { classNames: classNames3 } = useListBoxContext();
|
|
1312
|
-
return /* @__PURE__ */ jsx14(ListBoxItem, { ...props, className: classNames3.
|
|
1312
|
+
return /* @__PURE__ */ jsx14(ListBoxItem, { ...props, className: classNames3.item });
|
|
1313
1313
|
};
|
|
1314
1314
|
|
|
1315
1315
|
// src/ListBox/ListBoxSection.tsx
|
|
@@ -1957,9 +1957,9 @@ var _Checkbox = forwardRef14(
|
|
|
1957
1957
|
checked,
|
|
1958
1958
|
defaultChecked,
|
|
1959
1959
|
indeterminate,
|
|
1960
|
-
children,
|
|
1961
1960
|
variant,
|
|
1962
1961
|
size: size2,
|
|
1962
|
+
label,
|
|
1963
1963
|
...rest
|
|
1964
1964
|
}, ref) => {
|
|
1965
1965
|
const props = {
|
|
@@ -1998,7 +1998,7 @@ var _Checkbox = forwardRef14(
|
|
|
1998
1998
|
className: classNames3.checkbox
|
|
1999
1999
|
}
|
|
2000
2000
|
),
|
|
2001
|
-
children
|
|
2001
|
+
(props.children || label) && /* @__PURE__ */ jsx36("div", { className: classNames3.label, children: props.children || label })
|
|
2002
2002
|
] })
|
|
2003
2003
|
}
|
|
2004
2004
|
);
|
|
@@ -2103,121 +2103,49 @@ var Container = ({
|
|
|
2103
2103
|
);
|
|
2104
2104
|
|
|
2105
2105
|
// src/Dialog/Dialog.tsx
|
|
2106
|
-
import { useContext as useContext8 } from "react";
|
|
2107
|
-
import { Dialog, OverlayTriggerStateContext } from "react-aria-components";
|
|
2108
|
-
import { cn as cn27, useClassNames as useClassNames25 } from "@marigold/system";
|
|
2109
|
-
|
|
2110
|
-
// src/Dialog/DialogActions.tsx
|
|
2111
|
-
import { cn as cn23, useClassNames as useClassNames20 } from "@marigold/system";
|
|
2112
|
-
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2113
|
-
var DialogActions = ({ variant, size: size2, children }) => {
|
|
2114
|
-
const classNames3 = useClassNames20({ component: "Dialog", variant, size: size2 });
|
|
2115
|
-
return /* @__PURE__ */ jsx39("div", { className: cn23("[grid-area:actions]", classNames3.actions), children });
|
|
2116
|
-
};
|
|
2117
|
-
|
|
2118
|
-
// src/Dialog/DialogContent.tsx
|
|
2119
|
-
import { cn as cn24, useClassNames as useClassNames21 } from "@marigold/system";
|
|
2120
|
-
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2121
|
-
var DialogContent = ({
|
|
2122
|
-
variant,
|
|
2123
|
-
size: size2,
|
|
2124
|
-
children
|
|
2125
|
-
}) => {
|
|
2126
|
-
const classNames3 = useClassNames21({ component: "Dialog", variant, size: size2 });
|
|
2127
|
-
return /* @__PURE__ */ jsx40("div", { className: cn24("[grid-area:content]", classNames3.content), children });
|
|
2128
|
-
};
|
|
2129
|
-
|
|
2130
|
-
// src/Dialog/DialogTitle.tsx
|
|
2131
|
-
import { cn as cn26, useClassNames as useClassNames24 } from "@marigold/system";
|
|
2132
|
-
|
|
2133
|
-
// src/Header/Header.tsx
|
|
2134
|
-
import { Header as Header2 } from "react-aria-components";
|
|
2135
|
-
import { useClassNames as useClassNames22 } from "@marigold/system";
|
|
2136
|
-
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2137
|
-
var _Header = ({ variant, size: size2, ...props }) => {
|
|
2138
|
-
const classNames3 = useClassNames22({
|
|
2139
|
-
component: "Header",
|
|
2140
|
-
variant,
|
|
2141
|
-
size: size2
|
|
2142
|
-
});
|
|
2143
|
-
return /* @__PURE__ */ jsx41(Header2, { className: classNames3, ...props, children: props.children });
|
|
2144
|
-
};
|
|
2145
|
-
|
|
2146
|
-
// src/Headline/Headline.tsx
|
|
2147
|
-
import { Heading as Heading2 } from "react-aria-components";
|
|
2148
2106
|
import {
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
} from "@marigold/system";
|
|
2154
|
-
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2155
|
-
var _Headline = ({
|
|
2156
|
-
variant,
|
|
2157
|
-
size: size2,
|
|
2158
|
-
children,
|
|
2159
|
-
align = "left",
|
|
2160
|
-
color,
|
|
2161
|
-
level = "1",
|
|
2162
|
-
...props
|
|
2163
|
-
}) => {
|
|
2164
|
-
const classNames3 = useClassNames23({
|
|
2165
|
-
component: "Headline",
|
|
2166
|
-
variant,
|
|
2167
|
-
size: size2 != null ? size2 : `level-${level}`
|
|
2168
|
-
});
|
|
2169
|
-
return /* @__PURE__ */ jsx42(
|
|
2170
|
-
Heading2,
|
|
2171
|
-
{
|
|
2172
|
-
level: Number(level),
|
|
2173
|
-
...props,
|
|
2174
|
-
className: cn25(
|
|
2175
|
-
classNames3,
|
|
2176
|
-
"max-w-(--maxHeadlineWidth)",
|
|
2177
|
-
// possibly set by a <Container>
|
|
2178
|
-
textAlign[align]
|
|
2179
|
-
),
|
|
2180
|
-
style: { color: color && ensureCssVar(color, "color") },
|
|
2181
|
-
children
|
|
2182
|
-
}
|
|
2183
|
-
);
|
|
2184
|
-
};
|
|
2185
|
-
|
|
2186
|
-
// src/Dialog/DialogTitle.tsx
|
|
2187
|
-
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2188
|
-
var DialogTitle = ({
|
|
2189
|
-
level = "2",
|
|
2190
|
-
variant,
|
|
2191
|
-
size: size2,
|
|
2192
|
-
children
|
|
2193
|
-
}) => {
|
|
2194
|
-
const classNames3 = useClassNames24({ component: "Dialog", variant, size: size2 });
|
|
2195
|
-
return /* @__PURE__ */ jsx43(_Header, { className: cn26("[grid-area:title]", classNames3.header), children: /* @__PURE__ */ jsx43(_Headline, { slot: "title", level, children }) });
|
|
2196
|
-
};
|
|
2107
|
+
forwardRef as forwardRef18,
|
|
2108
|
+
useContext as useContext9
|
|
2109
|
+
} from "react";
|
|
2110
|
+
import { Dialog, OverlayTriggerStateContext as OverlayTriggerStateContext2 } from "react-aria-components";
|
|
2111
|
+
import { cn as cn26, useClassNames as useClassNames24 } from "@marigold/system";
|
|
2197
2112
|
|
|
2198
|
-
// src/
|
|
2199
|
-
import {
|
|
2200
|
-
import {
|
|
2113
|
+
// src/CloseButton/CloseButton.tsx
|
|
2114
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
2115
|
+
import { Button as Button5 } from "react-aria-components";
|
|
2116
|
+
import { useClassNames as useClassNames20 } from "@marigold/system";
|
|
2117
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2118
|
+
var CloseButton = forwardRef15(
|
|
2119
|
+
({ className, size: size2, variant, ...props }, ref) => {
|
|
2120
|
+
const classNames3 = useClassNames20({
|
|
2121
|
+
component: "CloseButton",
|
|
2122
|
+
className,
|
|
2123
|
+
size: size2,
|
|
2124
|
+
variant
|
|
2125
|
+
});
|
|
2126
|
+
return /* @__PURE__ */ jsx39(Button5, { ref, className: classNames3, ...props, children: /* @__PURE__ */ jsx39("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx39("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
2127
|
+
}
|
|
2128
|
+
);
|
|
2201
2129
|
|
|
2202
2130
|
// src/Overlay/Modal.tsx
|
|
2203
|
-
import { forwardRef as
|
|
2131
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
2204
2132
|
import { Modal } from "react-aria-components";
|
|
2205
|
-
import { jsx as
|
|
2206
|
-
var _Modal =
|
|
2133
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2134
|
+
var _Modal = forwardRef16(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
|
|
2207
2135
|
const props = {
|
|
2208
2136
|
isOpen: open,
|
|
2209
2137
|
isDismissable: dismissable,
|
|
2210
2138
|
isKeyboardDismissDisabled: keyboardDismissable,
|
|
2211
2139
|
...rest
|
|
2212
2140
|
};
|
|
2213
|
-
return /* @__PURE__ */
|
|
2141
|
+
return /* @__PURE__ */ jsx40(
|
|
2214
2142
|
Underlay,
|
|
2215
2143
|
{
|
|
2216
2144
|
dismissable,
|
|
2217
2145
|
keyboardDismissable,
|
|
2218
2146
|
open,
|
|
2219
2147
|
variant: "modal",
|
|
2220
|
-
children: /* @__PURE__ */
|
|
2148
|
+
children: /* @__PURE__ */ jsx40(
|
|
2221
2149
|
Modal,
|
|
2222
2150
|
{
|
|
2223
2151
|
ref,
|
|
@@ -2230,161 +2158,569 @@ var _Modal = forwardRef15(({ open, dismissable, keyboardDismissable, ...rest },
|
|
|
2230
2158
|
);
|
|
2231
2159
|
});
|
|
2232
2160
|
|
|
2161
|
+
// src/Overlay/NonModal.tsx
|
|
2162
|
+
import { forwardRef as forwardRef17, useContext as useContext8 } from "react";
|
|
2163
|
+
import {
|
|
2164
|
+
OverlayTriggerStateContext,
|
|
2165
|
+
Provider
|
|
2166
|
+
} from "react-aria-components";
|
|
2167
|
+
import {
|
|
2168
|
+
useOverlayTriggerState
|
|
2169
|
+
} from "react-stately";
|
|
2170
|
+
import { FocusScope } from "@react-aria/focus";
|
|
2171
|
+
import { DismissButton, Overlay } from "@react-aria/overlays";
|
|
2172
|
+
import { useIsSSR as useIsSSR2 } from "@react-aria/ssr";
|
|
2173
|
+
import {
|
|
2174
|
+
filterDOMProps,
|
|
2175
|
+
mergeProps,
|
|
2176
|
+
useEnterAnimation,
|
|
2177
|
+
useExitAnimation,
|
|
2178
|
+
useObjectRef,
|
|
2179
|
+
useViewportSize
|
|
2180
|
+
} from "@react-aria/utils";
|
|
2181
|
+
|
|
2182
|
+
// src/utils/useRenderProps.tsx
|
|
2183
|
+
import { useMemo } from "react";
|
|
2184
|
+
function useRenderProps(props) {
|
|
2185
|
+
let {
|
|
2186
|
+
className,
|
|
2187
|
+
style,
|
|
2188
|
+
children,
|
|
2189
|
+
defaultClassName = void 0,
|
|
2190
|
+
defaultChildren = void 0,
|
|
2191
|
+
defaultStyle,
|
|
2192
|
+
values
|
|
2193
|
+
} = props;
|
|
2194
|
+
return useMemo(() => {
|
|
2195
|
+
let computedClassName;
|
|
2196
|
+
let computedStyle;
|
|
2197
|
+
let computedChildren;
|
|
2198
|
+
if (typeof className === "function") {
|
|
2199
|
+
computedClassName = className({ ...values, defaultClassName });
|
|
2200
|
+
} else {
|
|
2201
|
+
computedClassName = className;
|
|
2202
|
+
}
|
|
2203
|
+
if (typeof style === "function") {
|
|
2204
|
+
computedStyle = style({ ...values, defaultStyle: defaultStyle || {} });
|
|
2205
|
+
} else {
|
|
2206
|
+
computedStyle = style;
|
|
2207
|
+
}
|
|
2208
|
+
if (typeof children === "function") {
|
|
2209
|
+
computedChildren = children({ ...values, defaultChildren });
|
|
2210
|
+
} else if (children == null) {
|
|
2211
|
+
computedChildren = defaultChildren;
|
|
2212
|
+
} else {
|
|
2213
|
+
computedChildren = children;
|
|
2214
|
+
}
|
|
2215
|
+
return {
|
|
2216
|
+
className: computedClassName != null ? computedClassName : defaultClassName,
|
|
2217
|
+
style: computedStyle || defaultStyle ? { ...defaultStyle, ...computedStyle } : void 0,
|
|
2218
|
+
children: computedChildren != null ? computedChildren : defaultChildren,
|
|
2219
|
+
"data-rac": ""
|
|
2220
|
+
};
|
|
2221
|
+
}, [
|
|
2222
|
+
className,
|
|
2223
|
+
style,
|
|
2224
|
+
children,
|
|
2225
|
+
defaultClassName,
|
|
2226
|
+
defaultChildren,
|
|
2227
|
+
defaultStyle,
|
|
2228
|
+
values
|
|
2229
|
+
]);
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
// src/Overlay/useNonModal.ts
|
|
2233
|
+
import { useOverlay } from "@react-aria/overlays";
|
|
2234
|
+
var useNonModal = ({ nonModalRef, keyboardDismissable = true }, state) => {
|
|
2235
|
+
let { overlayProps } = useOverlay(
|
|
2236
|
+
{
|
|
2237
|
+
isOpen: state.isOpen,
|
|
2238
|
+
onClose: state.close,
|
|
2239
|
+
shouldCloseOnBlur: false,
|
|
2240
|
+
isDismissable: false,
|
|
2241
|
+
isKeyboardDismissDisabled: keyboardDismissable ? false : true
|
|
2242
|
+
},
|
|
2243
|
+
nonModalRef
|
|
2244
|
+
);
|
|
2245
|
+
return {
|
|
2246
|
+
nonModalProps: overlayProps
|
|
2247
|
+
};
|
|
2248
|
+
};
|
|
2249
|
+
|
|
2250
|
+
// src/Overlay/NonModal.tsx
|
|
2251
|
+
import { jsx as jsx41, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2252
|
+
var NonModalInner = ({ state, isExiting, ...props }) => {
|
|
2253
|
+
const { nonModalProps } = useNonModal(props, state);
|
|
2254
|
+
const ref = props.nonModalRef;
|
|
2255
|
+
const portalContainer = usePortalContainer();
|
|
2256
|
+
const isEntering = useEnterAnimation(ref) || props.isEntering || false;
|
|
2257
|
+
const renderProps = useRenderProps({
|
|
2258
|
+
...props,
|
|
2259
|
+
defaultClassName: "react-aria-NonModalOverlay",
|
|
2260
|
+
values: {
|
|
2261
|
+
isEntering,
|
|
2262
|
+
isExiting,
|
|
2263
|
+
state
|
|
2264
|
+
}
|
|
2265
|
+
});
|
|
2266
|
+
const viewport = useViewportSize();
|
|
2267
|
+
const style = {
|
|
2268
|
+
...renderProps.style,
|
|
2269
|
+
"--visual-viewport-height": viewport.height + "px"
|
|
2270
|
+
};
|
|
2271
|
+
const overlay = /* @__PURE__ */ jsxs15(
|
|
2272
|
+
"div",
|
|
2273
|
+
{
|
|
2274
|
+
...mergeProps(filterDOMProps(props), nonModalProps),
|
|
2275
|
+
...renderProps,
|
|
2276
|
+
tabIndex: -1,
|
|
2277
|
+
"aria-label": props["aria-label"],
|
|
2278
|
+
"aria-labelledby": props["aria-labelledby"],
|
|
2279
|
+
ref,
|
|
2280
|
+
slot: props.slot || void 0,
|
|
2281
|
+
style,
|
|
2282
|
+
"data-entering": isEntering || void 0,
|
|
2283
|
+
"data-exiting": isExiting || void 0,
|
|
2284
|
+
children: [
|
|
2285
|
+
renderProps.children,
|
|
2286
|
+
/* @__PURE__ */ jsx41(DismissButton, { onDismiss: state.close })
|
|
2287
|
+
]
|
|
2288
|
+
}
|
|
2289
|
+
);
|
|
2290
|
+
return /* @__PURE__ */ jsx41(
|
|
2291
|
+
Overlay,
|
|
2292
|
+
{
|
|
2293
|
+
isExiting,
|
|
2294
|
+
portalContainer,
|
|
2295
|
+
disableFocusManagement: true,
|
|
2296
|
+
children: /* @__PURE__ */ jsx41(FocusScope, { restoreFocus: true, children: /* @__PURE__ */ jsx41(Provider, { values: [[OverlayTriggerStateContext, state]], children: overlay }) })
|
|
2297
|
+
}
|
|
2298
|
+
);
|
|
2299
|
+
};
|
|
2300
|
+
var NonModal = forwardRef17(
|
|
2301
|
+
({ open, ...rest }, ref) => {
|
|
2302
|
+
const props = {
|
|
2303
|
+
isOpen: open,
|
|
2304
|
+
...rest
|
|
2305
|
+
};
|
|
2306
|
+
ref = useObjectRef(ref);
|
|
2307
|
+
const contextState = useContext8(OverlayTriggerStateContext);
|
|
2308
|
+
const localState = useOverlayTriggerState(props);
|
|
2309
|
+
const state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;
|
|
2310
|
+
const isExiting = useExitAnimation(ref, state.isOpen) || props.isExiting || false;
|
|
2311
|
+
const isSSR = useIsSSR2();
|
|
2312
|
+
if (state && !state.isOpen && !isExiting || isSSR) {
|
|
2313
|
+
return null;
|
|
2314
|
+
}
|
|
2315
|
+
return /* @__PURE__ */ jsx41(
|
|
2316
|
+
NonModalInner,
|
|
2317
|
+
{
|
|
2318
|
+
...props,
|
|
2319
|
+
nonModalRef: ref,
|
|
2320
|
+
state,
|
|
2321
|
+
isExiting
|
|
2322
|
+
}
|
|
2323
|
+
);
|
|
2324
|
+
}
|
|
2325
|
+
);
|
|
2326
|
+
|
|
2327
|
+
// src/Dialog/DialogActions.tsx
|
|
2328
|
+
import { cn as cn23, useClassNames as useClassNames21 } from "@marigold/system";
|
|
2329
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2330
|
+
var DialogActions = ({ variant, size: size2, children }) => {
|
|
2331
|
+
const classNames3 = useClassNames21({ component: "Dialog", variant, size: size2 });
|
|
2332
|
+
return /* @__PURE__ */ jsx42("div", { className: cn23("[grid-area:actions]", classNames3.actions), children });
|
|
2333
|
+
};
|
|
2334
|
+
|
|
2335
|
+
// src/Dialog/DialogContent.tsx
|
|
2336
|
+
import { cn as cn24, useClassNames as useClassNames22 } from "@marigold/system";
|
|
2337
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2338
|
+
var DialogContent = ({
|
|
2339
|
+
variant,
|
|
2340
|
+
size: size2,
|
|
2341
|
+
children
|
|
2342
|
+
}) => {
|
|
2343
|
+
const classNames3 = useClassNames22({ component: "Dialog", variant, size: size2 });
|
|
2344
|
+
return /* @__PURE__ */ jsx43("div", { className: cn24("[grid-area:content]", classNames3.content), children });
|
|
2345
|
+
};
|
|
2346
|
+
|
|
2347
|
+
// src/Dialog/DialogTitle.tsx
|
|
2348
|
+
import { Header as Header2, Heading as Heading2 } from "react-aria-components";
|
|
2349
|
+
import { cn as cn25, useClassNames as useClassNames23 } from "@marigold/system";
|
|
2350
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2351
|
+
var DialogTitle = ({ variant, size: size2, children }) => {
|
|
2352
|
+
const classNames3 = useClassNames23({
|
|
2353
|
+
component: "Dialog",
|
|
2354
|
+
variant,
|
|
2355
|
+
size: size2
|
|
2356
|
+
});
|
|
2357
|
+
return /* @__PURE__ */ jsx44(Header2, { className: cn25("[grid-area:title]", classNames3.header), children: /* @__PURE__ */ jsx44(Heading2, { slot: "title", className: classNames3.title, children }) });
|
|
2358
|
+
};
|
|
2359
|
+
|
|
2233
2360
|
// src/Dialog/DialogTrigger.tsx
|
|
2234
|
-
import {
|
|
2361
|
+
import { createContext as createContext6 } from "react";
|
|
2362
|
+
import { DialogTrigger } from "react-aria-components";
|
|
2363
|
+
import { PressResponder } from "@react-aria/interactions";
|
|
2364
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2365
|
+
var DialogContext = createContext6({});
|
|
2235
2366
|
var _DialogTrigger = ({
|
|
2236
2367
|
open,
|
|
2237
2368
|
dismissable,
|
|
2238
2369
|
keyboardDismissable,
|
|
2239
|
-
|
|
2370
|
+
size: size2,
|
|
2240
2371
|
...rest
|
|
2241
2372
|
}) => {
|
|
2242
2373
|
const props = {
|
|
2243
2374
|
isOpen: open,
|
|
2375
|
+
isDismissable: dismissable,
|
|
2376
|
+
isKeyboardDismissDisabled: !keyboardDismissable,
|
|
2244
2377
|
...rest
|
|
2245
2378
|
};
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2379
|
+
return /* @__PURE__ */ jsx45(DialogContext.Provider, { value: props, children: /* @__PURE__ */ jsx45(DialogTrigger, { ...props, children: /* @__PURE__ */ jsx45(PressResponder, { isPressed: false, children: props.children }) }) });
|
|
2380
|
+
};
|
|
2381
|
+
|
|
2382
|
+
// src/Dialog/Dialog.tsx
|
|
2383
|
+
import { jsx as jsx46, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2384
|
+
var _Dialog = forwardRef18(
|
|
2385
|
+
(props, ref) => {
|
|
2386
|
+
var _a;
|
|
2387
|
+
const classNames3 = useClassNames24({
|
|
2388
|
+
component: "Dialog",
|
|
2389
|
+
variant: props.variant,
|
|
2390
|
+
size: props.size
|
|
2391
|
+
});
|
|
2392
|
+
const { isDismissable, isKeyboardDismissDisabled, isOpen } = useContext9(DialogContext);
|
|
2393
|
+
const state = useContext9(OverlayTriggerStateContext2);
|
|
2394
|
+
const children = typeof props.children === "function" ? props.children({
|
|
2395
|
+
close: (_a = state == null ? void 0 : state.close) != null ? _a : () => {
|
|
2396
|
+
}
|
|
2397
|
+
}) : props.children;
|
|
2398
|
+
return /* @__PURE__ */ jsx46(
|
|
2255
2399
|
_Modal,
|
|
2256
2400
|
{
|
|
2257
|
-
dismissable,
|
|
2258
|
-
keyboardDismissable,
|
|
2259
|
-
|
|
2401
|
+
dismissable: isDismissable,
|
|
2402
|
+
keyboardDismissable: isKeyboardDismissDisabled,
|
|
2403
|
+
open: isOpen,
|
|
2404
|
+
children: /* @__PURE__ */ jsxs16(
|
|
2405
|
+
Dialog,
|
|
2406
|
+
{
|
|
2407
|
+
...props,
|
|
2408
|
+
ref,
|
|
2409
|
+
className: cn26(
|
|
2410
|
+
"relative outline-hidden [&>*:not(:last-child)]:mb-4",
|
|
2411
|
+
"grid [grid-template-areas:'title'_'content'_'actions']",
|
|
2412
|
+
classNames3.container
|
|
2413
|
+
),
|
|
2414
|
+
children: [
|
|
2415
|
+
props.closeButton && /* @__PURE__ */ jsx46(
|
|
2416
|
+
CloseButton,
|
|
2417
|
+
{
|
|
2418
|
+
className: classNames3.closeButton,
|
|
2419
|
+
onPress: state == null ? void 0 : state.close
|
|
2420
|
+
}
|
|
2421
|
+
),
|
|
2422
|
+
children
|
|
2423
|
+
]
|
|
2424
|
+
}
|
|
2425
|
+
)
|
|
2260
2426
|
}
|
|
2261
|
-
)
|
|
2262
|
-
|
|
2427
|
+
);
|
|
2428
|
+
}
|
|
2429
|
+
);
|
|
2430
|
+
_Dialog.Trigger = _DialogTrigger;
|
|
2431
|
+
_Dialog.Title = DialogTitle;
|
|
2432
|
+
_Dialog.Content = DialogContent;
|
|
2433
|
+
_Dialog.Actions = DialogActions;
|
|
2434
|
+
|
|
2435
|
+
// src/Divider/Divider.tsx
|
|
2436
|
+
import { Separator } from "react-aria-components";
|
|
2437
|
+
import { cn as cn27, useClassNames as useClassNames25 } from "@marigold/system";
|
|
2438
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
2439
|
+
var _Divider = ({ variant, ...props }) => {
|
|
2440
|
+
const classNames3 = useClassNames25({ component: "Divider", variant });
|
|
2441
|
+
return /* @__PURE__ */ jsx47(Separator, { className: cn27("border-none", classNames3), ...props });
|
|
2263
2442
|
};
|
|
2264
2443
|
|
|
2265
|
-
// src/
|
|
2266
|
-
import {
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2444
|
+
// src/Drawer/Drawer.tsx
|
|
2445
|
+
import { useContext as useContext11, useRef } from "react";
|
|
2446
|
+
import { Dialog as Dialog2, OverlayTriggerStateContext as OverlayTriggerStateContext3 } from "react-aria-components";
|
|
2447
|
+
import { useLandmark } from "@react-aria/landmark";
|
|
2448
|
+
import { cn as cn32, useClassNames as useClassNames29, useSmallScreen as useSmallScreen3 } from "@marigold/system";
|
|
2449
|
+
|
|
2450
|
+
// src/Drawer/Context.tsx
|
|
2451
|
+
import { createContext as createContext7, useContext as useContext10 } from "react";
|
|
2452
|
+
var DrawerContext = createContext7({
|
|
2453
|
+
variant: void 0,
|
|
2454
|
+
size: void 0
|
|
2455
|
+
});
|
|
2456
|
+
var useDrawerContext = () => useContext10(DrawerContext);
|
|
2457
|
+
|
|
2458
|
+
// src/Drawer/DrawerActions.tsx
|
|
2459
|
+
import { cn as cn28, useClassNames as useClassNames26 } from "@marigold/system";
|
|
2460
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2461
|
+
var DrawerActions = ({ variant, size: size2, children }) => {
|
|
2462
|
+
const ctx = useDrawerContext();
|
|
2463
|
+
const classNames3 = useClassNames26({
|
|
2464
|
+
component: "Drawer",
|
|
2465
|
+
variant: variant != null ? variant : ctx.variant,
|
|
2466
|
+
size: size2 != null ? size2 : ctx.size
|
|
2467
|
+
});
|
|
2468
|
+
return /* @__PURE__ */ jsx48(
|
|
2469
|
+
"div",
|
|
2271
2470
|
{
|
|
2272
|
-
className:
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
),
|
|
2276
|
-
onClick: ctx == null ? void 0 : ctx.close,
|
|
2277
|
-
slot: "dismiss-button",
|
|
2278
|
-
children: /* @__PURE__ */ jsx46("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx46(
|
|
2279
|
-
"path",
|
|
2280
|
-
{
|
|
2281
|
-
fillRule: "evenodd",
|
|
2282
|
-
clipRule: "evenodd",
|
|
2283
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
2284
|
-
}
|
|
2285
|
-
) })
|
|
2471
|
+
className: cn28("[grid-area:actions]", classNames3.actions),
|
|
2472
|
+
style: { "--i": 2 },
|
|
2473
|
+
children
|
|
2286
2474
|
}
|
|
2287
2475
|
);
|
|
2288
2476
|
};
|
|
2289
|
-
|
|
2477
|
+
|
|
2478
|
+
// src/Drawer/DrawerContent.tsx
|
|
2479
|
+
import { cn as cn29, useClassNames as useClassNames27 } from "@marigold/system";
|
|
2480
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
2481
|
+
var DrawerContent = ({
|
|
2290
2482
|
variant,
|
|
2291
2483
|
size: size2,
|
|
2292
|
-
|
|
2293
|
-
|
|
2484
|
+
children
|
|
2485
|
+
}) => {
|
|
2486
|
+
const ctx = useDrawerContext();
|
|
2487
|
+
const classNames3 = useClassNames27({
|
|
2488
|
+
component: "Drawer",
|
|
2489
|
+
variant: variant != null ? variant : ctx.variant,
|
|
2490
|
+
size: size2 != null ? size2 : ctx.size
|
|
2491
|
+
});
|
|
2492
|
+
return /* @__PURE__ */ jsx49(
|
|
2493
|
+
"div",
|
|
2494
|
+
{
|
|
2495
|
+
className: cn29("[grid-area:content]", classNames3.content),
|
|
2496
|
+
style: { "--i": 1 },
|
|
2497
|
+
children
|
|
2498
|
+
}
|
|
2499
|
+
);
|
|
2500
|
+
};
|
|
2501
|
+
|
|
2502
|
+
// src/Drawer/DrawerModal.tsx
|
|
2503
|
+
import { cn as cn30, useSmallScreen as useSmallScreen2 } from "@marigold/system";
|
|
2504
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
2505
|
+
var DrawerModal = ({
|
|
2506
|
+
children,
|
|
2507
|
+
className,
|
|
2294
2508
|
...props
|
|
2295
2509
|
}) => {
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
const children = typeof props.children === "function" ? props.children({
|
|
2300
|
-
close: (_a = state == null ? void 0 : state.close) != null ? _a : () => {
|
|
2301
|
-
}
|
|
2302
|
-
}) : props.children;
|
|
2303
|
-
return /* @__PURE__ */ jsxs16(
|
|
2304
|
-
Dialog,
|
|
2510
|
+
const isSmallScreen = useSmallScreen2();
|
|
2511
|
+
return isSmallScreen ? /* @__PURE__ */ jsx50(_Modal, { children }) : /* @__PURE__ */ jsx50(
|
|
2512
|
+
NonModal,
|
|
2305
2513
|
{
|
|
2306
2514
|
...props,
|
|
2307
|
-
className:
|
|
2308
|
-
|
|
2309
|
-
"grid [grid-template-areas:'title'_'content'_'actions']",
|
|
2310
|
-
classNames3.container
|
|
2311
|
-
),
|
|
2312
|
-
children: [
|
|
2313
|
-
closeButton && /* @__PURE__ */ jsx46(CloseButton, { className: classNames3.closeButton }),
|
|
2314
|
-
children
|
|
2315
|
-
]
|
|
2515
|
+
className: cn30("fixed top-0 right-0 bottom-0", className),
|
|
2516
|
+
children
|
|
2316
2517
|
}
|
|
2317
2518
|
);
|
|
2318
2519
|
};
|
|
2319
|
-
_Dialog.Trigger = _DialogTrigger;
|
|
2320
|
-
_Dialog.Title = DialogTitle;
|
|
2321
|
-
_Dialog.Content = DialogContent;
|
|
2322
|
-
_Dialog.Actions = DialogActions;
|
|
2323
2520
|
|
|
2324
|
-
// src/
|
|
2325
|
-
import {
|
|
2326
|
-
import { cn as
|
|
2327
|
-
import { jsx as
|
|
2328
|
-
var
|
|
2329
|
-
const
|
|
2330
|
-
|
|
2521
|
+
// src/Drawer/DrawerTitle.tsx
|
|
2522
|
+
import { Header as Header3, Heading as Heading3 } from "react-aria-components";
|
|
2523
|
+
import { cn as cn31, useClassNames as useClassNames28 } from "@marigold/system";
|
|
2524
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2525
|
+
var DrawerTitle = ({ variant, size: size2, children }) => {
|
|
2526
|
+
const ctx = useDrawerContext();
|
|
2527
|
+
const classNames3 = useClassNames28({
|
|
2528
|
+
component: "Drawer",
|
|
2529
|
+
variant: variant != null ? variant : ctx.variant,
|
|
2530
|
+
size: size2 != null ? size2 : ctx.size
|
|
2531
|
+
});
|
|
2532
|
+
return /* @__PURE__ */ jsx51(
|
|
2533
|
+
Header3,
|
|
2534
|
+
{
|
|
2535
|
+
className: cn31("[grid-area:title]", classNames3.header),
|
|
2536
|
+
style: { "--i": 0 },
|
|
2537
|
+
children: /* @__PURE__ */ jsx51(Heading3, { slot: "title", level: 2, className: classNames3.title, children })
|
|
2538
|
+
}
|
|
2539
|
+
);
|
|
2331
2540
|
};
|
|
2332
2541
|
|
|
2542
|
+
// src/Drawer/DrawerTrigger.tsx
|
|
2543
|
+
import { DialogTrigger as DialogTrigger2 } from "react-aria-components";
|
|
2544
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2545
|
+
var DrawerTrigger = ({
|
|
2546
|
+
open,
|
|
2547
|
+
children,
|
|
2548
|
+
...props
|
|
2549
|
+
}) => /* @__PURE__ */ jsx52(DialogTrigger2, { isOpen: open, ...props, children });
|
|
2550
|
+
|
|
2551
|
+
// src/Drawer/Drawer.tsx
|
|
2552
|
+
import { jsx as jsx53, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2553
|
+
var Drawer = ({
|
|
2554
|
+
children,
|
|
2555
|
+
variant,
|
|
2556
|
+
size: size2,
|
|
2557
|
+
open,
|
|
2558
|
+
keyboardDismissable,
|
|
2559
|
+
closeButton,
|
|
2560
|
+
role = "complementary",
|
|
2561
|
+
...props
|
|
2562
|
+
}) => {
|
|
2563
|
+
const ref = useRef(null);
|
|
2564
|
+
const classNames3 = useClassNames29({ component: "Drawer", variant, size: size2 });
|
|
2565
|
+
const ctx = useContext11(OverlayTriggerStateContext3);
|
|
2566
|
+
const isSmallScreen = useSmallScreen3();
|
|
2567
|
+
const landmarkAria = useLandmark({ ...props, role }, ref);
|
|
2568
|
+
const landmarkProps = isSmallScreen ? {} : landmarkAria.landmarkProps;
|
|
2569
|
+
return /* @__PURE__ */ jsx53(
|
|
2570
|
+
DrawerModal,
|
|
2571
|
+
{
|
|
2572
|
+
className: classNames3.overlay,
|
|
2573
|
+
open,
|
|
2574
|
+
keyboardDismissable,
|
|
2575
|
+
children: /* @__PURE__ */ jsx53(DrawerContext.Provider, { value: { variant, size: size2 }, children: /* @__PURE__ */ jsxs17(
|
|
2576
|
+
Dialog2,
|
|
2577
|
+
{
|
|
2578
|
+
...props,
|
|
2579
|
+
...landmarkProps,
|
|
2580
|
+
className: cn32(
|
|
2581
|
+
"h-(--visual-viewport-height) outline-none",
|
|
2582
|
+
'grid [grid-template-areas:"title"_"content"_"actions"]',
|
|
2583
|
+
classNames3.container
|
|
2584
|
+
),
|
|
2585
|
+
children: [
|
|
2586
|
+
closeButton && /* @__PURE__ */ jsx53(
|
|
2587
|
+
CloseButton,
|
|
2588
|
+
{
|
|
2589
|
+
"aria-label": "dismiss drawer",
|
|
2590
|
+
style: { "--i": 0 },
|
|
2591
|
+
className: classNames3.closeButton,
|
|
2592
|
+
onPress: ctx == null ? void 0 : ctx.close
|
|
2593
|
+
}
|
|
2594
|
+
),
|
|
2595
|
+
children
|
|
2596
|
+
]
|
|
2597
|
+
}
|
|
2598
|
+
) })
|
|
2599
|
+
}
|
|
2600
|
+
);
|
|
2601
|
+
};
|
|
2602
|
+
Drawer.Trigger = DrawerTrigger;
|
|
2603
|
+
Drawer.Title = DrawerTitle;
|
|
2604
|
+
Drawer.Content = DrawerContent;
|
|
2605
|
+
Drawer.Actions = DrawerActions;
|
|
2606
|
+
|
|
2333
2607
|
// src/Footer/Footer.tsx
|
|
2334
|
-
import { useClassNames as
|
|
2335
|
-
import { jsx as
|
|
2608
|
+
import { useClassNames as useClassNames30 } from "@marigold/system";
|
|
2609
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
2336
2610
|
var Footer = ({ children, variant, size: size2, ...props }) => {
|
|
2337
|
-
const classNames3 =
|
|
2338
|
-
return /* @__PURE__ */
|
|
2611
|
+
const classNames3 = useClassNames30({ component: "Footer", variant, size: size2 });
|
|
2612
|
+
return /* @__PURE__ */ jsx54("footer", { ...props, className: classNames3, children });
|
|
2339
2613
|
};
|
|
2340
2614
|
|
|
2341
2615
|
// src/Form/Form.tsx
|
|
2342
2616
|
import { Form } from "react-aria-components";
|
|
2617
|
+
import { cn as cn33, maxWidth as twMaxWidth } from "@marigold/system";
|
|
2618
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
2619
|
+
var _Form = ({ unstyled, maxWidth = "full", ...props }) => /* @__PURE__ */ jsx55(
|
|
2620
|
+
Form,
|
|
2621
|
+
{
|
|
2622
|
+
...props,
|
|
2623
|
+
className: cn33(twMaxWidth[maxWidth], unstyled && "contents")
|
|
2624
|
+
}
|
|
2625
|
+
);
|
|
2343
2626
|
|
|
2344
2627
|
// src/Grid/Grid.tsx
|
|
2345
|
-
import { cn as
|
|
2628
|
+
import { cn as cn34, gapSpace as gapSpace6, height as twHeight } from "@marigold/system";
|
|
2346
2629
|
|
|
2347
2630
|
// src/Grid/GridArea.tsx
|
|
2348
|
-
import { jsx as
|
|
2349
|
-
var GridArea = ({ name, children }) => /* @__PURE__ */
|
|
2631
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
2632
|
+
var GridArea = ({ name, children }) => /* @__PURE__ */ jsx56("div", { style: { gridArea: name }, children });
|
|
2350
2633
|
|
|
2351
2634
|
// src/Grid/Grid.tsx
|
|
2352
|
-
import { jsx as
|
|
2635
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
2353
2636
|
var parseGridAreas = (areas) => areas.map((area) => `"${area}"`).join("\n");
|
|
2354
2637
|
var parseTemplateValue = (values) => values.map((val) => typeof val === "number" ? `${val}fr` : val).join(" ");
|
|
2355
2638
|
var Grid = ({
|
|
2356
2639
|
children,
|
|
2357
|
-
areas,
|
|
2358
|
-
columns,
|
|
2359
|
-
rows,
|
|
2360
|
-
height = "auto",
|
|
2361
|
-
space = 0,
|
|
2640
|
+
areas,
|
|
2641
|
+
columns,
|
|
2642
|
+
rows,
|
|
2643
|
+
height = "auto",
|
|
2644
|
+
space = 0,
|
|
2645
|
+
...props
|
|
2646
|
+
}) => {
|
|
2647
|
+
return /* @__PURE__ */ jsx57(
|
|
2648
|
+
"div",
|
|
2649
|
+
{
|
|
2650
|
+
className: cn34("grid", gapSpace6[space], twHeight[height]),
|
|
2651
|
+
style: {
|
|
2652
|
+
gridTemplateAreas: parseGridAreas(areas),
|
|
2653
|
+
gridTemplateColumns: parseTemplateValue(columns),
|
|
2654
|
+
gridTemplateRows: parseTemplateValue(rows)
|
|
2655
|
+
},
|
|
2656
|
+
...props,
|
|
2657
|
+
children
|
|
2658
|
+
}
|
|
2659
|
+
);
|
|
2660
|
+
};
|
|
2661
|
+
Grid.Area = GridArea;
|
|
2662
|
+
|
|
2663
|
+
// src/Header/Header.tsx
|
|
2664
|
+
import { Header as Header4 } from "react-aria-components";
|
|
2665
|
+
import { useClassNames as useClassNames31 } from "@marigold/system";
|
|
2666
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
2667
|
+
var _Header = ({ variant, size: size2, ...props }) => {
|
|
2668
|
+
const classNames3 = useClassNames31({
|
|
2669
|
+
component: "Header",
|
|
2670
|
+
variant,
|
|
2671
|
+
size: size2
|
|
2672
|
+
});
|
|
2673
|
+
return /* @__PURE__ */ jsx58(Header4, { className: classNames3, ...props, children: props.children });
|
|
2674
|
+
};
|
|
2675
|
+
|
|
2676
|
+
// src/Headline/Headline.tsx
|
|
2677
|
+
import { Heading as Heading4 } from "react-aria-components";
|
|
2678
|
+
import {
|
|
2679
|
+
cn as cn35,
|
|
2680
|
+
ensureCssVar,
|
|
2681
|
+
textAlign,
|
|
2682
|
+
useClassNames as useClassNames32
|
|
2683
|
+
} from "@marigold/system";
|
|
2684
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
2685
|
+
var _Headline = ({
|
|
2686
|
+
variant,
|
|
2687
|
+
size: size2,
|
|
2688
|
+
children,
|
|
2689
|
+
align = "left",
|
|
2690
|
+
color,
|
|
2691
|
+
level = "1",
|
|
2362
2692
|
...props
|
|
2363
2693
|
}) => {
|
|
2364
|
-
|
|
2365
|
-
"
|
|
2694
|
+
const classNames3 = useClassNames32({
|
|
2695
|
+
component: "Headline",
|
|
2696
|
+
variant,
|
|
2697
|
+
size: size2 != null ? size2 : `level-${level}`
|
|
2698
|
+
});
|
|
2699
|
+
return /* @__PURE__ */ jsx59(
|
|
2700
|
+
Heading4,
|
|
2366
2701
|
{
|
|
2367
|
-
|
|
2368
|
-
style: {
|
|
2369
|
-
gridTemplateAreas: parseGridAreas(areas),
|
|
2370
|
-
gridTemplateColumns: parseTemplateValue(columns),
|
|
2371
|
-
gridTemplateRows: parseTemplateValue(rows)
|
|
2372
|
-
},
|
|
2702
|
+
level: Number(level),
|
|
2373
2703
|
...props,
|
|
2704
|
+
className: cn35(
|
|
2705
|
+
classNames3,
|
|
2706
|
+
"max-w-(--maxHeadlineWidth)",
|
|
2707
|
+
// possibly set by a <Container>
|
|
2708
|
+
textAlign[align]
|
|
2709
|
+
),
|
|
2710
|
+
style: { color: color && ensureCssVar(color, "color") },
|
|
2374
2711
|
children
|
|
2375
2712
|
}
|
|
2376
2713
|
);
|
|
2377
2714
|
};
|
|
2378
|
-
Grid.Area = GridArea;
|
|
2379
2715
|
|
|
2380
2716
|
// src/Image/Image.tsx
|
|
2381
2717
|
import {
|
|
2382
|
-
cn as
|
|
2718
|
+
cn as cn36,
|
|
2383
2719
|
objectFit,
|
|
2384
2720
|
objectPosition,
|
|
2385
|
-
useClassNames as
|
|
2721
|
+
useClassNames as useClassNames33
|
|
2386
2722
|
} from "@marigold/system";
|
|
2387
|
-
import { jsx as
|
|
2723
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
2388
2724
|
var Image = ({
|
|
2389
2725
|
variant,
|
|
2390
2726
|
size: size2,
|
|
@@ -2392,13 +2728,13 @@ var Image = ({
|
|
|
2392
2728
|
position: position2 = "none",
|
|
2393
2729
|
...props
|
|
2394
2730
|
}) => {
|
|
2395
|
-
const classNames3 =
|
|
2396
|
-
return /* @__PURE__ */
|
|
2731
|
+
const classNames3 = useClassNames33({ component: "Image", variant, size: size2 });
|
|
2732
|
+
return /* @__PURE__ */ jsx60(
|
|
2397
2733
|
"img",
|
|
2398
2734
|
{
|
|
2399
2735
|
...props,
|
|
2400
2736
|
alt: props.alt,
|
|
2401
|
-
className:
|
|
2737
|
+
className: cn36(
|
|
2402
2738
|
fit !== "none" && "h-full w-full",
|
|
2403
2739
|
classNames3,
|
|
2404
2740
|
objectFit[fit],
|
|
@@ -2409,8 +2745,8 @@ var Image = ({
|
|
|
2409
2745
|
};
|
|
2410
2746
|
|
|
2411
2747
|
// src/Inline/Inline.tsx
|
|
2412
|
-
import { alignment, cn as
|
|
2413
|
-
import { jsx as
|
|
2748
|
+
import { alignment, cn as cn37, gapSpace as gapSpace7 } from "@marigold/system";
|
|
2749
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
2414
2750
|
var Inline = ({
|
|
2415
2751
|
space = 0,
|
|
2416
2752
|
alignX,
|
|
@@ -2419,11 +2755,11 @@ var Inline = ({
|
|
|
2419
2755
|
...props
|
|
2420
2756
|
}) => {
|
|
2421
2757
|
var _a, _b, _c, _d;
|
|
2422
|
-
return /* @__PURE__ */
|
|
2758
|
+
return /* @__PURE__ */ jsx61(
|
|
2423
2759
|
"div",
|
|
2424
2760
|
{
|
|
2425
2761
|
...props,
|
|
2426
|
-
className:
|
|
2762
|
+
className: cn37(
|
|
2427
2763
|
"flex flex-wrap",
|
|
2428
2764
|
gapSpace7[space],
|
|
2429
2765
|
alignX && ((_b = (_a = alignment) == null ? void 0 : _a.horizontal) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -2435,19 +2771,19 @@ var Inline = ({
|
|
|
2435
2771
|
};
|
|
2436
2772
|
|
|
2437
2773
|
// src/DateField/DateField.tsx
|
|
2438
|
-
import { forwardRef as
|
|
2774
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
2439
2775
|
import { DateField } from "react-aria-components";
|
|
2440
2776
|
|
|
2441
2777
|
// src/DateField/DateInput.tsx
|
|
2442
2778
|
import { DateInput, Group } from "react-aria-components";
|
|
2443
|
-
import { useClassNames as
|
|
2779
|
+
import { useClassNames as useClassNames34 } from "@marigold/system";
|
|
2444
2780
|
|
|
2445
2781
|
// src/DateField/DateSegment.tsx
|
|
2446
2782
|
import { DateSegment } from "react-aria-components";
|
|
2447
|
-
import { cn as
|
|
2448
|
-
import { Fragment as Fragment4, jsx as
|
|
2783
|
+
import { cn as cn38 } from "@marigold/system";
|
|
2784
|
+
import { Fragment as Fragment4, jsx as jsx62, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2449
2785
|
var _DateSegment = ({ segment, ...props }) => {
|
|
2450
|
-
return /* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ jsx62(
|
|
2451
2787
|
DateSegment,
|
|
2452
2788
|
{
|
|
2453
2789
|
...props,
|
|
@@ -2455,37 +2791,37 @@ var _DateSegment = ({ segment, ...props }) => {
|
|
|
2455
2791
|
style: {
|
|
2456
2792
|
minWidth: segment.maxValue != null ? `${String(segment.maxValue).length}ch` : void 0
|
|
2457
2793
|
},
|
|
2458
|
-
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */
|
|
2459
|
-
/* @__PURE__ */
|
|
2794
|
+
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ jsxs18(Fragment4, { children: [
|
|
2795
|
+
/* @__PURE__ */ jsx62(
|
|
2460
2796
|
"span",
|
|
2461
2797
|
{
|
|
2462
2798
|
"aria-hidden": "true",
|
|
2463
|
-
className:
|
|
2799
|
+
className: cn38(
|
|
2464
2800
|
isPlaceholder ? "visible block" : "invisible hidden",
|
|
2465
2801
|
"pointer-events-none w-full text-center"
|
|
2466
2802
|
),
|
|
2467
2803
|
children: isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
|
|
2468
2804
|
}
|
|
2469
2805
|
),
|
|
2470
|
-
/* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ jsx62("span", { children: isPlaceholder ? "" : segment.type === "month" || segment.type === "day" ? segment.text.padStart(2, "0") : text })
|
|
2471
2807
|
] })
|
|
2472
2808
|
}
|
|
2473
2809
|
);
|
|
2474
2810
|
};
|
|
2475
2811
|
|
|
2476
2812
|
// src/DateField/DateInput.tsx
|
|
2477
|
-
import { jsx as
|
|
2813
|
+
import { jsx as jsx63, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2478
2814
|
var _DateInput = ({ variant, size: size2, action, ...props }) => {
|
|
2479
|
-
const classNames3 =
|
|
2480
|
-
return /* @__PURE__ */
|
|
2481
|
-
/* @__PURE__ */
|
|
2815
|
+
const classNames3 = useClassNames34({ component: "DateField", variant, size: size2 });
|
|
2816
|
+
return /* @__PURE__ */ jsxs19(Group, { className: classNames3.field, children: [
|
|
2817
|
+
/* @__PURE__ */ jsx63(DateInput, { className: "flex flex-1 items-center", ...props, children: (segment) => /* @__PURE__ */ jsx63(_DateSegment, { className: classNames3.segment, segment }) }),
|
|
2482
2818
|
action ? action : null
|
|
2483
2819
|
] });
|
|
2484
2820
|
};
|
|
2485
2821
|
|
|
2486
2822
|
// src/DateField/DateField.tsx
|
|
2487
|
-
import { jsx as
|
|
2488
|
-
var _DateField =
|
|
2823
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
2824
|
+
var _DateField = forwardRef19(
|
|
2489
2825
|
({
|
|
2490
2826
|
variant,
|
|
2491
2827
|
size: size2,
|
|
@@ -2503,7 +2839,7 @@ var _DateField = forwardRef16(
|
|
|
2503
2839
|
isRequired: required,
|
|
2504
2840
|
...rest
|
|
2505
2841
|
};
|
|
2506
|
-
return /* @__PURE__ */
|
|
2842
|
+
return /* @__PURE__ */ jsx64(
|
|
2507
2843
|
FieldBase,
|
|
2508
2844
|
{
|
|
2509
2845
|
as: DateField,
|
|
@@ -2511,7 +2847,7 @@ var _DateField = forwardRef16(
|
|
|
2511
2847
|
size: size2,
|
|
2512
2848
|
ref,
|
|
2513
2849
|
...props,
|
|
2514
|
-
children: /* @__PURE__ */
|
|
2850
|
+
children: /* @__PURE__ */ jsx64(_DateInput, { action })
|
|
2515
2851
|
}
|
|
2516
2852
|
);
|
|
2517
2853
|
}
|
|
@@ -2520,7 +2856,7 @@ var _DateField = forwardRef16(
|
|
|
2520
2856
|
// src/Calendar/Calendar.tsx
|
|
2521
2857
|
import { useState } from "react";
|
|
2522
2858
|
import { Calendar } from "react-aria-components";
|
|
2523
|
-
import { cn as
|
|
2859
|
+
import { cn as cn42, useClassNames as useClassNames39 } from "@marigold/system";
|
|
2524
2860
|
|
|
2525
2861
|
// src/Calendar/CalendarGrid.tsx
|
|
2526
2862
|
import {
|
|
@@ -2528,25 +2864,25 @@ import {
|
|
|
2528
2864
|
CalendarGrid,
|
|
2529
2865
|
CalendarGridBody
|
|
2530
2866
|
} from "react-aria-components";
|
|
2531
|
-
import { cn as
|
|
2867
|
+
import { cn as cn39, useClassNames as useClassNames36 } from "@marigold/system";
|
|
2532
2868
|
|
|
2533
2869
|
// src/Calendar/CalendarGridHeader.tsx
|
|
2534
2870
|
import { startOfWeek, today } from "@internationalized/date";
|
|
2535
|
-
import { useContext as
|
|
2871
|
+
import { useContext as useContext12, useMemo as useMemo2 } from "react";
|
|
2536
2872
|
import { CalendarStateContext } from "react-aria-components";
|
|
2537
2873
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
2538
2874
|
import { useDateFormatter, useLocale } from "@react-aria/i18n";
|
|
2539
|
-
import { useClassNames as
|
|
2540
|
-
import { jsx as
|
|
2875
|
+
import { useClassNames as useClassNames35 } from "@marigold/system";
|
|
2876
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
2541
2877
|
function CalendarGridHeader(props) {
|
|
2542
|
-
const state =
|
|
2878
|
+
const state = useContext12(CalendarStateContext);
|
|
2543
2879
|
const { headerProps } = useCalendarGrid(props, state);
|
|
2544
2880
|
const { locale } = useLocale();
|
|
2545
2881
|
const dayFormatter = useDateFormatter({
|
|
2546
2882
|
weekday: "short",
|
|
2547
2883
|
timeZone: state.timeZone
|
|
2548
2884
|
});
|
|
2549
|
-
const weekDays =
|
|
2885
|
+
const weekDays = useMemo2(() => {
|
|
2550
2886
|
const weekStart = startOfWeek(today(state.timeZone), locale);
|
|
2551
2887
|
return [...new Array(7).keys()].map((index2) => {
|
|
2552
2888
|
const date = weekStart.add({ days: index2 });
|
|
@@ -2554,21 +2890,21 @@ function CalendarGridHeader(props) {
|
|
|
2554
2890
|
return dayFormatter.format(dateDay);
|
|
2555
2891
|
});
|
|
2556
2892
|
}, [locale, state.timeZone, dayFormatter]);
|
|
2557
|
-
const classNames3 =
|
|
2558
|
-
return /* @__PURE__ */
|
|
2893
|
+
const classNames3 = useClassNames35({ component: "Calendar" });
|
|
2894
|
+
return /* @__PURE__ */ jsx65("thead", { ...headerProps, children: /* @__PURE__ */ jsx65("tr", { children: weekDays.map((day, index2) => /* @__PURE__ */ jsx65("th", { className: classNames3.calendarHeader, children: day.substring(0, 2) }, index2)) }) });
|
|
2559
2895
|
}
|
|
2560
2896
|
|
|
2561
2897
|
// src/Calendar/CalendarGrid.tsx
|
|
2562
|
-
import { jsx as
|
|
2898
|
+
import { jsx as jsx66, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2563
2899
|
var _CalendarGrid = () => {
|
|
2564
|
-
const classNames3 =
|
|
2565
|
-
return /* @__PURE__ */
|
|
2566
|
-
/* @__PURE__ */
|
|
2567
|
-
/* @__PURE__ */
|
|
2900
|
+
const classNames3 = useClassNames36({ component: "Calendar" });
|
|
2901
|
+
return /* @__PURE__ */ jsxs20(CalendarGrid, { className: classNames3.calendarGrid, children: [
|
|
2902
|
+
/* @__PURE__ */ jsx66(CalendarGridHeader, {}),
|
|
2903
|
+
/* @__PURE__ */ jsx66(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx66(
|
|
2568
2904
|
CalendarCell,
|
|
2569
2905
|
{
|
|
2570
2906
|
date,
|
|
2571
|
-
className:
|
|
2907
|
+
className: cn39(
|
|
2572
2908
|
"flex h-[30px] w-[30px] cursor-pointer items-center justify-center rounded-full p-[5.3px] text-sm font-normal aria-disabled:cursor-default",
|
|
2573
2909
|
classNames3.calendarCell
|
|
2574
2910
|
)
|
|
@@ -2578,9 +2914,9 @@ var _CalendarGrid = () => {
|
|
|
2578
2914
|
};
|
|
2579
2915
|
|
|
2580
2916
|
// src/Calendar/CalendarListBox.tsx
|
|
2581
|
-
import { useContext as
|
|
2917
|
+
import { useContext as useContext13 } from "react";
|
|
2582
2918
|
import { CalendarStateContext as CalendarStateContext2 } from "react-aria-components";
|
|
2583
|
-
import { cn as
|
|
2919
|
+
import { cn as cn40, useClassNames as useClassNames37 } from "@marigold/system";
|
|
2584
2920
|
|
|
2585
2921
|
// src/Calendar/useFormattedMonths.tsx
|
|
2586
2922
|
import { useDateFormatter as useDateFormatter2 } from "@react-aria/i18n";
|
|
@@ -2599,60 +2935,60 @@ function useFormattedMonths(timeZone, focusedDate) {
|
|
|
2599
2935
|
}
|
|
2600
2936
|
|
|
2601
2937
|
// src/Calendar/CalendarListBox.tsx
|
|
2602
|
-
import { jsx as
|
|
2938
|
+
import { jsx as jsx67, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2603
2939
|
function CalendarListBox({
|
|
2604
2940
|
type,
|
|
2605
2941
|
isDisabled,
|
|
2606
2942
|
setSelectedDropdown
|
|
2607
2943
|
}) {
|
|
2608
|
-
const state =
|
|
2944
|
+
const state = useContext13(CalendarStateContext2);
|
|
2609
2945
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
2610
2946
|
const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
2611
|
-
const { select: selectClassNames } =
|
|
2612
|
-
return /* @__PURE__ */
|
|
2947
|
+
const { select: selectClassNames } = useClassNames37({ component: "Select" });
|
|
2948
|
+
return /* @__PURE__ */ jsxs21(
|
|
2613
2949
|
"button",
|
|
2614
2950
|
{
|
|
2615
2951
|
disabled: isDisabled,
|
|
2616
2952
|
onClick: () => setSelectedDropdown(type),
|
|
2617
|
-
className:
|
|
2953
|
+
className: cn40(buttonStyles, selectClassNames),
|
|
2618
2954
|
"data-testid": type,
|
|
2619
2955
|
children: [
|
|
2620
2956
|
type === "month" ? months[state.focusedDate.month - 1].substring(0, 3) : state.focusedDate.year,
|
|
2621
|
-
/* @__PURE__ */
|
|
2957
|
+
/* @__PURE__ */ jsx67(ChevronDown, {})
|
|
2622
2958
|
]
|
|
2623
2959
|
}
|
|
2624
2960
|
);
|
|
2625
2961
|
}
|
|
2626
2962
|
|
|
2627
2963
|
// src/Calendar/MonthControls.tsx
|
|
2628
|
-
import { cn as
|
|
2629
|
-
import { jsx as
|
|
2964
|
+
import { cn as cn41, useClassNames as useClassNames38 } from "@marigold/system";
|
|
2965
|
+
import { jsx as jsx68, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2630
2966
|
function MonthControls() {
|
|
2631
|
-
const classNames3 =
|
|
2632
|
-
return /* @__PURE__ */
|
|
2967
|
+
const classNames3 = useClassNames38({ component: "Calendar" });
|
|
2968
|
+
return /* @__PURE__ */ jsxs22(
|
|
2633
2969
|
"div",
|
|
2634
2970
|
{
|
|
2635
|
-
className:
|
|
2971
|
+
className: cn41(
|
|
2636
2972
|
"flex w-full flex-nowrap justify-end gap-[10px] [&_button]:px-2 [&_button]:py-1 [&_button:disabled]:cursor-not-allowed",
|
|
2637
2973
|
classNames3.calendarControllers
|
|
2638
2974
|
),
|
|
2639
2975
|
children: [
|
|
2640
|
-
/* @__PURE__ */
|
|
2976
|
+
/* @__PURE__ */ jsx68(
|
|
2641
2977
|
IconButton,
|
|
2642
2978
|
{
|
|
2643
|
-
className:
|
|
2979
|
+
className: cn41("inline-flex items-center justify-center gap-[0.5ch]"),
|
|
2644
2980
|
variant: "navigation",
|
|
2645
2981
|
slot: "previous",
|
|
2646
|
-
children: /* @__PURE__ */
|
|
2982
|
+
children: /* @__PURE__ */ jsx68(ChevronLeft, {})
|
|
2647
2983
|
}
|
|
2648
2984
|
),
|
|
2649
|
-
/* @__PURE__ */
|
|
2985
|
+
/* @__PURE__ */ jsx68(
|
|
2650
2986
|
IconButton,
|
|
2651
2987
|
{
|
|
2652
|
-
className:
|
|
2988
|
+
className: cn41("inline-flex items-center justify-center gap-[0.5ch]"),
|
|
2653
2989
|
variant: "navigation",
|
|
2654
2990
|
slot: "next",
|
|
2655
|
-
children: /* @__PURE__ */
|
|
2991
|
+
children: /* @__PURE__ */ jsx68(ChevronRight, {})
|
|
2656
2992
|
}
|
|
2657
2993
|
)
|
|
2658
2994
|
]
|
|
@@ -2662,24 +2998,24 @@ function MonthControls() {
|
|
|
2662
2998
|
var MonthControls_default = MonthControls;
|
|
2663
2999
|
|
|
2664
3000
|
// src/Calendar/MonthListBox.tsx
|
|
2665
|
-
import { useContext as
|
|
3001
|
+
import { useContext as useContext14 } from "react";
|
|
2666
3002
|
import { CalendarStateContext as CalendarStateContext3 } from "react-aria-components";
|
|
2667
|
-
import { jsx as
|
|
3003
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
2668
3004
|
var MonthListBox = ({ setSelectedDropdown }) => {
|
|
2669
|
-
const state =
|
|
3005
|
+
const state = useContext14(CalendarStateContext3);
|
|
2670
3006
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
2671
3007
|
let onChange2 = (index2) => {
|
|
2672
3008
|
let value = Number(index2) + 1;
|
|
2673
3009
|
let date = state.focusedDate.set({ month: value });
|
|
2674
3010
|
state.setFocusedDate(date);
|
|
2675
3011
|
};
|
|
2676
|
-
return /* @__PURE__ */
|
|
3012
|
+
return /* @__PURE__ */ jsx69(
|
|
2677
3013
|
"ul",
|
|
2678
3014
|
{
|
|
2679
3015
|
"data-testid": "monthOptions",
|
|
2680
3016
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
2681
3017
|
children: months.map((month, index2) => {
|
|
2682
|
-
return /* @__PURE__ */
|
|
3018
|
+
return /* @__PURE__ */ jsx69("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx69(
|
|
2683
3019
|
_Button,
|
|
2684
3020
|
{
|
|
2685
3021
|
slot: "previous",
|
|
@@ -2701,15 +3037,15 @@ var MonthListBox_default = MonthListBox;
|
|
|
2701
3037
|
|
|
2702
3038
|
// src/Calendar/YearListBox.tsx
|
|
2703
3039
|
import {
|
|
2704
|
-
useContext as
|
|
3040
|
+
useContext as useContext15,
|
|
2705
3041
|
useEffect,
|
|
2706
|
-
useRef
|
|
3042
|
+
useRef as useRef2
|
|
2707
3043
|
} from "react";
|
|
2708
3044
|
import { CalendarStateContext as CalendarStateContext4 } from "react-aria-components";
|
|
2709
3045
|
import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
|
|
2710
|
-
import { jsx as
|
|
3046
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
2711
3047
|
var YearListBox = ({ setSelectedDropdown }) => {
|
|
2712
|
-
const state =
|
|
3048
|
+
const state = useContext15(CalendarStateContext4);
|
|
2713
3049
|
const years = [];
|
|
2714
3050
|
let formatter = useDateFormatter3({
|
|
2715
3051
|
year: "numeric",
|
|
@@ -2722,7 +3058,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
2722
3058
|
formatted: formatter.format(date.toDate(state.timeZone))
|
|
2723
3059
|
});
|
|
2724
3060
|
}
|
|
2725
|
-
const activeButtonRef =
|
|
3061
|
+
const activeButtonRef = useRef2(null);
|
|
2726
3062
|
useEffect(() => {
|
|
2727
3063
|
if (activeButtonRef.current) {
|
|
2728
3064
|
const activeButton = activeButtonRef.current;
|
|
@@ -2737,19 +3073,19 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
2737
3073
|
let date = years[index2].value;
|
|
2738
3074
|
state.setFocusedDate(date);
|
|
2739
3075
|
};
|
|
2740
|
-
return /* @__PURE__ */
|
|
3076
|
+
return /* @__PURE__ */ jsx70(
|
|
2741
3077
|
"ul",
|
|
2742
3078
|
{
|
|
2743
3079
|
"data-testid": "yearOptions",
|
|
2744
3080
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
2745
3081
|
children: years.map((year, index2) => {
|
|
2746
3082
|
const isActive = +year.formatted === state.focusedDate.year;
|
|
2747
|
-
return /* @__PURE__ */
|
|
3083
|
+
return /* @__PURE__ */ jsx70("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx70(
|
|
2748
3084
|
"div",
|
|
2749
3085
|
{
|
|
2750
3086
|
ref: isActive ? activeButtonRef : null,
|
|
2751
3087
|
style: { height: "100%", width: "100%" },
|
|
2752
|
-
children: /* @__PURE__ */
|
|
3088
|
+
children: /* @__PURE__ */ jsx70(
|
|
2753
3089
|
_Button,
|
|
2754
3090
|
{
|
|
2755
3091
|
slot: "previous",
|
|
@@ -2774,7 +3110,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
2774
3110
|
var YearListBox_default = YearListBox;
|
|
2775
3111
|
|
|
2776
3112
|
// src/Calendar/Calendar.tsx
|
|
2777
|
-
import { Fragment as Fragment5, jsx as
|
|
3113
|
+
import { Fragment as Fragment5, jsx as jsx71, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2778
3114
|
var _Calendar = ({
|
|
2779
3115
|
disabled,
|
|
2780
3116
|
readOnly,
|
|
@@ -2789,24 +3125,24 @@ var _Calendar = ({
|
|
|
2789
3125
|
isDateUnavailable: dateUnavailable,
|
|
2790
3126
|
...rest
|
|
2791
3127
|
};
|
|
2792
|
-
const classNames3 =
|
|
3128
|
+
const classNames3 = useClassNames39({ component: "Calendar" });
|
|
2793
3129
|
const [selectedDropdown, setSelectedDropdown] = useState();
|
|
2794
3130
|
const ViewMap = {
|
|
2795
|
-
month: /* @__PURE__ */
|
|
2796
|
-
year: /* @__PURE__ */
|
|
3131
|
+
month: /* @__PURE__ */ jsx71(MonthListBox_default, { setSelectedDropdown }),
|
|
3132
|
+
year: /* @__PURE__ */ jsx71(YearListBox_default, { setSelectedDropdown })
|
|
2797
3133
|
};
|
|
2798
|
-
return /* @__PURE__ */
|
|
3134
|
+
return /* @__PURE__ */ jsx71(
|
|
2799
3135
|
Calendar,
|
|
2800
3136
|
{
|
|
2801
|
-
className:
|
|
3137
|
+
className: cn42(
|
|
2802
3138
|
"flex min-h-[350px] w-fit flex-col rounded-xs p-4",
|
|
2803
3139
|
classNames3.calendar
|
|
2804
3140
|
),
|
|
2805
3141
|
...props,
|
|
2806
|
-
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */
|
|
2807
|
-
/* @__PURE__ */
|
|
2808
|
-
/* @__PURE__ */
|
|
2809
|
-
/* @__PURE__ */
|
|
3142
|
+
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ jsxs23(Fragment5, { children: [
|
|
3143
|
+
/* @__PURE__ */ jsxs23("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
3144
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex w-fit gap-4", children: [
|
|
3145
|
+
/* @__PURE__ */ jsx71(
|
|
2810
3146
|
CalendarListBox,
|
|
2811
3147
|
{
|
|
2812
3148
|
type: "month",
|
|
@@ -2814,7 +3150,7 @@ var _Calendar = ({
|
|
|
2814
3150
|
setSelectedDropdown
|
|
2815
3151
|
}
|
|
2816
3152
|
),
|
|
2817
|
-
/* @__PURE__ */
|
|
3153
|
+
/* @__PURE__ */ jsx71(
|
|
2818
3154
|
CalendarListBox,
|
|
2819
3155
|
{
|
|
2820
3156
|
type: "year",
|
|
@@ -2823,9 +3159,9 @@ var _Calendar = ({
|
|
|
2823
3159
|
}
|
|
2824
3160
|
)
|
|
2825
3161
|
] }),
|
|
2826
|
-
/* @__PURE__ */
|
|
3162
|
+
/* @__PURE__ */ jsx71(MonthControls_default, {})
|
|
2827
3163
|
] }),
|
|
2828
|
-
/* @__PURE__ */
|
|
3164
|
+
/* @__PURE__ */ jsx71(_CalendarGrid, {})
|
|
2829
3165
|
] })
|
|
2830
3166
|
}
|
|
2831
3167
|
);
|
|
@@ -2833,9 +3169,9 @@ var _Calendar = ({
|
|
|
2833
3169
|
|
|
2834
3170
|
// src/DatePicker/DatePicker.tsx
|
|
2835
3171
|
import React6 from "react";
|
|
2836
|
-
import { DatePicker, Dialog as
|
|
2837
|
-
import { useClassNames as
|
|
2838
|
-
import { jsx as
|
|
3172
|
+
import { DatePicker, Dialog as Dialog3 } from "react-aria-components";
|
|
3173
|
+
import { useClassNames as useClassNames40 } from "@marigold/system";
|
|
3174
|
+
import { jsx as jsx72, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2839
3175
|
var _DatePicker = React6.forwardRef(
|
|
2840
3176
|
({
|
|
2841
3177
|
dateUnavailable,
|
|
@@ -2859,12 +3195,12 @@ var _DatePicker = React6.forwardRef(
|
|
|
2859
3195
|
granularity,
|
|
2860
3196
|
...rest
|
|
2861
3197
|
};
|
|
2862
|
-
const classNames3 =
|
|
3198
|
+
const classNames3 = useClassNames40({
|
|
2863
3199
|
component: "DatePicker",
|
|
2864
3200
|
size: size2,
|
|
2865
3201
|
variant
|
|
2866
3202
|
});
|
|
2867
|
-
return /* @__PURE__ */
|
|
3203
|
+
return /* @__PURE__ */ jsxs24(
|
|
2868
3204
|
FieldBase,
|
|
2869
3205
|
{
|
|
2870
3206
|
as: DatePicker,
|
|
@@ -2873,10 +3209,10 @@ var _DatePicker = React6.forwardRef(
|
|
|
2873
3209
|
...props,
|
|
2874
3210
|
ref,
|
|
2875
3211
|
children: [
|
|
2876
|
-
/* @__PURE__ */
|
|
3212
|
+
/* @__PURE__ */ jsx72(
|
|
2877
3213
|
_DateInput,
|
|
2878
3214
|
{
|
|
2879
|
-
action: /* @__PURE__ */
|
|
3215
|
+
action: /* @__PURE__ */ jsx72(IconButton, { className: classNames3, children: /* @__PURE__ */ jsx72(
|
|
2880
3216
|
"svg",
|
|
2881
3217
|
{
|
|
2882
3218
|
"data-testid": "action",
|
|
@@ -2884,12 +3220,12 @@ var _DatePicker = React6.forwardRef(
|
|
|
2884
3220
|
width: 24,
|
|
2885
3221
|
height: 24,
|
|
2886
3222
|
fill: "currentColor",
|
|
2887
|
-
children: /* @__PURE__ */
|
|
3223
|
+
children: /* @__PURE__ */ jsx72("path", { d: "M20.0906 19.2V6.6C20.0906 5.61 19.2806 4.8 18.2906 4.8H17.3906V3H15.5906V4.8H8.39062V3H6.59062V4.8H5.69063C4.69163 4.8 3.89962 5.61 3.89962 6.6L3.89062 19.2C3.89062 20.19 4.69163 21 5.69063 21H18.2906C19.2806 21 20.0906 20.19 20.0906 19.2ZM9.29062 11.1001H7.49061V12.9001H9.29062V11.1001ZM5.69062 8.40009H18.2906V6.60008H5.69062V8.40009ZM18.2906 10.2V19.2H5.69062V10.2H18.2906ZM14.6906 12.9001H16.4906V11.1001H14.6906V12.9001ZM12.8906 12.9001H11.0906V11.1001H12.8906V12.9001Z" })
|
|
2888
3224
|
}
|
|
2889
3225
|
) })
|
|
2890
3226
|
}
|
|
2891
3227
|
),
|
|
2892
|
-
/* @__PURE__ */
|
|
3228
|
+
/* @__PURE__ */ jsx72(_Popover, { children: /* @__PURE__ */ jsx72(Dialog3, { children: /* @__PURE__ */ jsx72(_Calendar, { disabled }) }) })
|
|
2893
3229
|
]
|
|
2894
3230
|
}
|
|
2895
3231
|
);
|
|
@@ -2898,16 +3234,16 @@ var _DatePicker = React6.forwardRef(
|
|
|
2898
3234
|
|
|
2899
3235
|
// src/Inset/Inset.tsx
|
|
2900
3236
|
import {
|
|
2901
|
-
cn as
|
|
3237
|
+
cn as cn43,
|
|
2902
3238
|
paddingSpace as paddingSpace2,
|
|
2903
3239
|
paddingSpaceX as paddingSpaceX2,
|
|
2904
3240
|
paddingSpaceY as paddingSpaceY2
|
|
2905
3241
|
} from "@marigold/system";
|
|
2906
|
-
import { jsx as
|
|
2907
|
-
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */
|
|
3242
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
3243
|
+
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx73(
|
|
2908
3244
|
"div",
|
|
2909
3245
|
{
|
|
2910
|
-
className:
|
|
3246
|
+
className: cn43(
|
|
2911
3247
|
space && paddingSpace2[space],
|
|
2912
3248
|
!space && spaceX && paddingSpaceX2[spaceX],
|
|
2913
3249
|
!space && spaceY && paddingSpaceY2[spaceY]
|
|
@@ -2917,38 +3253,38 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx64(
|
|
|
2917
3253
|
);
|
|
2918
3254
|
|
|
2919
3255
|
// src/Link/Link.tsx
|
|
2920
|
-
import { forwardRef as
|
|
3256
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
2921
3257
|
import { Link } from "react-aria-components";
|
|
2922
|
-
import { useClassNames as
|
|
2923
|
-
import { jsx as
|
|
2924
|
-
var _Link =
|
|
3258
|
+
import { useClassNames as useClassNames41 } from "@marigold/system";
|
|
3259
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
3260
|
+
var _Link = forwardRef20(
|
|
2925
3261
|
({ variant, size: size2, disabled, children, ...props }, ref) => {
|
|
2926
|
-
const classNames3 =
|
|
3262
|
+
const classNames3 = useClassNames41({
|
|
2927
3263
|
component: "Link",
|
|
2928
3264
|
variant,
|
|
2929
3265
|
size: size2
|
|
2930
3266
|
});
|
|
2931
|
-
return /* @__PURE__ */
|
|
3267
|
+
return /* @__PURE__ */ jsx74(Link, { ...props, ref, className: classNames3, isDisabled: disabled, children });
|
|
2932
3268
|
}
|
|
2933
3269
|
);
|
|
2934
3270
|
|
|
2935
3271
|
// src/List/List.tsx
|
|
2936
|
-
import { useClassNames as
|
|
3272
|
+
import { useClassNames as useClassNames42 } from "@marigold/system";
|
|
2937
3273
|
|
|
2938
3274
|
// src/List/Context.ts
|
|
2939
|
-
import { createContext as
|
|
2940
|
-
var ListContext =
|
|
2941
|
-
var useListContext = () =>
|
|
3275
|
+
import { createContext as createContext8, useContext as useContext16 } from "react";
|
|
3276
|
+
var ListContext = createContext8({});
|
|
3277
|
+
var useListContext = () => useContext16(ListContext);
|
|
2942
3278
|
|
|
2943
3279
|
// src/List/ListItem.tsx
|
|
2944
|
-
import { jsx as
|
|
3280
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
2945
3281
|
var ListItem = ({ children, ...props }) => {
|
|
2946
3282
|
const { classNames: classNames3 } = useListContext();
|
|
2947
|
-
return /* @__PURE__ */
|
|
3283
|
+
return /* @__PURE__ */ jsx75("li", { ...props, className: classNames3, children });
|
|
2948
3284
|
};
|
|
2949
3285
|
|
|
2950
3286
|
// src/List/List.tsx
|
|
2951
|
-
import { jsx as
|
|
3287
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
2952
3288
|
var List = ({
|
|
2953
3289
|
as = "ul",
|
|
2954
3290
|
children,
|
|
@@ -2957,38 +3293,38 @@ var List = ({
|
|
|
2957
3293
|
...props
|
|
2958
3294
|
}) => {
|
|
2959
3295
|
const Component2 = as;
|
|
2960
|
-
const classNames3 =
|
|
2961
|
-
return /* @__PURE__ */
|
|
3296
|
+
const classNames3 = useClassNames42({ component: "List", variant, size: size2 });
|
|
3297
|
+
return /* @__PURE__ */ jsx76(Component2, { ...props, className: classNames3[as], children: /* @__PURE__ */ jsx76(ListContext.Provider, { value: { classNames: classNames3.item }, children }) });
|
|
2962
3298
|
};
|
|
2963
3299
|
List.Item = ListItem;
|
|
2964
3300
|
|
|
2965
3301
|
// src/Menu/Menu.tsx
|
|
2966
3302
|
import { Menu, MenuTrigger } from "react-aria-components";
|
|
2967
|
-
import { useClassNames as
|
|
3303
|
+
import { useClassNames as useClassNames45 } from "@marigold/system";
|
|
2968
3304
|
|
|
2969
3305
|
// src/Menu/MenuItem.tsx
|
|
2970
3306
|
import { MenuItem } from "react-aria-components";
|
|
2971
|
-
import { useClassNames as
|
|
2972
|
-
import { jsx as
|
|
3307
|
+
import { useClassNames as useClassNames43 } from "@marigold/system";
|
|
3308
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
2973
3309
|
var _MenuItem = ({ children, ...props }) => {
|
|
2974
|
-
const classNames3 =
|
|
2975
|
-
return /* @__PURE__ */
|
|
3310
|
+
const classNames3 = useClassNames43({ component: "Menu" });
|
|
3311
|
+
return /* @__PURE__ */ jsx77(MenuItem, { ...props, className: classNames3.item, children });
|
|
2976
3312
|
};
|
|
2977
3313
|
|
|
2978
3314
|
// src/Menu/MenuSection.tsx
|
|
2979
3315
|
import { MenuSection } from "react-aria-components";
|
|
2980
|
-
import { useClassNames as
|
|
2981
|
-
import { jsx as
|
|
3316
|
+
import { useClassNames as useClassNames44 } from "@marigold/system";
|
|
3317
|
+
import { jsx as jsx78, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2982
3318
|
var _MenuSection = ({ children, title, ...props }) => {
|
|
2983
|
-
const className =
|
|
2984
|
-
return /* @__PURE__ */
|
|
2985
|
-
/* @__PURE__ */
|
|
3319
|
+
const className = useClassNames44({ component: "Menu" });
|
|
3320
|
+
return /* @__PURE__ */ jsxs25(MenuSection, { ...props, children: [
|
|
3321
|
+
/* @__PURE__ */ jsx78(_Header, { className: className.section, children: title }),
|
|
2986
3322
|
children
|
|
2987
3323
|
] });
|
|
2988
3324
|
};
|
|
2989
3325
|
|
|
2990
3326
|
// src/Menu/Menu.tsx
|
|
2991
|
-
import { jsx as
|
|
3327
|
+
import { jsx as jsx79, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2992
3328
|
var _Menu = ({
|
|
2993
3329
|
children,
|
|
2994
3330
|
label,
|
|
@@ -3000,10 +3336,10 @@ var _Menu = ({
|
|
|
3000
3336
|
"aria-label": ariaLabel,
|
|
3001
3337
|
...props
|
|
3002
3338
|
}) => {
|
|
3003
|
-
const classNames3 =
|
|
3004
|
-
return /* @__PURE__ */
|
|
3005
|
-
/* @__PURE__ */
|
|
3006
|
-
/* @__PURE__ */
|
|
3339
|
+
const classNames3 = useClassNames45({ component: "Menu", variant, size: size2 });
|
|
3340
|
+
return /* @__PURE__ */ jsxs26(MenuTrigger, { ...props, children: [
|
|
3341
|
+
/* @__PURE__ */ jsx79(_Button, { variant: "menu", disabled, "aria-label": ariaLabel, children: label }),
|
|
3342
|
+
/* @__PURE__ */ jsx79(_Popover, { open, placement, children: /* @__PURE__ */ jsx79(Menu, { ...props, className: classNames3.container, children }) })
|
|
3007
3343
|
] });
|
|
3008
3344
|
};
|
|
3009
3345
|
_Menu.Item = _MenuItem;
|
|
@@ -3011,59 +3347,59 @@ _Menu.Section = _MenuSection;
|
|
|
3011
3347
|
|
|
3012
3348
|
// src/Menu/ActionMenu.tsx
|
|
3013
3349
|
import { Menu as Menu2, MenuTrigger as MenuTrigger2 } from "react-aria-components";
|
|
3014
|
-
import { SVG as SVG8, useClassNames as
|
|
3015
|
-
import { jsx as
|
|
3350
|
+
import { SVG as SVG8, useClassNames as useClassNames46 } from "@marigold/system";
|
|
3351
|
+
import { jsx as jsx80, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3016
3352
|
var ActionMenu = ({
|
|
3017
3353
|
variant,
|
|
3018
3354
|
size: size2,
|
|
3019
3355
|
disabled,
|
|
3020
3356
|
...props
|
|
3021
3357
|
}) => {
|
|
3022
|
-
const classNames3 =
|
|
3023
|
-
return /* @__PURE__ */
|
|
3024
|
-
/* @__PURE__ */
|
|
3025
|
-
/* @__PURE__ */
|
|
3358
|
+
const classNames3 = useClassNames46({ component: "Menu", variant, size: size2 });
|
|
3359
|
+
return /* @__PURE__ */ jsxs27(MenuTrigger2, { children: [
|
|
3360
|
+
/* @__PURE__ */ jsx80(_Button, { variant: "menu", size: "small", disabled, children: /* @__PURE__ */ jsx80(SVG8, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx80("path", { d: "M12.0117 7.47656C13.2557 7.47656 14.2734 6.45879 14.2734 5.21484C14.2734 3.9709 13.2557 2.95312 12.0117 2.95312C10.7678 2.95312 9.75 3.9709 9.75 5.21484C9.75 6.45879 10.7678 7.47656 12.0117 7.47656ZM12.0117 9.73828C10.7678 9.73828 9.75 10.7561 9.75 12C9.75 13.2439 10.7678 14.2617 12.0117 14.2617C13.2557 14.2617 14.2734 13.2439 14.2734 12C14.2734 10.7561 13.2557 9.73828 12.0117 9.73828ZM12.0117 16.5234C10.7678 16.5234 9.75 17.5412 9.75 18.7852C9.75 20.0291 10.7678 21.0469 12.0117 21.0469C13.2557 21.0469 14.2734 20.0291 14.2734 18.7852C14.2734 17.5412 13.2557 16.5234 12.0117 16.5234Z" }) }) }),
|
|
3361
|
+
/* @__PURE__ */ jsx80(_Popover, { children: /* @__PURE__ */ jsx80(Menu2, { ...props, className: classNames3.container, children: props.children }) })
|
|
3026
3362
|
] });
|
|
3027
3363
|
};
|
|
3028
3364
|
|
|
3029
3365
|
// src/SectionMessage/SectionMessage.tsx
|
|
3030
|
-
import { useRef as
|
|
3366
|
+
import { useRef as useRef3, useState as useState2 } from "react";
|
|
3031
3367
|
import { useButton } from "@react-aria/button";
|
|
3032
|
-
import { cn as
|
|
3368
|
+
import { cn as cn46, useClassNames as useClassNames47 } from "@marigold/system";
|
|
3033
3369
|
|
|
3034
3370
|
// src/SectionMessage/Context.tsx
|
|
3035
|
-
import { createContext as
|
|
3036
|
-
var SectionMessageContext =
|
|
3037
|
-
var useSectionMessageContext = () =>
|
|
3371
|
+
import { createContext as createContext9, useContext as useContext17 } from "react";
|
|
3372
|
+
var SectionMessageContext = createContext9({});
|
|
3373
|
+
var useSectionMessageContext = () => useContext17(SectionMessageContext);
|
|
3038
3374
|
|
|
3039
3375
|
// src/SectionMessage/SectionMessageContent.tsx
|
|
3040
|
-
import { cn as
|
|
3041
|
-
import { jsx as
|
|
3376
|
+
import { cn as cn44 } from "@marigold/system";
|
|
3377
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3042
3378
|
var SectionMessageContent = ({
|
|
3043
3379
|
children
|
|
3044
3380
|
}) => {
|
|
3045
3381
|
const { classNames: classNames3 } = useSectionMessageContext();
|
|
3046
|
-
return /* @__PURE__ */
|
|
3382
|
+
return /* @__PURE__ */ jsx81("div", { className: cn44("[grid-area:content]", classNames3.content), children });
|
|
3047
3383
|
};
|
|
3048
3384
|
|
|
3049
3385
|
// src/SectionMessage/SectionMessageTitle.tsx
|
|
3050
|
-
import { cn as
|
|
3051
|
-
import { jsx as
|
|
3386
|
+
import { cn as cn45 } from "@marigold/system";
|
|
3387
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
3052
3388
|
var SectionMessageTitle = ({ children }) => {
|
|
3053
3389
|
const { classNames: classNames3 } = useSectionMessageContext();
|
|
3054
|
-
return /* @__PURE__ */
|
|
3390
|
+
return /* @__PURE__ */ jsx82("div", { className: cn45("[grid-area:title]", classNames3.title), children });
|
|
3055
3391
|
};
|
|
3056
3392
|
|
|
3057
3393
|
// src/SectionMessage/SectionMessage.tsx
|
|
3058
|
-
import { jsx as
|
|
3394
|
+
import { jsx as jsx83, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3059
3395
|
var icons = {
|
|
3060
|
-
success: () => /* @__PURE__ */
|
|
3396
|
+
success: () => /* @__PURE__ */ jsx83(
|
|
3061
3397
|
"svg",
|
|
3062
3398
|
{
|
|
3063
3399
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3064
3400
|
viewBox: "0 0 24 24",
|
|
3065
3401
|
fill: "currentColor",
|
|
3066
|
-
children: /* @__PURE__ */
|
|
3402
|
+
children: /* @__PURE__ */ jsx83(
|
|
3067
3403
|
"path",
|
|
3068
3404
|
{
|
|
3069
3405
|
fillRule: "evenodd",
|
|
@@ -3073,13 +3409,13 @@ var icons = {
|
|
|
3073
3409
|
)
|
|
3074
3410
|
}
|
|
3075
3411
|
),
|
|
3076
|
-
info: () => /* @__PURE__ */
|
|
3412
|
+
info: () => /* @__PURE__ */ jsx83(
|
|
3077
3413
|
"svg",
|
|
3078
3414
|
{
|
|
3079
3415
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3080
3416
|
viewBox: "0 0 24 24",
|
|
3081
3417
|
fill: "currentColor",
|
|
3082
|
-
children: /* @__PURE__ */
|
|
3418
|
+
children: /* @__PURE__ */ jsx83(
|
|
3083
3419
|
"path",
|
|
3084
3420
|
{
|
|
3085
3421
|
fillRule: "evenodd",
|
|
@@ -3089,13 +3425,13 @@ var icons = {
|
|
|
3089
3425
|
)
|
|
3090
3426
|
}
|
|
3091
3427
|
),
|
|
3092
|
-
warning: () => /* @__PURE__ */
|
|
3428
|
+
warning: () => /* @__PURE__ */ jsx83(
|
|
3093
3429
|
"svg",
|
|
3094
3430
|
{
|
|
3095
3431
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3096
3432
|
viewBox: "0 0 24 24",
|
|
3097
3433
|
fill: "currentColor",
|
|
3098
|
-
children: /* @__PURE__ */
|
|
3434
|
+
children: /* @__PURE__ */ jsx83(
|
|
3099
3435
|
"path",
|
|
3100
3436
|
{
|
|
3101
3437
|
fillRule: "evenodd",
|
|
@@ -3105,13 +3441,13 @@ var icons = {
|
|
|
3105
3441
|
)
|
|
3106
3442
|
}
|
|
3107
3443
|
),
|
|
3108
|
-
error: () => /* @__PURE__ */
|
|
3444
|
+
error: () => /* @__PURE__ */ jsx83(
|
|
3109
3445
|
"svg",
|
|
3110
3446
|
{
|
|
3111
3447
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3112
3448
|
viewBox: "0 0 24 24",
|
|
3113
3449
|
fill: "currentColor",
|
|
3114
|
-
children: /* @__PURE__ */
|
|
3450
|
+
children: /* @__PURE__ */ jsx83(
|
|
3115
3451
|
"path",
|
|
3116
3452
|
{
|
|
3117
3453
|
fillRule: "evenodd",
|
|
@@ -3131,8 +3467,8 @@ var SectionMessage = ({
|
|
|
3131
3467
|
onCloseChange,
|
|
3132
3468
|
...props
|
|
3133
3469
|
}) => {
|
|
3134
|
-
const buttonRef =
|
|
3135
|
-
const classNames3 =
|
|
3470
|
+
const buttonRef = useRef3(null);
|
|
3471
|
+
const classNames3 = useClassNames47({
|
|
3136
3472
|
component: "SectionMessage",
|
|
3137
3473
|
variant,
|
|
3138
3474
|
size: size2
|
|
@@ -3148,30 +3484,22 @@ var SectionMessage = ({
|
|
|
3148
3484
|
}
|
|
3149
3485
|
};
|
|
3150
3486
|
if (!isCurrentlyVisible) return null;
|
|
3151
|
-
return /* @__PURE__ */
|
|
3487
|
+
return /* @__PURE__ */ jsx83(SectionMessageContext.Provider, { value: { classNames: classNames3 }, children: /* @__PURE__ */ jsxs28(
|
|
3152
3488
|
"div",
|
|
3153
3489
|
{
|
|
3154
3490
|
role: variant === "error" ? "alert" : void 0,
|
|
3155
3491
|
...props,
|
|
3156
|
-
className:
|
|
3492
|
+
className: cn46("grid auto-rows-min", classNames3.container),
|
|
3157
3493
|
children: [
|
|
3158
|
-
/* @__PURE__ */
|
|
3159
|
-
closeButton && /* @__PURE__ */
|
|
3160
|
-
|
|
3494
|
+
/* @__PURE__ */ jsx83("div", { className: cn46("[grid-area:icon]", classNames3.icon), children: Icon4 && /* @__PURE__ */ jsx83(Icon4, {}) }),
|
|
3495
|
+
closeButton && /* @__PURE__ */ jsx83(
|
|
3496
|
+
CloseButton,
|
|
3161
3497
|
{
|
|
3162
3498
|
...buttonProps,
|
|
3163
3499
|
ref: buttonRef,
|
|
3164
3500
|
"aria-label": "close",
|
|
3165
|
-
className:
|
|
3166
|
-
|
|
3167
|
-
children: /* @__PURE__ */ jsx74("svg", { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx74(
|
|
3168
|
-
"path",
|
|
3169
|
-
{
|
|
3170
|
-
fillRule: "evenodd",
|
|
3171
|
-
clipRule: "evenodd",
|
|
3172
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
3173
|
-
}
|
|
3174
|
-
) })
|
|
3501
|
+
className: cn46("[grid-area:close]", classNames3.close),
|
|
3502
|
+
onPress: handleClose
|
|
3175
3503
|
}
|
|
3176
3504
|
),
|
|
3177
3505
|
children
|
|
@@ -3184,11 +3512,11 @@ SectionMessage.Content = SectionMessageContent;
|
|
|
3184
3512
|
|
|
3185
3513
|
// src/Multiselect/Multiselect.tsx
|
|
3186
3514
|
import {
|
|
3187
|
-
Button as
|
|
3515
|
+
Button as Button6,
|
|
3188
3516
|
ButtonContext,
|
|
3189
3517
|
FieldErrorContext as FieldErrorContext2,
|
|
3190
3518
|
InputContext,
|
|
3191
|
-
Provider,
|
|
3519
|
+
Provider as Provider2,
|
|
3192
3520
|
Input as _Input2
|
|
3193
3521
|
} from "react-aria-components";
|
|
3194
3522
|
|
|
@@ -3389,7 +3717,7 @@ function _extends() {
|
|
|
3389
3717
|
|
|
3390
3718
|
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/react-select.esm.js
|
|
3391
3719
|
import * as React11 from "react";
|
|
3392
|
-
import { forwardRef as
|
|
3720
|
+
import { forwardRef as forwardRef23, useMemo as useMemo5 } from "react";
|
|
3393
3721
|
|
|
3394
3722
|
// ../../node_modules/.pnpm/@babel+runtime@7.27.0/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
3395
3723
|
function _classCallCheck(a, n) {
|
|
@@ -3497,11 +3825,11 @@ function _toConsumableArray(r) {
|
|
|
3497
3825
|
|
|
3498
3826
|
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/Select-aab027f3.esm.js
|
|
3499
3827
|
import * as React10 from "react";
|
|
3500
|
-
import { useMemo as
|
|
3828
|
+
import { useMemo as useMemo4, Fragment as Fragment8, useRef as useRef6, useCallback as useCallback3, useEffect as useEffect3, Component } from "react";
|
|
3501
3829
|
|
|
3502
3830
|
// ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.1.0_react@19.1.0/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
3503
3831
|
import * as React8 from "react";
|
|
3504
|
-
import { useContext as
|
|
3832
|
+
import { useContext as useContext19, forwardRef as forwardRef22 } from "react";
|
|
3505
3833
|
|
|
3506
3834
|
// ../../node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
3507
3835
|
var isDevelopment = false;
|
|
@@ -4689,15 +5017,15 @@ var EmotionCacheContext = /* @__PURE__ */ React8.createContext(
|
|
|
4689
5017
|
);
|
|
4690
5018
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
4691
5019
|
var withEmotionCache = function withEmotionCache2(func) {
|
|
4692
|
-
return /* @__PURE__ */
|
|
4693
|
-
var cache =
|
|
5020
|
+
return /* @__PURE__ */ forwardRef22(function(props, ref) {
|
|
5021
|
+
var cache = useContext19(EmotionCacheContext);
|
|
4694
5022
|
return func(props, cache, ref);
|
|
4695
5023
|
});
|
|
4696
5024
|
};
|
|
4697
5025
|
if (!isBrowser4) {
|
|
4698
5026
|
withEmotionCache = function withEmotionCache3(func) {
|
|
4699
5027
|
return function(props) {
|
|
4700
|
-
var cache =
|
|
5028
|
+
var cache = useContext19(EmotionCacheContext);
|
|
4701
5029
|
if (cache === null) {
|
|
4702
5030
|
cache = createCache({
|
|
4703
5031
|
key: "css"
|
|
@@ -4781,7 +5109,7 @@ var Emotion$1 = Emotion;
|
|
|
4781
5109
|
import * as React9 from "react";
|
|
4782
5110
|
var import_extends2 = __toESM(require_extends());
|
|
4783
5111
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
4784
|
-
var
|
|
5112
|
+
var jsx84 = function jsx85(type, props) {
|
|
4785
5113
|
var args = arguments;
|
|
4786
5114
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
4787
5115
|
return React9.createElement.apply(void 0, args);
|
|
@@ -4799,7 +5127,7 @@ var jsx75 = function jsx76(type, props) {
|
|
|
4799
5127
|
var JSX;
|
|
4800
5128
|
/* @__PURE__ */ (function(_JSX) {
|
|
4801
5129
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
4802
|
-
})(
|
|
5130
|
+
})(jsx84 || (jsx84 = {}));
|
|
4803
5131
|
function css() {
|
|
4804
5132
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4805
5133
|
args[_key] = arguments[_key];
|
|
@@ -4829,7 +5157,7 @@ function _taggedTemplateLiteral(e, t) {
|
|
|
4829
5157
|
}
|
|
4830
5158
|
|
|
4831
5159
|
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
4832
|
-
import { useContext as
|
|
5160
|
+
import { useContext as useContext21, useRef as useRef5, useState as useState4, useMemo as useMemo3, useCallback as useCallback2, createContext as createContext11 } from "react";
|
|
4833
5161
|
import { createPortal } from "react-dom";
|
|
4834
5162
|
|
|
4835
5163
|
// ../../node_modules/.pnpm/@floating-ui+utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
@@ -5566,11 +5894,11 @@ var menuCSS = function menuCSS2(_ref23, unstyled) {
|
|
|
5566
5894
|
marginTop: spacing2.menuGutter
|
|
5567
5895
|
});
|
|
5568
5896
|
};
|
|
5569
|
-
var PortalPlacementContext = /* @__PURE__ */
|
|
5897
|
+
var PortalPlacementContext = /* @__PURE__ */ createContext11(null);
|
|
5570
5898
|
var MenuPlacer = function MenuPlacer2(props) {
|
|
5571
5899
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
5572
|
-
var _ref3 =
|
|
5573
|
-
var ref =
|
|
5900
|
+
var _ref3 = useContext21(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
5901
|
+
var ref = useRef5(null);
|
|
5574
5902
|
var _useState = useState4(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
5575
5903
|
var _useState3 = useState4(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
5576
5904
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
@@ -5602,7 +5930,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
5602
5930
|
};
|
|
5603
5931
|
var Menu3 = function Menu4(props) {
|
|
5604
5932
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
5605
|
-
return
|
|
5933
|
+
return jsx84("div", _extends({}, getStyleProps(props, "menu", {
|
|
5606
5934
|
menu: true
|
|
5607
5935
|
}), {
|
|
5608
5936
|
ref: innerRef
|
|
@@ -5624,7 +5952,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
5624
5952
|
};
|
|
5625
5953
|
var MenuList = function MenuList2(props) {
|
|
5626
5954
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
5627
|
-
return
|
|
5955
|
+
return jsx84("div", _extends({}, getStyleProps(props, "menuList", {
|
|
5628
5956
|
"menu-list": true,
|
|
5629
5957
|
"menu-list--is-multi": isMulti
|
|
5630
5958
|
}), {
|
|
@@ -5644,7 +5972,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
5644
5972
|
var loadingMessageCSS = noticeCSS;
|
|
5645
5973
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
5646
5974
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
5647
|
-
return
|
|
5975
|
+
return jsx84("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
5648
5976
|
children,
|
|
5649
5977
|
innerProps
|
|
5650
5978
|
}), "noOptionsMessage", {
|
|
@@ -5654,7 +5982,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
5654
5982
|
};
|
|
5655
5983
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
5656
5984
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
5657
|
-
return
|
|
5985
|
+
return jsx84("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
5658
5986
|
children,
|
|
5659
5987
|
innerProps
|
|
5660
5988
|
}), "loadingMessage", {
|
|
@@ -5674,10 +6002,10 @@ var menuPortalCSS = function menuPortalCSS2(_ref8) {
|
|
|
5674
6002
|
};
|
|
5675
6003
|
var MenuPortal = function MenuPortal2(props) {
|
|
5676
6004
|
var appendTo = props.appendTo, children = props.children, controlElement = props.controlElement, innerProps = props.innerProps, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition;
|
|
5677
|
-
var menuPortalRef =
|
|
5678
|
-
var cleanupRef =
|
|
6005
|
+
var menuPortalRef = useRef5(null);
|
|
6006
|
+
var cleanupRef = useRef5(null);
|
|
5679
6007
|
var _useState5 = useState4(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
5680
|
-
var portalPlacementContext =
|
|
6008
|
+
var portalPlacementContext = useMemo3(function() {
|
|
5681
6009
|
return {
|
|
5682
6010
|
setPortalPlacement
|
|
5683
6011
|
};
|
|
@@ -5717,7 +6045,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
5717
6045
|
runAutoUpdate();
|
|
5718
6046
|
}, [runAutoUpdate]);
|
|
5719
6047
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
5720
|
-
var menuWrapper =
|
|
6048
|
+
var menuWrapper = jsx84("div", _extends({
|
|
5721
6049
|
ref: setMenuPortalElement
|
|
5722
6050
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
5723
6051
|
offset: computedPosition.offset,
|
|
@@ -5726,7 +6054,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
5726
6054
|
}), "menuPortal", {
|
|
5727
6055
|
"menu-portal": true
|
|
5728
6056
|
}), innerProps), children);
|
|
5729
|
-
return
|
|
6057
|
+
return jsx84(PortalPlacementContext.Provider, {
|
|
5730
6058
|
value: portalPlacementContext
|
|
5731
6059
|
}, appendTo ? /* @__PURE__ */ createPortal(menuWrapper, appendTo) : menuWrapper);
|
|
5732
6060
|
};
|
|
@@ -5742,7 +6070,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
5742
6070
|
};
|
|
5743
6071
|
var SelectContainer = function SelectContainer2(props) {
|
|
5744
6072
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
5745
|
-
return
|
|
6073
|
+
return jsx84("div", _extends({}, getStyleProps(props, "container", {
|
|
5746
6074
|
"--is-disabled": isDisabled,
|
|
5747
6075
|
"--is-rtl": isRtl
|
|
5748
6076
|
}), innerProps), children);
|
|
@@ -5763,7 +6091,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
5763
6091
|
};
|
|
5764
6092
|
var ValueContainer = function ValueContainer2(props) {
|
|
5765
6093
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
5766
|
-
return
|
|
6094
|
+
return jsx84("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
5767
6095
|
"value-container": true,
|
|
5768
6096
|
"value-container--is-multi": isMulti,
|
|
5769
6097
|
"value-container--has-value": hasValue
|
|
@@ -5779,7 +6107,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
5779
6107
|
};
|
|
5780
6108
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
5781
6109
|
var children = props.children, innerProps = props.innerProps;
|
|
5782
|
-
return
|
|
6110
|
+
return jsx84("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
5783
6111
|
indicators: true
|
|
5784
6112
|
}), innerProps), children);
|
|
5785
6113
|
};
|
|
@@ -5800,7 +6128,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
5800
6128
|
};
|
|
5801
6129
|
var Svg = function Svg2(_ref3) {
|
|
5802
6130
|
var size2 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
5803
|
-
return
|
|
6131
|
+
return jsx84("svg", _extends({
|
|
5804
6132
|
height: size2,
|
|
5805
6133
|
width: size2,
|
|
5806
6134
|
viewBox: "0 0 20 20",
|
|
@@ -5810,16 +6138,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
5810
6138
|
}, props));
|
|
5811
6139
|
};
|
|
5812
6140
|
var CrossIcon = function CrossIcon2(props) {
|
|
5813
|
-
return
|
|
6141
|
+
return jsx84(Svg, _extends({
|
|
5814
6142
|
size: 20
|
|
5815
|
-
}, props),
|
|
6143
|
+
}, props), jsx84("path", {
|
|
5816
6144
|
d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
|
|
5817
6145
|
}));
|
|
5818
6146
|
};
|
|
5819
6147
|
var DownChevron = function DownChevron2(props) {
|
|
5820
|
-
return
|
|
6148
|
+
return jsx84(Svg, _extends({
|
|
5821
6149
|
size: 20
|
|
5822
|
-
}, props),
|
|
6150
|
+
}, props), jsx84("path", {
|
|
5823
6151
|
d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
|
5824
6152
|
}));
|
|
5825
6153
|
};
|
|
@@ -5840,18 +6168,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
5840
6168
|
var dropdownIndicatorCSS = baseCSS;
|
|
5841
6169
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
5842
6170
|
var children = props.children, innerProps = props.innerProps;
|
|
5843
|
-
return
|
|
6171
|
+
return jsx84("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
5844
6172
|
indicator: true,
|
|
5845
6173
|
"dropdown-indicator": true
|
|
5846
|
-
}), innerProps), children ||
|
|
6174
|
+
}), innerProps), children || jsx84(DownChevron, null));
|
|
5847
6175
|
};
|
|
5848
6176
|
var clearIndicatorCSS = baseCSS;
|
|
5849
6177
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
5850
6178
|
var children = props.children, innerProps = props.innerProps;
|
|
5851
|
-
return
|
|
6179
|
+
return jsx84("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
5852
6180
|
indicator: true,
|
|
5853
6181
|
"clear-indicator": true
|
|
5854
|
-
}), innerProps), children ||
|
|
6182
|
+
}), innerProps), children || jsx84(CrossIcon, null));
|
|
5855
6183
|
};
|
|
5856
6184
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
5857
6185
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -5867,7 +6195,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
5867
6195
|
};
|
|
5868
6196
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
5869
6197
|
var innerProps = props.innerProps;
|
|
5870
|
-
return
|
|
6198
|
+
return jsx84("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
5871
6199
|
"indicator-separator": true
|
|
5872
6200
|
})));
|
|
5873
6201
|
};
|
|
@@ -5891,7 +6219,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
5891
6219
|
};
|
|
5892
6220
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
5893
6221
|
var delay = _ref6.delay, offset2 = _ref6.offset;
|
|
5894
|
-
return
|
|
6222
|
+
return jsx84("span", {
|
|
5895
6223
|
css: /* @__PURE__ */ css({
|
|
5896
6224
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
5897
6225
|
backgroundColor: "currentColor",
|
|
@@ -5906,20 +6234,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
5906
6234
|
};
|
|
5907
6235
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
5908
6236
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size2 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
5909
|
-
return
|
|
6237
|
+
return jsx84("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
5910
6238
|
innerProps,
|
|
5911
6239
|
isRtl,
|
|
5912
6240
|
size: size2
|
|
5913
6241
|
}), "loadingIndicator", {
|
|
5914
6242
|
indicator: true,
|
|
5915
6243
|
"loading-indicator": true
|
|
5916
|
-
}), innerProps),
|
|
6244
|
+
}), innerProps), jsx84(LoadingDot, {
|
|
5917
6245
|
delay: 0,
|
|
5918
6246
|
offset: isRtl
|
|
5919
|
-
}),
|
|
6247
|
+
}), jsx84(LoadingDot, {
|
|
5920
6248
|
delay: 160,
|
|
5921
6249
|
offset: true
|
|
5922
|
-
}),
|
|
6250
|
+
}), jsx84(LoadingDot, {
|
|
5923
6251
|
delay: 320,
|
|
5924
6252
|
offset: !isRtl
|
|
5925
6253
|
}));
|
|
@@ -5951,7 +6279,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
5951
6279
|
};
|
|
5952
6280
|
var Control = function Control2(props) {
|
|
5953
6281
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
5954
|
-
return
|
|
6282
|
+
return jsx84("div", _extends({
|
|
5955
6283
|
ref: innerRef
|
|
5956
6284
|
}, getStyleProps(props, "control", {
|
|
5957
6285
|
control: true,
|
|
@@ -5972,16 +6300,16 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
5972
6300
|
};
|
|
5973
6301
|
};
|
|
5974
6302
|
var Group2 = function Group3(props) {
|
|
5975
|
-
var children = props.children, cx = props.cx, getStyles = props.getStyles, getClassNames2 = props.getClassNames,
|
|
5976
|
-
return
|
|
6303
|
+
var children = props.children, cx = props.cx, getStyles = props.getStyles, getClassNames2 = props.getClassNames, Heading5 = props.Heading, headingProps = props.headingProps, innerProps = props.innerProps, label = props.label, theme = props.theme, selectProps = props.selectProps;
|
|
6304
|
+
return jsx84("div", _extends({}, getStyleProps(props, "group", {
|
|
5977
6305
|
group: true
|
|
5978
|
-
}), innerProps),
|
|
6306
|
+
}), innerProps), jsx84(Heading5, _extends({}, headingProps, {
|
|
5979
6307
|
selectProps,
|
|
5980
6308
|
theme,
|
|
5981
6309
|
getStyles,
|
|
5982
6310
|
getClassNames: getClassNames2,
|
|
5983
6311
|
cx
|
|
5984
|
-
}), label),
|
|
6312
|
+
}), label), jsx84("div", null, children));
|
|
5985
6313
|
};
|
|
5986
6314
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
5987
6315
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -6003,7 +6331,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
6003
6331
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
6004
6332
|
_cleanCommonProps.data;
|
|
6005
6333
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
6006
|
-
return
|
|
6334
|
+
return jsx84("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
6007
6335
|
"group-heading": true
|
|
6008
6336
|
}), innerProps));
|
|
6009
6337
|
};
|
|
@@ -6055,11 +6383,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
6055
6383
|
var Input2 = function Input3(props) {
|
|
6056
6384
|
var cx = props.cx, value = props.value;
|
|
6057
6385
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
6058
|
-
return
|
|
6386
|
+
return jsx84("div", _extends({}, getStyleProps(props, "input", {
|
|
6059
6387
|
"input-container": true
|
|
6060
6388
|
}), {
|
|
6061
6389
|
"data-value": value || ""
|
|
6062
|
-
}),
|
|
6390
|
+
}), jsx84("input", _extends({
|
|
6063
6391
|
className: cx({
|
|
6064
6392
|
input: true
|
|
6065
6393
|
}, inputClassName),
|
|
@@ -6113,35 +6441,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
6113
6441
|
};
|
|
6114
6442
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
6115
6443
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
6116
|
-
return
|
|
6444
|
+
return jsx84("div", innerProps, children);
|
|
6117
6445
|
};
|
|
6118
6446
|
var MultiValueContainer = MultiValueGeneric;
|
|
6119
6447
|
var MultiValueLabel = MultiValueGeneric;
|
|
6120
6448
|
function MultiValueRemove(_ref5) {
|
|
6121
6449
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
6122
|
-
return
|
|
6450
|
+
return jsx84("div", _extends({
|
|
6123
6451
|
role: "button"
|
|
6124
|
-
}, innerProps), children ||
|
|
6452
|
+
}, innerProps), children || jsx84(CrossIcon, {
|
|
6125
6453
|
size: 14
|
|
6126
6454
|
}));
|
|
6127
6455
|
}
|
|
6128
6456
|
var MultiValue = function MultiValue2(props) {
|
|
6129
6457
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
6130
6458
|
var Container2 = components2.Container, Label3 = components2.Label, Remove = components2.Remove;
|
|
6131
|
-
return
|
|
6459
|
+
return jsx84(Container2, {
|
|
6132
6460
|
data,
|
|
6133
6461
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
6134
6462
|
"multi-value": true,
|
|
6135
6463
|
"multi-value--is-disabled": isDisabled
|
|
6136
6464
|
})), innerProps),
|
|
6137
6465
|
selectProps
|
|
6138
|
-
},
|
|
6466
|
+
}, jsx84(Label3, {
|
|
6139
6467
|
data,
|
|
6140
6468
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
6141
6469
|
"multi-value__label": true
|
|
6142
6470
|
})),
|
|
6143
6471
|
selectProps
|
|
6144
|
-
}, children),
|
|
6472
|
+
}, children), jsx84(Remove, {
|
|
6145
6473
|
data,
|
|
6146
6474
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
6147
6475
|
"multi-value__remove": true
|
|
@@ -6174,7 +6502,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
6174
6502
|
};
|
|
6175
6503
|
var Option = function Option2(props) {
|
|
6176
6504
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
6177
|
-
return
|
|
6505
|
+
return jsx84("div", _extends({}, getStyleProps(props, "option", {
|
|
6178
6506
|
option: true,
|
|
6179
6507
|
"option--is-disabled": isDisabled,
|
|
6180
6508
|
"option--is-focused": isFocused,
|
|
@@ -6198,7 +6526,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
6198
6526
|
};
|
|
6199
6527
|
var Placeholder = function Placeholder2(props) {
|
|
6200
6528
|
var children = props.children, innerProps = props.innerProps;
|
|
6201
|
-
return
|
|
6529
|
+
return jsx84("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
6202
6530
|
placeholder: true
|
|
6203
6531
|
}), innerProps), children);
|
|
6204
6532
|
};
|
|
@@ -6220,7 +6548,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
6220
6548
|
};
|
|
6221
6549
|
var SingleValue = function SingleValue2(props) {
|
|
6222
6550
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
6223
|
-
return
|
|
6551
|
+
return jsx84("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
6224
6552
|
"single-value": true,
|
|
6225
6553
|
"single-value--is-disabled": isDisabled
|
|
6226
6554
|
}), innerProps), children);
|
|
@@ -6322,7 +6650,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
6322
6650
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
6323
6651
|
};
|
|
6324
6652
|
var A11yText = function A11yText2(props) {
|
|
6325
|
-
return
|
|
6653
|
+
return jsx84("span", _extends({
|
|
6326
6654
|
css: _ref
|
|
6327
6655
|
}, props));
|
|
6328
6656
|
};
|
|
@@ -6383,10 +6711,10 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
6383
6711
|
var ariaLiveMessages = selectProps.ariaLiveMessages, getOptionLabel4 = selectProps.getOptionLabel, inputValue = selectProps.inputValue, isMulti = selectProps.isMulti, isOptionDisabled3 = selectProps.isOptionDisabled, isSearchable = selectProps.isSearchable, menuIsOpen = selectProps.menuIsOpen, options2 = selectProps.options, screenReaderStatus2 = selectProps.screenReaderStatus, tabSelectsValue = selectProps.tabSelectsValue, isLoading = selectProps.isLoading;
|
|
6384
6712
|
var ariaLabel = selectProps["aria-label"];
|
|
6385
6713
|
var ariaLive = selectProps["aria-live"];
|
|
6386
|
-
var messages =
|
|
6714
|
+
var messages = useMemo4(function() {
|
|
6387
6715
|
return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});
|
|
6388
6716
|
}, [ariaLiveMessages]);
|
|
6389
|
-
var ariaSelected =
|
|
6717
|
+
var ariaSelected = useMemo4(function() {
|
|
6390
6718
|
var message = "";
|
|
6391
6719
|
if (ariaSelection && messages.onChange) {
|
|
6392
6720
|
var option = ariaSelection.option, selectedOptions = ariaSelection.options, removedValue = ariaSelection.removedValue, removedValues = ariaSelection.removedValues, value = ariaSelection.value;
|
|
@@ -6408,7 +6736,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
6408
6736
|
}
|
|
6409
6737
|
return message;
|
|
6410
6738
|
}, [ariaSelection, messages, isOptionDisabled3, selectValue, getOptionLabel4]);
|
|
6411
|
-
var ariaFocused =
|
|
6739
|
+
var ariaFocused = useMemo4(function() {
|
|
6412
6740
|
var focusMsg = "";
|
|
6413
6741
|
var focused = focusedOption || focusedValue;
|
|
6414
6742
|
var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));
|
|
@@ -6427,7 +6755,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
6427
6755
|
}
|
|
6428
6756
|
return focusMsg;
|
|
6429
6757
|
}, [focusedOption, focusedValue, getOptionLabel4, isOptionDisabled3, messages, focusableOptions, selectValue, isAppleDevice2]);
|
|
6430
|
-
var ariaResults =
|
|
6758
|
+
var ariaResults = useMemo4(function() {
|
|
6431
6759
|
var resultsMsg = "";
|
|
6432
6760
|
if (menuIsOpen && options2.length && !isLoading && messages.onFilter) {
|
|
6433
6761
|
var resultsMessage = screenReaderStatus2({
|
|
@@ -6441,7 +6769,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
6441
6769
|
return resultsMsg;
|
|
6442
6770
|
}, [focusableOptions, inputValue, menuIsOpen, messages, options2, screenReaderStatus2, isLoading]);
|
|
6443
6771
|
var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === "initial-input-focus";
|
|
6444
|
-
var ariaGuidance =
|
|
6772
|
+
var ariaGuidance = useMemo4(function() {
|
|
6445
6773
|
var guidanceMsg = "";
|
|
6446
6774
|
if (messages.guidance) {
|
|
6447
6775
|
var context = focusedValue ? "value" : menuIsOpen ? "menu" : "input";
|
|
@@ -6457,18 +6785,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
6457
6785
|
}
|
|
6458
6786
|
return guidanceMsg;
|
|
6459
6787
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
6460
|
-
var ScreenReaderText =
|
|
6788
|
+
var ScreenReaderText = jsx84(Fragment8, null, jsx84("span", {
|
|
6461
6789
|
id: "aria-selection"
|
|
6462
|
-
}, ariaSelected),
|
|
6790
|
+
}, ariaSelected), jsx84("span", {
|
|
6463
6791
|
id: "aria-focused"
|
|
6464
|
-
}, ariaFocused),
|
|
6792
|
+
}, ariaFocused), jsx84("span", {
|
|
6465
6793
|
id: "aria-results"
|
|
6466
|
-
}, ariaResults),
|
|
6794
|
+
}, ariaResults), jsx84("span", {
|
|
6467
6795
|
id: "aria-guidance"
|
|
6468
6796
|
}, ariaGuidance));
|
|
6469
|
-
return
|
|
6797
|
+
return jsx84(Fragment8, null, jsx84(A11yText$1, {
|
|
6470
6798
|
id
|
|
6471
|
-
}, isInitialFocus && ScreenReaderText),
|
|
6799
|
+
}, isInitialFocus && ScreenReaderText), jsx84(A11yText$1, {
|
|
6472
6800
|
"aria-live": ariaLive,
|
|
6473
6801
|
"aria-atomic": "false",
|
|
6474
6802
|
"aria-relevant": "additions text",
|
|
@@ -6781,7 +7109,7 @@ var _excluded4 = ["innerRef"];
|
|
|
6781
7109
|
function DummyInput(_ref3) {
|
|
6782
7110
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
6783
7111
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
6784
|
-
return
|
|
7112
|
+
return jsx84("input", _extends({
|
|
6785
7113
|
ref: innerRef
|
|
6786
7114
|
}, filteredProps, {
|
|
6787
7115
|
css: /* @__PURE__ */ css({
|
|
@@ -6813,10 +7141,10 @@ var cancelScroll = function cancelScroll2(event) {
|
|
|
6813
7141
|
};
|
|
6814
7142
|
function useScrollCapture(_ref3) {
|
|
6815
7143
|
var isEnabled = _ref3.isEnabled, onBottomArrive = _ref3.onBottomArrive, onBottomLeave = _ref3.onBottomLeave, onTopArrive = _ref3.onTopArrive, onTopLeave = _ref3.onTopLeave;
|
|
6816
|
-
var isBottom =
|
|
6817
|
-
var isTop =
|
|
6818
|
-
var touchStart =
|
|
6819
|
-
var scrollTarget =
|
|
7144
|
+
var isBottom = useRef6(false);
|
|
7145
|
+
var isTop = useRef6(false);
|
|
7146
|
+
var touchStart = useRef6(0);
|
|
7147
|
+
var scrollTarget = useRef6(null);
|
|
6820
7148
|
var handleEventDelta = useCallback3(function(event, delta) {
|
|
6821
7149
|
if (scrollTarget.current === null) return;
|
|
6822
7150
|
var _scrollTarget$current = scrollTarget.current, scrollTop = _scrollTarget$current.scrollTop, scrollHeight = _scrollTarget$current.scrollHeight, clientHeight = _scrollTarget$current.clientHeight;
|
|
@@ -6923,8 +7251,8 @@ var listenerOptions = {
|
|
|
6923
7251
|
};
|
|
6924
7252
|
function useScrollLock(_ref3) {
|
|
6925
7253
|
var isEnabled = _ref3.isEnabled, _ref$accountForScroll = _ref3.accountForScrollbars, accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;
|
|
6926
|
-
var originalStyles =
|
|
6927
|
-
var scrollTarget =
|
|
7254
|
+
var originalStyles = useRef6({});
|
|
7255
|
+
var scrollTarget = useRef6(null);
|
|
6928
7256
|
var addScrollLock = useCallback3(function(touchScrollTarget) {
|
|
6929
7257
|
if (!canUseDOM) return;
|
|
6930
7258
|
var target = document.body;
|
|
@@ -7023,7 +7351,7 @@ function ScrollManager(_ref3) {
|
|
|
7023
7351
|
setScrollCaptureTarget(element);
|
|
7024
7352
|
setScrollLockTarget(element);
|
|
7025
7353
|
};
|
|
7026
|
-
return
|
|
7354
|
+
return jsx84(Fragment8, null, lockEnabled && jsx84("div", {
|
|
7027
7355
|
onClick: blurSelectInput,
|
|
7028
7356
|
css: _ref2$1
|
|
7029
7357
|
}), children(targetRef));
|
|
@@ -7042,7 +7370,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
7042
7370
|
};
|
|
7043
7371
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
7044
7372
|
var name = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
7045
|
-
return
|
|
7373
|
+
return jsx84("input", {
|
|
7046
7374
|
required: true,
|
|
7047
7375
|
name,
|
|
7048
7376
|
tabIndex: -1,
|
|
@@ -8617,7 +8945,7 @@ var import_typeof5 = __toESM(require_typeof());
|
|
|
8617
8945
|
var import_taggedTemplateLiteral2 = __toESM(require_taggedTemplateLiteral());
|
|
8618
8946
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
8619
8947
|
import "react-dom";
|
|
8620
|
-
var StateManagedSelect = /* @__PURE__ */
|
|
8948
|
+
var StateManagedSelect = /* @__PURE__ */ forwardRef23(function(props, ref) {
|
|
8621
8949
|
var baseSelectProps = useStateManager(props);
|
|
8622
8950
|
return /* @__PURE__ */ React11.createElement(Select, _extends({
|
|
8623
8951
|
ref
|
|
@@ -8625,7 +8953,7 @@ var StateManagedSelect = /* @__PURE__ */ forwardRef20(function(props, ref) {
|
|
|
8625
8953
|
});
|
|
8626
8954
|
var StateManagedSelect$1 = StateManagedSelect;
|
|
8627
8955
|
|
|
8628
|
-
// ../../node_modules/.pnpm/@react-aria+label@3.7.
|
|
8956
|
+
// ../../node_modules/.pnpm/@react-aria+label@3.7.17_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/label/dist/useLabel.mjs
|
|
8629
8957
|
import { useId as $83Elw$useId, useLabels as $83Elw$useLabels } from "@react-aria/utils";
|
|
8630
8958
|
function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
8631
8959
|
let { id, label, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, labelElementType = "label" } = props;
|
|
@@ -8638,7 +8966,7 @@ function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
|
8638
8966
|
id: labelId,
|
|
8639
8967
|
htmlFor: labelElementType === "label" ? id : void 0
|
|
8640
8968
|
};
|
|
8641
|
-
} else if (!ariaLabelledby && !ariaLabel) console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");
|
|
8969
|
+
} else if (!ariaLabelledby && !ariaLabel && process.env.NODE_ENV !== "production") console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");
|
|
8642
8970
|
let fieldProps = (0, $83Elw$useLabels)({
|
|
8643
8971
|
id,
|
|
8644
8972
|
"aria-label": ariaLabel,
|
|
@@ -8650,7 +8978,7 @@ function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
|
8650
8978
|
};
|
|
8651
8979
|
}
|
|
8652
8980
|
|
|
8653
|
-
// ../../node_modules/.pnpm/@react-aria+label@3.7.
|
|
8981
|
+
// ../../node_modules/.pnpm/@react-aria+label@3.7.17_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/label/dist/useField.mjs
|
|
8654
8982
|
import { useSlotId as $2kC82$useSlotId, mergeProps as $2kC82$mergeProps } from "@react-aria/utils";
|
|
8655
8983
|
function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
|
|
8656
8984
|
let { description, errorMessage, isInvalid, validationState } = props;
|
|
@@ -8689,8 +9017,8 @@ function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
|
|
|
8689
9017
|
|
|
8690
9018
|
// src/Multiselect/Multiselect.tsx
|
|
8691
9019
|
import { useId } from "@react-aria/utils";
|
|
8692
|
-
import { cn as
|
|
8693
|
-
import { jsx as
|
|
9020
|
+
import { cn as cn47, useClassNames as useClassNames48 } from "@marigold/system";
|
|
9021
|
+
import { jsx as jsx86, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
8694
9022
|
var propsToBeRemoved = [
|
|
8695
9023
|
"clearValue",
|
|
8696
9024
|
"getStyles",
|
|
@@ -8716,7 +9044,7 @@ var Input4 = ({ innerRef, placeholder, hasValue, ...props }) => {
|
|
|
8716
9044
|
},
|
|
8717
9045
|
{}
|
|
8718
9046
|
);
|
|
8719
|
-
return /* @__PURE__ */
|
|
9047
|
+
return /* @__PURE__ */ jsx86(
|
|
8720
9048
|
_Input2,
|
|
8721
9049
|
{
|
|
8722
9050
|
disabled: props.isDisabled,
|
|
@@ -8727,20 +9055,20 @@ var Input4 = ({ innerRef, placeholder, hasValue, ...props }) => {
|
|
|
8727
9055
|
);
|
|
8728
9056
|
};
|
|
8729
9057
|
var MultiValueRemove2 = ({ innerProps }) => {
|
|
8730
|
-
return /* @__PURE__ */
|
|
9058
|
+
return /* @__PURE__ */ jsx86(Button6, { slot: "remove", ...innerProps, children: /* @__PURE__ */ jsx86("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx86("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
8731
9059
|
};
|
|
8732
9060
|
var getClassNames = (classNames3) => ({
|
|
8733
|
-
control: () =>
|
|
8734
|
-
"relative flex items-center box-border flex-wrap justify-between
|
|
9061
|
+
control: () => cn47(
|
|
9062
|
+
"relative flex items-center box-border flex-wrap justify-between",
|
|
8735
9063
|
classNames3.container
|
|
8736
9064
|
),
|
|
8737
9065
|
container: () => "pointer-events-auto",
|
|
8738
9066
|
indicatorSeparator: () => "hidden",
|
|
8739
|
-
menu: () =>
|
|
8740
|
-
menuList: () =>
|
|
8741
|
-
multiValue: () =>
|
|
9067
|
+
menu: () => cn47("b", classNames3.listContainer),
|
|
9068
|
+
menuList: () => cn47("overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh] p-0", classNames3.list),
|
|
9069
|
+
multiValue: () => cn47(classNames3.tag, "m-0 "),
|
|
8742
9070
|
multiValueLabel: () => "p-0",
|
|
8743
|
-
option: ({ isFocused }) =>
|
|
9071
|
+
option: ({ isFocused }) => cn47(classNames3.option, { isFocused }),
|
|
8744
9072
|
placeholder: () => "hidden",
|
|
8745
9073
|
valueContainer: () => classNames3.valueContainer
|
|
8746
9074
|
});
|
|
@@ -8761,7 +9089,7 @@ var Multiselect = ({
|
|
|
8761
9089
|
onSelectionChange,
|
|
8762
9090
|
...rest
|
|
8763
9091
|
}) => {
|
|
8764
|
-
const classNames3 =
|
|
9092
|
+
const classNames3 = useClassNames48({
|
|
8765
9093
|
component: "MultiSelect",
|
|
8766
9094
|
size: size2,
|
|
8767
9095
|
variant
|
|
@@ -8779,8 +9107,8 @@ var Multiselect = ({
|
|
|
8779
9107
|
label: props.label,
|
|
8780
9108
|
errorMessage
|
|
8781
9109
|
});
|
|
8782
|
-
return /* @__PURE__ */
|
|
8783
|
-
|
|
9110
|
+
return /* @__PURE__ */ jsx86(
|
|
9111
|
+
Provider2,
|
|
8784
9112
|
{
|
|
8785
9113
|
values: [
|
|
8786
9114
|
[
|
|
@@ -8805,20 +9133,20 @@ var Multiselect = ({
|
|
|
8805
9133
|
// react-select doesn't handle readonly so we had to do it manually here
|
|
8806
9134
|
// keep to the button disabled in read only to prevent menu from opening
|
|
8807
9135
|
isDisabled: disabled || readOnly,
|
|
8808
|
-
className:
|
|
9136
|
+
className: cn47("flex items-center", classNames3.closeButton)
|
|
8809
9137
|
}
|
|
8810
9138
|
]
|
|
8811
9139
|
],
|
|
8812
|
-
children: /* @__PURE__ */
|
|
9140
|
+
children: /* @__PURE__ */ jsxs29(
|
|
8813
9141
|
"div",
|
|
8814
9142
|
{
|
|
8815
|
-
className:
|
|
9143
|
+
className: cn47(classNames3.field, "group/field"),
|
|
8816
9144
|
"data-required": props.required,
|
|
8817
9145
|
"data-invalid": error,
|
|
8818
9146
|
"data-readonly": readOnly,
|
|
8819
9147
|
children: [
|
|
8820
|
-
props.label && /* @__PURE__ */
|
|
8821
|
-
/* @__PURE__ */
|
|
9148
|
+
props.label && /* @__PURE__ */ jsx86(_Label, { ...labelProps, children: props.label }),
|
|
9149
|
+
/* @__PURE__ */ jsx86(
|
|
8822
9150
|
StateManagedSelect$1,
|
|
8823
9151
|
{
|
|
8824
9152
|
...props,
|
|
@@ -8852,19 +9180,19 @@ var Multiselect = ({
|
|
|
8852
9180
|
components: {
|
|
8853
9181
|
Input: Input4,
|
|
8854
9182
|
MultiValueRemove: MultiValueRemove2,
|
|
8855
|
-
DropdownIndicator: ({ innerProps, isDisabled }) => /* @__PURE__ */
|
|
9183
|
+
DropdownIndicator: ({ innerProps, isDisabled }) => /* @__PURE__ */ jsx86(
|
|
8856
9184
|
"button",
|
|
8857
9185
|
{
|
|
8858
9186
|
...innerProps,
|
|
8859
9187
|
disabled: isDisabled,
|
|
8860
9188
|
className: classNames3.icon,
|
|
8861
|
-
children: /* @__PURE__ */
|
|
9189
|
+
children: /* @__PURE__ */ jsx86(ChevronDown, { className: "size-4" })
|
|
8862
9190
|
}
|
|
8863
9191
|
)
|
|
8864
9192
|
}
|
|
8865
9193
|
}
|
|
8866
9194
|
),
|
|
8867
|
-
/* @__PURE__ */
|
|
9195
|
+
/* @__PURE__ */ jsx86(HelpText, { description, errorMessage })
|
|
8868
9196
|
]
|
|
8869
9197
|
}
|
|
8870
9198
|
)
|
|
@@ -8873,15 +9201,15 @@ var Multiselect = ({
|
|
|
8873
9201
|
};
|
|
8874
9202
|
|
|
8875
9203
|
// src/NumberField/NumberField.tsx
|
|
8876
|
-
import { forwardRef as
|
|
9204
|
+
import { forwardRef as forwardRef24 } from "react";
|
|
8877
9205
|
import { Group as Group4, Input as Input5, NumberField } from "react-aria-components";
|
|
8878
|
-
import { cn as
|
|
9206
|
+
import { cn as cn49, useClassNames as useClassNames49 } from "@marigold/system";
|
|
8879
9207
|
|
|
8880
9208
|
// src/NumberField/StepButton.tsx
|
|
8881
|
-
import { Button as
|
|
8882
|
-
import { cn as
|
|
8883
|
-
import { jsx as
|
|
8884
|
-
var Plus = () => /* @__PURE__ */
|
|
9209
|
+
import { Button as Button7 } from "react-aria-components";
|
|
9210
|
+
import { cn as cn48 } from "@marigold/system";
|
|
9211
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
9212
|
+
var Plus = () => /* @__PURE__ */ jsx87("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx87(
|
|
8885
9213
|
"path",
|
|
8886
9214
|
{
|
|
8887
9215
|
fillRule: "evenodd",
|
|
@@ -8889,7 +9217,7 @@ var Plus = () => /* @__PURE__ */ jsx78("svg", { width: 16, height: 16, viewBox:
|
|
|
8889
9217
|
d: "M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z"
|
|
8890
9218
|
}
|
|
8891
9219
|
) });
|
|
8892
|
-
var Minus = () => /* @__PURE__ */
|
|
9220
|
+
var Minus = () => /* @__PURE__ */ jsx87("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx87(
|
|
8893
9221
|
"path",
|
|
8894
9222
|
{
|
|
8895
9223
|
fillRule: "evenodd",
|
|
@@ -8899,259 +9227,94 @@ var Minus = () => /* @__PURE__ */ jsx78("svg", { width: 16, height: 16, viewBox:
|
|
|
8899
9227
|
) });
|
|
8900
9228
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
8901
9229
|
const Icon4 = direction === "up" ? Plus : Minus;
|
|
8902
|
-
return /* @__PURE__ */
|
|
8903
|
-
|
|
9230
|
+
return /* @__PURE__ */ jsx87(
|
|
9231
|
+
Button7,
|
|
8904
9232
|
{
|
|
8905
|
-
className:
|
|
9233
|
+
className: cn48(
|
|
8906
9234
|
[
|
|
8907
9235
|
"flex items-center justify-center",
|
|
8908
9236
|
"cursor-pointer data-disabled:cursor-not-allowed"
|
|
8909
9237
|
],
|
|
8910
9238
|
className
|
|
8911
|
-
),
|
|
8912
|
-
...props,
|
|
8913
|
-
children: /* @__PURE__ */
|
|
8914
|
-
}
|
|
8915
|
-
);
|
|
8916
|
-
};
|
|
8917
|
-
|
|
8918
|
-
// src/NumberField/NumberField.tsx
|
|
8919
|
-
import { jsx as jsx79, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
8920
|
-
var _NumberField = forwardRef21(
|
|
8921
|
-
({
|
|
8922
|
-
variant,
|
|
8923
|
-
size: size2,
|
|
8924
|
-
disabled,
|
|
8925
|
-
required,
|
|
8926
|
-
readOnly,
|
|
8927
|
-
error,
|
|
8928
|
-
hideStepper,
|
|
8929
|
-
...rest
|
|
8930
|
-
}, ref) => {
|
|
8931
|
-
const classNames3 = useClassNames44({
|
|
8932
|
-
component: "NumberField",
|
|
8933
|
-
size: size2,
|
|
8934
|
-
variant
|
|
8935
|
-
});
|
|
8936
|
-
const props = {
|
|
8937
|
-
isDisabled: disabled,
|
|
8938
|
-
isReadOnly: readOnly,
|
|
8939
|
-
isInvalid: error,
|
|
8940
|
-
isRequired: required,
|
|
8941
|
-
...rest
|
|
8942
|
-
};
|
|
8943
|
-
const showStepper = !hideStepper && !readOnly;
|
|
8944
|
-
return /* @__PURE__ */ jsx79(
|
|
8945
|
-
FieldBase,
|
|
8946
|
-
{
|
|
8947
|
-
as: NumberField,
|
|
8948
|
-
...props,
|
|
8949
|
-
"data-readonly": readOnly ? "true" : void 0,
|
|
8950
|
-
"data-stepper": showStepper ? "true" : void 0,
|
|
8951
|
-
children: /* @__PURE__ */ jsxs29(Group4, { className: cn43("flex items-stretch", classNames3.group), children: [
|
|
8952
|
-
showStepper && /* @__PURE__ */ jsx79(
|
|
8953
|
-
_StepButton,
|
|
8954
|
-
{
|
|
8955
|
-
className: classNames3.stepper,
|
|
8956
|
-
direction: "down",
|
|
8957
|
-
slot: "decrement"
|
|
8958
|
-
}
|
|
8959
|
-
),
|
|
8960
|
-
/* @__PURE__ */ jsx79(
|
|
8961
|
-
Input5,
|
|
8962
|
-
{
|
|
8963
|
-
ref,
|
|
8964
|
-
className: cn43("h-full flex-1 outline-none", classNames3.input)
|
|
8965
|
-
}
|
|
8966
|
-
),
|
|
8967
|
-
showStepper && /* @__PURE__ */ jsx79(
|
|
8968
|
-
_StepButton,
|
|
8969
|
-
{
|
|
8970
|
-
className: classNames3.stepper,
|
|
8971
|
-
direction: "up",
|
|
8972
|
-
slot: "increment"
|
|
8973
|
-
}
|
|
8974
|
-
)
|
|
8975
|
-
] })
|
|
8976
|
-
}
|
|
8977
|
-
);
|
|
8978
|
-
}
|
|
8979
|
-
);
|
|
8980
|
-
|
|
8981
|
-
// src/Overlay/NonModal.tsx
|
|
8982
|
-
import { forwardRef as forwardRef22, useContext as useContext19 } from "react";
|
|
8983
|
-
import {
|
|
8984
|
-
OverlayTriggerStateContext as OverlayTriggerStateContext2,
|
|
8985
|
-
Provider as Provider2
|
|
8986
|
-
} from "react-aria-components";
|
|
8987
|
-
import {
|
|
8988
|
-
useOverlayTriggerState
|
|
8989
|
-
} from "react-stately";
|
|
8990
|
-
import { FocusScope } from "@react-aria/focus";
|
|
8991
|
-
import { DismissButton, Overlay } from "@react-aria/overlays";
|
|
8992
|
-
import { useIsSSR as useIsSSR2 } from "@react-aria/ssr";
|
|
8993
|
-
import {
|
|
8994
|
-
filterDOMProps,
|
|
8995
|
-
mergeProps,
|
|
8996
|
-
useEnterAnimation,
|
|
8997
|
-
useExitAnimation,
|
|
8998
|
-
useObjectRef,
|
|
8999
|
-
useViewportSize
|
|
9000
|
-
} from "@react-aria/utils";
|
|
9001
|
-
|
|
9002
|
-
// src/utils/useRenderProps.tsx
|
|
9003
|
-
import { useMemo as useMemo5 } from "react";
|
|
9004
|
-
function useRenderProps(props) {
|
|
9005
|
-
let {
|
|
9006
|
-
className,
|
|
9007
|
-
style,
|
|
9008
|
-
children,
|
|
9009
|
-
defaultClassName = void 0,
|
|
9010
|
-
defaultChildren = void 0,
|
|
9011
|
-
defaultStyle,
|
|
9012
|
-
values
|
|
9013
|
-
} = props;
|
|
9014
|
-
return useMemo5(() => {
|
|
9015
|
-
let computedClassName;
|
|
9016
|
-
let computedStyle;
|
|
9017
|
-
let computedChildren;
|
|
9018
|
-
if (typeof className === "function") {
|
|
9019
|
-
computedClassName = className({ ...values, defaultClassName });
|
|
9020
|
-
} else {
|
|
9021
|
-
computedClassName = className;
|
|
9022
|
-
}
|
|
9023
|
-
if (typeof style === "function") {
|
|
9024
|
-
computedStyle = style({ ...values, defaultStyle: defaultStyle || {} });
|
|
9025
|
-
} else {
|
|
9026
|
-
computedStyle = style;
|
|
9027
|
-
}
|
|
9028
|
-
if (typeof children === "function") {
|
|
9029
|
-
computedChildren = children({ ...values, defaultChildren });
|
|
9030
|
-
} else if (children == null) {
|
|
9031
|
-
computedChildren = defaultChildren;
|
|
9032
|
-
} else {
|
|
9033
|
-
computedChildren = children;
|
|
9034
|
-
}
|
|
9035
|
-
return {
|
|
9036
|
-
className: computedClassName != null ? computedClassName : defaultClassName,
|
|
9037
|
-
style: computedStyle || defaultStyle ? { ...defaultStyle, ...computedStyle } : void 0,
|
|
9038
|
-
children: computedChildren != null ? computedChildren : defaultChildren,
|
|
9039
|
-
"data-rac": ""
|
|
9040
|
-
};
|
|
9041
|
-
}, [
|
|
9042
|
-
className,
|
|
9043
|
-
style,
|
|
9044
|
-
children,
|
|
9045
|
-
defaultClassName,
|
|
9046
|
-
defaultChildren,
|
|
9047
|
-
defaultStyle,
|
|
9048
|
-
values
|
|
9049
|
-
]);
|
|
9050
|
-
}
|
|
9051
|
-
|
|
9052
|
-
// src/Overlay/useNonModal.ts
|
|
9053
|
-
import { useOverlay } from "@react-aria/overlays";
|
|
9054
|
-
var useNonModal = ({ nonModalRef, keyboardDismissable = true }, state) => {
|
|
9055
|
-
let { overlayProps } = useOverlay(
|
|
9056
|
-
{
|
|
9057
|
-
isOpen: state.isOpen,
|
|
9058
|
-
onClose: state.close,
|
|
9059
|
-
shouldCloseOnBlur: false,
|
|
9060
|
-
isDismissable: false,
|
|
9061
|
-
isKeyboardDismissDisabled: keyboardDismissable ? false : true
|
|
9062
|
-
},
|
|
9063
|
-
nonModalRef
|
|
9064
|
-
);
|
|
9065
|
-
return {
|
|
9066
|
-
nonModalProps: overlayProps
|
|
9067
|
-
};
|
|
9068
|
-
};
|
|
9069
|
-
|
|
9070
|
-
// src/Overlay/NonModal.tsx
|
|
9071
|
-
import { jsx as jsx80, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9072
|
-
var NonModalInner = ({ state, isExiting, ...props }) => {
|
|
9073
|
-
const { nonModalProps } = useNonModal(props, state);
|
|
9074
|
-
const ref = props.nonModalRef;
|
|
9075
|
-
const portalContainer = usePortalContainer();
|
|
9076
|
-
const isEntering = useEnterAnimation(ref) || props.isEntering || false;
|
|
9077
|
-
const renderProps = useRenderProps({
|
|
9078
|
-
...props,
|
|
9079
|
-
defaultClassName: "react-aria-NonModalOverlay",
|
|
9080
|
-
values: {
|
|
9081
|
-
isEntering,
|
|
9082
|
-
isExiting,
|
|
9083
|
-
state
|
|
9084
|
-
}
|
|
9085
|
-
});
|
|
9086
|
-
const viewport = useViewportSize();
|
|
9087
|
-
const style = {
|
|
9088
|
-
...renderProps.style,
|
|
9089
|
-
"--visual-viewport-height": viewport.height + "px"
|
|
9090
|
-
};
|
|
9091
|
-
const overlay = /* @__PURE__ */ jsxs30(
|
|
9092
|
-
"div",
|
|
9093
|
-
{
|
|
9094
|
-
...mergeProps(filterDOMProps(props), nonModalProps),
|
|
9095
|
-
...renderProps,
|
|
9096
|
-
tabIndex: -1,
|
|
9097
|
-
"aria-label": props["aria-label"],
|
|
9098
|
-
"aria-labelledby": props["aria-labelledby"],
|
|
9099
|
-
ref,
|
|
9100
|
-
slot: props.slot || void 0,
|
|
9101
|
-
style,
|
|
9102
|
-
"data-entering": isEntering || void 0,
|
|
9103
|
-
"data-exiting": isExiting || void 0,
|
|
9104
|
-
children: [
|
|
9105
|
-
renderProps.children,
|
|
9106
|
-
/* @__PURE__ */ jsx80(DismissButton, { onDismiss: state.close })
|
|
9107
|
-
]
|
|
9108
|
-
}
|
|
9109
|
-
);
|
|
9110
|
-
return /* @__PURE__ */ jsx80(
|
|
9111
|
-
Overlay,
|
|
9112
|
-
{
|
|
9113
|
-
isExiting,
|
|
9114
|
-
portalContainer,
|
|
9115
|
-
disableFocusManagement: true,
|
|
9116
|
-
children: /* @__PURE__ */ jsx80(FocusScope, { restoreFocus: true, children: /* @__PURE__ */ jsx80(Provider2, { values: [[OverlayTriggerStateContext2, state]], children: overlay }) })
|
|
9239
|
+
),
|
|
9240
|
+
...props,
|
|
9241
|
+
children: /* @__PURE__ */ jsx87(Icon4, {})
|
|
9117
9242
|
}
|
|
9118
9243
|
);
|
|
9119
9244
|
};
|
|
9120
|
-
|
|
9121
|
-
|
|
9245
|
+
|
|
9246
|
+
// src/NumberField/NumberField.tsx
|
|
9247
|
+
import { jsx as jsx88, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9248
|
+
var _NumberField = forwardRef24(
|
|
9249
|
+
({
|
|
9250
|
+
variant,
|
|
9251
|
+
size: size2,
|
|
9252
|
+
disabled,
|
|
9253
|
+
required,
|
|
9254
|
+
readOnly,
|
|
9255
|
+
error,
|
|
9256
|
+
hideStepper,
|
|
9257
|
+
...rest
|
|
9258
|
+
}, ref) => {
|
|
9259
|
+
const classNames3 = useClassNames49({
|
|
9260
|
+
component: "NumberField",
|
|
9261
|
+
size: size2,
|
|
9262
|
+
variant
|
|
9263
|
+
});
|
|
9122
9264
|
const props = {
|
|
9123
|
-
|
|
9265
|
+
isDisabled: disabled,
|
|
9266
|
+
isReadOnly: readOnly,
|
|
9267
|
+
isInvalid: error,
|
|
9268
|
+
isRequired: required,
|
|
9124
9269
|
...rest
|
|
9125
9270
|
};
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
const state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;
|
|
9130
|
-
const isExiting = useExitAnimation(ref, state.isOpen) || props.isExiting || false;
|
|
9131
|
-
const isSSR = useIsSSR2();
|
|
9132
|
-
if (state && !state.isOpen && !isExiting || isSSR) {
|
|
9133
|
-
return null;
|
|
9134
|
-
}
|
|
9135
|
-
return /* @__PURE__ */ jsx80(
|
|
9136
|
-
NonModalInner,
|
|
9271
|
+
const showStepper = !hideStepper && !readOnly;
|
|
9272
|
+
return /* @__PURE__ */ jsx88(
|
|
9273
|
+
FieldBase,
|
|
9137
9274
|
{
|
|
9275
|
+
as: NumberField,
|
|
9138
9276
|
...props,
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9277
|
+
"data-readonly": readOnly ? "true" : void 0,
|
|
9278
|
+
"data-stepper": showStepper ? "true" : void 0,
|
|
9279
|
+
children: /* @__PURE__ */ jsxs30(Group4, { className: cn49("flex items-stretch", classNames3.group), children: [
|
|
9280
|
+
showStepper && /* @__PURE__ */ jsx88(
|
|
9281
|
+
_StepButton,
|
|
9282
|
+
{
|
|
9283
|
+
className: classNames3.stepper,
|
|
9284
|
+
direction: "down",
|
|
9285
|
+
slot: "decrement"
|
|
9286
|
+
}
|
|
9287
|
+
),
|
|
9288
|
+
/* @__PURE__ */ jsx88(
|
|
9289
|
+
Input5,
|
|
9290
|
+
{
|
|
9291
|
+
ref,
|
|
9292
|
+
className: cn49("h-full flex-1 outline-none", classNames3.input)
|
|
9293
|
+
}
|
|
9294
|
+
),
|
|
9295
|
+
showStepper && /* @__PURE__ */ jsx88(
|
|
9296
|
+
_StepButton,
|
|
9297
|
+
{
|
|
9298
|
+
className: classNames3.stepper,
|
|
9299
|
+
direction: "up",
|
|
9300
|
+
slot: "increment"
|
|
9301
|
+
}
|
|
9302
|
+
)
|
|
9303
|
+
] })
|
|
9142
9304
|
}
|
|
9143
9305
|
);
|
|
9144
9306
|
}
|
|
9145
9307
|
);
|
|
9146
9308
|
|
|
9147
9309
|
// src/Pagination/Pagination.tsx
|
|
9148
|
-
import { useEffect as
|
|
9149
|
-
import {
|
|
9310
|
+
import { useEffect as useEffect4, useRef as useRef9, useState as useState5 } from "react";
|
|
9311
|
+
import { FocusScope as FocusScope2, useFocusManager } from "@react-aria/focus";
|
|
9312
|
+
import { useClassNames as useClassNames52 } from "@marigold/system";
|
|
9150
9313
|
|
|
9151
9314
|
// src/Pagination/Ellipsis.tsx
|
|
9152
|
-
import { jsx as
|
|
9315
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
9153
9316
|
var Ellipsis = () => {
|
|
9154
|
-
return /* @__PURE__ */
|
|
9317
|
+
return /* @__PURE__ */ jsx89(
|
|
9155
9318
|
"span",
|
|
9156
9319
|
{
|
|
9157
9320
|
className: "text-text-base flex h-8 w-8 items-center justify-center",
|
|
@@ -9162,13 +9325,13 @@ var Ellipsis = () => {
|
|
|
9162
9325
|
};
|
|
9163
9326
|
|
|
9164
9327
|
// src/Pagination/NavigationButton.tsx
|
|
9165
|
-
import
|
|
9328
|
+
import { useRef as useRef7 } from "react";
|
|
9166
9329
|
import { useButton as useButton2 } from "@react-aria/button";
|
|
9167
|
-
import { cn as
|
|
9330
|
+
import { cn as cn50, useClassNames as useClassNames50 } from "@marigold/system";
|
|
9168
9331
|
import { jsxs as jsxs31 } from "react/jsx-runtime";
|
|
9169
9332
|
var NavigationButton = (props) => {
|
|
9170
|
-
const ref =
|
|
9171
|
-
const classNames3 =
|
|
9333
|
+
const ref = useRef7(null);
|
|
9334
|
+
const classNames3 = useClassNames50({
|
|
9172
9335
|
component: "Pagination"
|
|
9173
9336
|
});
|
|
9174
9337
|
let { buttonProps } = useButton2(props, ref);
|
|
@@ -9181,12 +9344,6 @@ var NavigationButton = (props) => {
|
|
|
9181
9344
|
position: position2,
|
|
9182
9345
|
...rest
|
|
9183
9346
|
} = props;
|
|
9184
|
-
useEffect4(() => {
|
|
9185
|
-
if (registerRef) {
|
|
9186
|
-
registerRef(ref.current);
|
|
9187
|
-
return () => registerRef(null);
|
|
9188
|
-
}
|
|
9189
|
-
}, [registerRef]);
|
|
9190
9347
|
return /* @__PURE__ */ jsxs31(
|
|
9191
9348
|
"button",
|
|
9192
9349
|
{
|
|
@@ -9194,7 +9351,7 @@ var NavigationButton = (props) => {
|
|
|
9194
9351
|
...buttonProps,
|
|
9195
9352
|
...rest,
|
|
9196
9353
|
disabled: isDisabled,
|
|
9197
|
-
className:
|
|
9354
|
+
className: cn50(classNames3.navigationButton, controlLabel && "w-24 px-2"),
|
|
9198
9355
|
"data-selected": isSelected,
|
|
9199
9356
|
children: [
|
|
9200
9357
|
position2 === "left" && children,
|
|
@@ -9206,24 +9363,18 @@ var NavigationButton = (props) => {
|
|
|
9206
9363
|
};
|
|
9207
9364
|
|
|
9208
9365
|
// src/Pagination/PageButton.tsx
|
|
9209
|
-
import {
|
|
9366
|
+
import { useRef as useRef8 } from "react";
|
|
9210
9367
|
import { useButton as useButton3 } from "@react-aria/button";
|
|
9211
|
-
import { useClassNames as
|
|
9212
|
-
import { jsx as
|
|
9368
|
+
import { useClassNames as useClassNames51 } from "@marigold/system";
|
|
9369
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
9213
9370
|
var PageButton = (props) => {
|
|
9214
|
-
const ref =
|
|
9215
|
-
const classNames3 =
|
|
9371
|
+
const ref = useRef8(null);
|
|
9372
|
+
const classNames3 = useClassNames51({
|
|
9216
9373
|
component: "Pagination"
|
|
9217
9374
|
});
|
|
9218
9375
|
let { buttonProps } = useButton3(props, ref);
|
|
9219
|
-
let { page, selected,
|
|
9220
|
-
|
|
9221
|
-
if (registerRef) {
|
|
9222
|
-
registerRef(ref.current);
|
|
9223
|
-
return () => registerRef(null);
|
|
9224
|
-
}
|
|
9225
|
-
}, [registerRef]);
|
|
9226
|
-
return /* @__PURE__ */ jsx82(
|
|
9376
|
+
let { page, selected, isDisabled } = props;
|
|
9377
|
+
return /* @__PURE__ */ jsx90(
|
|
9227
9378
|
"button",
|
|
9228
9379
|
{
|
|
9229
9380
|
ref,
|
|
@@ -9239,122 +9390,6 @@ var PageButton = (props) => {
|
|
|
9239
9390
|
);
|
|
9240
9391
|
};
|
|
9241
9392
|
|
|
9242
|
-
// src/Pagination/useKeyboardNavigation.tsx
|
|
9243
|
-
import { useCallback as useCallback4, useRef as useRef7, useState as useState5 } from "react";
|
|
9244
|
-
import { useKeyboard } from "@react-aria/interactions";
|
|
9245
|
-
var NavigationTypes = {
|
|
9246
|
-
Prev: "prev",
|
|
9247
|
-
Next: "next",
|
|
9248
|
-
Page: "page",
|
|
9249
|
-
Ellipsis: "ellipsis"
|
|
9250
|
-
};
|
|
9251
|
-
var useKeyboardNavigation = ({
|
|
9252
|
-
page,
|
|
9253
|
-
totalPages,
|
|
9254
|
-
onChange: onChange2 = () => {
|
|
9255
|
-
}
|
|
9256
|
-
}) => {
|
|
9257
|
-
const containerRef = useRef7(null);
|
|
9258
|
-
const [focusedItem, setFocusedItem] = useState5({
|
|
9259
|
-
type: "page",
|
|
9260
|
-
value: page
|
|
9261
|
-
});
|
|
9262
|
-
const navigationItems = useRef7([]);
|
|
9263
|
-
const buttonRefs = useRef7(/* @__PURE__ */ new Map());
|
|
9264
|
-
const isItemDisabled = useCallback4(
|
|
9265
|
-
(item) => {
|
|
9266
|
-
if (item.type === NavigationTypes.Prev) return page <= 1;
|
|
9267
|
-
if (item.type === NavigationTypes.Next) return page >= totalPages;
|
|
9268
|
-
return item.type === NavigationTypes.Ellipsis;
|
|
9269
|
-
},
|
|
9270
|
-
[page, totalPages]
|
|
9271
|
-
);
|
|
9272
|
-
const findNextFocusableItem = useCallback4(
|
|
9273
|
-
(current, direction) => {
|
|
9274
|
-
const items = navigationItems.current.filter(
|
|
9275
|
-
(item) => !isItemDisabled(item)
|
|
9276
|
-
);
|
|
9277
|
-
const currentIndex = items.findIndex(
|
|
9278
|
-
(item) => item.type === current.type && item.value === current.value
|
|
9279
|
-
);
|
|
9280
|
-
if (currentIndex === -1) {
|
|
9281
|
-
return items[0] || { type: NavigationTypes.Page, value: page };
|
|
9282
|
-
}
|
|
9283
|
-
const nextIndex = direction === "next" ? (currentIndex + 1) % items.length : (currentIndex - 1 + items.length) % items.length;
|
|
9284
|
-
return items[nextIndex];
|
|
9285
|
-
},
|
|
9286
|
-
[isItemDisabled, page]
|
|
9287
|
-
);
|
|
9288
|
-
const focusItem = useCallback4(
|
|
9289
|
-
(item) => {
|
|
9290
|
-
if (isItemDisabled(item)) return;
|
|
9291
|
-
const key = `${item.type}-${item.value}`;
|
|
9292
|
-
const element = buttonRefs.current.get(key);
|
|
9293
|
-
if (element && typeof element.focus === "function") {
|
|
9294
|
-
element.focus();
|
|
9295
|
-
setFocusedItem(item);
|
|
9296
|
-
}
|
|
9297
|
-
},
|
|
9298
|
-
[isItemDisabled]
|
|
9299
|
-
);
|
|
9300
|
-
const { keyboardProps } = useKeyboard({
|
|
9301
|
-
onKeyDown: (e) => {
|
|
9302
|
-
let newFocusedItem = focusedItem;
|
|
9303
|
-
switch (e.key) {
|
|
9304
|
-
case "ArrowLeft":
|
|
9305
|
-
newFocusedItem = findNextFocusableItem(focusedItem, "prev");
|
|
9306
|
-
break;
|
|
9307
|
-
case "ArrowRight":
|
|
9308
|
-
newFocusedItem = findNextFocusableItem(focusedItem, "next");
|
|
9309
|
-
break;
|
|
9310
|
-
case "Home":
|
|
9311
|
-
newFocusedItem = navigationItems.current.find((item) => !isItemDisabled(item)) || focusedItem;
|
|
9312
|
-
break;
|
|
9313
|
-
case "End":
|
|
9314
|
-
newFocusedItem = [...navigationItems.current].reverse().find((item) => !isItemDisabled(item)) || focusedItem;
|
|
9315
|
-
break;
|
|
9316
|
-
case "Enter":
|
|
9317
|
-
case " ":
|
|
9318
|
-
if (isItemDisabled(focusedItem)) return;
|
|
9319
|
-
if (focusedItem.type === NavigationTypes.Page && typeof focusedItem.value === "number") {
|
|
9320
|
-
onChange2(focusedItem.value);
|
|
9321
|
-
} else if (focusedItem.type === NavigationTypes.Prev && page > 1) {
|
|
9322
|
-
onChange2(page - 1);
|
|
9323
|
-
} else if (focusedItem.type === NavigationTypes.Next && page < totalPages) {
|
|
9324
|
-
onChange2(page + 1);
|
|
9325
|
-
}
|
|
9326
|
-
break;
|
|
9327
|
-
default:
|
|
9328
|
-
return;
|
|
9329
|
-
}
|
|
9330
|
-
if (newFocusedItem !== focusedItem) {
|
|
9331
|
-
focusItem(newFocusedItem);
|
|
9332
|
-
}
|
|
9333
|
-
}
|
|
9334
|
-
});
|
|
9335
|
-
const registerRef = useCallback4(
|
|
9336
|
-
(type, value, ref) => {
|
|
9337
|
-
const key = `${type}-${value}`;
|
|
9338
|
-
if (ref) {
|
|
9339
|
-
buttonRefs.current.set(key, ref);
|
|
9340
|
-
} else {
|
|
9341
|
-
buttonRefs.current.delete(key);
|
|
9342
|
-
}
|
|
9343
|
-
},
|
|
9344
|
-
[]
|
|
9345
|
-
);
|
|
9346
|
-
const setNavigationItems = useCallback4((items) => {
|
|
9347
|
-
navigationItems.current = items;
|
|
9348
|
-
}, []);
|
|
9349
|
-
return {
|
|
9350
|
-
containerRef,
|
|
9351
|
-
keyboardProps,
|
|
9352
|
-
registerRef,
|
|
9353
|
-
setNavigationItems,
|
|
9354
|
-
setFocusedItem
|
|
9355
|
-
};
|
|
9356
|
-
};
|
|
9357
|
-
|
|
9358
9393
|
// src/Pagination/usePageRange.tsx
|
|
9359
9394
|
var usePageRange = ({ currentPage, totalPages }) => {
|
|
9360
9395
|
const getPageRange = () => {
|
|
@@ -9386,23 +9421,21 @@ var usePageRange = ({ currentPage, totalPages }) => {
|
|
|
9386
9421
|
};
|
|
9387
9422
|
|
|
9388
9423
|
// src/Pagination/Pagination.tsx
|
|
9389
|
-
import { jsx as
|
|
9390
|
-
var
|
|
9391
|
-
|
|
9392
|
-
page,
|
|
9393
|
-
totalItems,
|
|
9424
|
+
import { Fragment as Fragment9, jsx as jsx91, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
9425
|
+
var InnerPagination = ({
|
|
9426
|
+
currentPage,
|
|
9394
9427
|
pageSize,
|
|
9395
|
-
|
|
9396
|
-
|
|
9428
|
+
totalPages,
|
|
9429
|
+
pageRange,
|
|
9430
|
+
setCurrentPage,
|
|
9431
|
+
onChange: onChange2,
|
|
9397
9432
|
controlLabels
|
|
9398
9433
|
}) => {
|
|
9399
|
-
const
|
|
9400
|
-
const
|
|
9401
|
-
const
|
|
9402
|
-
const
|
|
9403
|
-
|
|
9404
|
-
});
|
|
9405
|
-
useEffect6(() => {
|
|
9434
|
+
const focusManager = useFocusManager();
|
|
9435
|
+
const isFirstPage = currentPage === 1;
|
|
9436
|
+
const isLastPage = currentPage === totalPages || totalPages === 0;
|
|
9437
|
+
const isFirstRender = useRef9(true);
|
|
9438
|
+
useEffect4(() => {
|
|
9406
9439
|
if (isFirstRender.current) {
|
|
9407
9440
|
isFirstRender.current = false;
|
|
9408
9441
|
return;
|
|
@@ -9411,96 +9444,110 @@ var _Pagination = ({
|
|
|
9411
9444
|
}, [pageSize]);
|
|
9412
9445
|
const handlePageChange = (newPage) => {
|
|
9413
9446
|
setCurrentPage(newPage);
|
|
9414
|
-
onChange2
|
|
9447
|
+
if (onChange2) {
|
|
9448
|
+
onChange2(newPage);
|
|
9449
|
+
}
|
|
9415
9450
|
};
|
|
9416
|
-
const
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9451
|
+
const classNames3 = useClassNames52({ component: "Pagination" });
|
|
9452
|
+
const handleKeyDown = (onEnter) => (e) => {
|
|
9453
|
+
if (e.key === "ArrowRight") {
|
|
9454
|
+
e.preventDefault();
|
|
9455
|
+
focusManager == null ? void 0 : focusManager.focusNext({ wrap: true });
|
|
9456
|
+
} else if (e.key === "ArrowLeft") {
|
|
9457
|
+
e.preventDefault();
|
|
9458
|
+
focusManager == null ? void 0 : focusManager.focusPrevious({ wrap: true });
|
|
9459
|
+
} else if (e.key === "Enter" || e.key === " ") {
|
|
9460
|
+
e.preventDefault();
|
|
9461
|
+
onEnter();
|
|
9462
|
+
}
|
|
9463
|
+
};
|
|
9464
|
+
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
9465
|
+
/* @__PURE__ */ jsx91(
|
|
9466
|
+
NavigationButton,
|
|
9467
|
+
{
|
|
9468
|
+
onClick: () => handlePageChange(Math.max(1, currentPage - 1)),
|
|
9469
|
+
"aria-label": "Page previous",
|
|
9470
|
+
isDisabled: isFirstPage,
|
|
9471
|
+
controlLabel: controlLabels == null ? void 0 : controlLabels[0],
|
|
9472
|
+
position: "left",
|
|
9473
|
+
onKeyDown: handleKeyDown(() => handlePageChange(currentPage - 1)),
|
|
9474
|
+
children: /* @__PURE__ */ jsx91(ChevronLeft, { className: classNames3.icon })
|
|
9475
|
+
}
|
|
9476
|
+
),
|
|
9477
|
+
/* @__PURE__ */ jsx91("div", { className: "flex items-center space-x-2", children: totalPages > 0 ? pageRange.map(
|
|
9478
|
+
(pageNumber, index2) => pageNumber === "ellipsis" ? /* @__PURE__ */ jsx91(Ellipsis, {}, `ellipsis-${index2}`) : /* @__PURE__ */ jsx91(
|
|
9479
|
+
PageButton,
|
|
9480
|
+
{
|
|
9481
|
+
page: pageNumber,
|
|
9482
|
+
selected: pageNumber === currentPage,
|
|
9483
|
+
onClick: () => handlePageChange(pageNumber),
|
|
9484
|
+
onKeyDown: handleKeyDown(() => handlePageChange(pageNumber))
|
|
9485
|
+
},
|
|
9486
|
+
pageNumber
|
|
9487
|
+
)
|
|
9488
|
+
) : /* @__PURE__ */ jsx91(PageButton, { page: 1, isDisabled: true }, 1) }),
|
|
9489
|
+
/* @__PURE__ */ jsx91(
|
|
9490
|
+
NavigationButton,
|
|
9491
|
+
{
|
|
9492
|
+
onClick: () => handlePageChange(Math.min(totalPages, currentPage + 1)),
|
|
9493
|
+
"aria-label": "Page next",
|
|
9494
|
+
isDisabled: isLastPage,
|
|
9495
|
+
controlLabel: controlLabels == null ? void 0 : controlLabels[1],
|
|
9496
|
+
position: "right",
|
|
9497
|
+
onKeyDown: handleKeyDown(() => handlePageChange(currentPage + 1)),
|
|
9498
|
+
children: /* @__PURE__ */ jsx91(ChevronRight, { className: classNames3.icon })
|
|
9499
|
+
}
|
|
9500
|
+
)
|
|
9501
|
+
] });
|
|
9502
|
+
};
|
|
9503
|
+
var _Pagination = ({
|
|
9504
|
+
defaultPage = 1,
|
|
9505
|
+
page,
|
|
9506
|
+
totalItems,
|
|
9507
|
+
pageSize,
|
|
9508
|
+
...props
|
|
9509
|
+
}) => {
|
|
9510
|
+
const [currentPage, setCurrentPage] = useState5(page != null ? page : defaultPage);
|
|
9511
|
+
const totalPages = Math.ceil(totalItems / pageSize);
|
|
9421
9512
|
const pageRange = usePageRange({ currentPage, totalPages });
|
|
9422
|
-
|
|
9423
|
-
const items = [
|
|
9424
|
-
{ type: NavigationTypes.Prev, value: currentPage - 1 },
|
|
9425
|
-
...pageRange.map((value) => ({
|
|
9426
|
-
type: typeof value === "number" ? NavigationTypes.Page : NavigationTypes.Ellipsis,
|
|
9427
|
-
value
|
|
9428
|
-
})),
|
|
9429
|
-
{ type: NavigationTypes.Next, value: currentPage + 1 }
|
|
9430
|
-
];
|
|
9431
|
-
setNavigationItems(items);
|
|
9432
|
-
}, [pageRange, currentPage, setNavigationItems]);
|
|
9433
|
-
useEffect6(() => {
|
|
9434
|
-
setFocusedItem({ type: NavigationTypes.Page, value: currentPage });
|
|
9435
|
-
}, [currentPage, setFocusedItem]);
|
|
9436
|
-
const isFirstPage = currentPage === 1;
|
|
9437
|
-
const isLastPage = currentPage === totalPages || totalPages === 0;
|
|
9438
|
-
return /* @__PURE__ */ jsxs32(
|
|
9513
|
+
return /* @__PURE__ */ jsx91(
|
|
9439
9514
|
"nav",
|
|
9440
9515
|
{
|
|
9441
9516
|
className: "flex items-center justify-center space-x-2",
|
|
9442
9517
|
"aria-label": `Page ${currentPage} of ${totalPages}`,
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9446
|
-
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9452
|
-
|
|
9453
|
-
|
|
9454
|
-
children: /* @__PURE__ */ jsx83(ChevronLeft, { className: cn45(classNames3.icon) })
|
|
9455
|
-
}
|
|
9456
|
-
),
|
|
9457
|
-
/* @__PURE__ */ jsx83("div", { className: "flex items-center space-x-2", children: totalPages > 0 ? pageRange.map(
|
|
9458
|
-
(pageNumber, index2) => pageNumber === "ellipsis" ? /* @__PURE__ */ jsx83(Ellipsis, {}, `ellipsis-${index2}`) : /* @__PURE__ */ jsx83(
|
|
9459
|
-
PageButton,
|
|
9460
|
-
{
|
|
9461
|
-
page: pageNumber,
|
|
9462
|
-
selected: pageNumber === currentPage,
|
|
9463
|
-
onClick: () => handlePageChange(pageNumber),
|
|
9464
|
-
registerRef: (ref) => registerRef(NavigationTypes.Page, pageNumber, ref)
|
|
9465
|
-
},
|
|
9466
|
-
pageNumber
|
|
9467
|
-
)
|
|
9468
|
-
) : /* @__PURE__ */ jsx83(PageButton, { page: 1, isDisabled: true }, 1) }),
|
|
9469
|
-
/* @__PURE__ */ jsx83(
|
|
9470
|
-
NavigationButton,
|
|
9471
|
-
{
|
|
9472
|
-
onClick: () => handlePageChange(Math.min(totalPages, currentPage + 1)),
|
|
9473
|
-
"aria-label": "Page next",
|
|
9474
|
-
isDisabled: isLastPage,
|
|
9475
|
-
registerRef: (ref) => registerRef(NavigationTypes.Next, currentPage + 1, ref),
|
|
9476
|
-
controlLabel: controlLabels == null ? void 0 : controlLabels[1],
|
|
9477
|
-
position: "right",
|
|
9478
|
-
children: /* @__PURE__ */ jsx83(ChevronRight, { className: cn45(classNames3.icon) })
|
|
9479
|
-
}
|
|
9480
|
-
)
|
|
9481
|
-
]
|
|
9518
|
+
children: /* @__PURE__ */ jsx91(FocusScope2, { restoreFocus: true, children: /* @__PURE__ */ jsx91(
|
|
9519
|
+
InnerPagination,
|
|
9520
|
+
{
|
|
9521
|
+
pageSize,
|
|
9522
|
+
currentPage,
|
|
9523
|
+
totalPages,
|
|
9524
|
+
pageRange,
|
|
9525
|
+
setCurrentPage,
|
|
9526
|
+
...props
|
|
9527
|
+
}
|
|
9528
|
+
) })
|
|
9482
9529
|
}
|
|
9483
9530
|
);
|
|
9484
9531
|
};
|
|
9485
9532
|
|
|
9486
9533
|
// src/Radio/Radio.tsx
|
|
9487
9534
|
import {
|
|
9488
|
-
forwardRef as
|
|
9535
|
+
forwardRef as forwardRef25
|
|
9489
9536
|
} from "react";
|
|
9490
9537
|
import { Radio } from "react-aria-components";
|
|
9491
|
-
import { cn as
|
|
9538
|
+
import { cn as cn52, useClassNames as useClassNames54 } from "@marigold/system";
|
|
9492
9539
|
|
|
9493
9540
|
// src/Radio/Context.ts
|
|
9494
|
-
import { createContext as
|
|
9495
|
-
var RadioGroupContext =
|
|
9541
|
+
import { createContext as createContext12, useContext as useContext22 } from "react";
|
|
9542
|
+
var RadioGroupContext = createContext12(
|
|
9496
9543
|
null
|
|
9497
9544
|
);
|
|
9498
|
-
var useRadioGroupContext = () =>
|
|
9545
|
+
var useRadioGroupContext = () => useContext22(RadioGroupContext);
|
|
9499
9546
|
|
|
9500
9547
|
// src/Radio/RadioGroup.tsx
|
|
9501
9548
|
import { RadioGroup } from "react-aria-components";
|
|
9502
|
-
import { cn as
|
|
9503
|
-
import { jsx as
|
|
9549
|
+
import { cn as cn51, useClassNames as useClassNames53 } from "@marigold/system";
|
|
9550
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
9504
9551
|
var _RadioGroup = ({
|
|
9505
9552
|
variant,
|
|
9506
9553
|
size: size2,
|
|
@@ -9516,7 +9563,7 @@ var _RadioGroup = ({
|
|
|
9516
9563
|
width,
|
|
9517
9564
|
...rest
|
|
9518
9565
|
}) => {
|
|
9519
|
-
const classNames3 =
|
|
9566
|
+
const classNames3 = useClassNames53({ component: "Radio", variant, size: size2 });
|
|
9520
9567
|
const props = {
|
|
9521
9568
|
isDisabled: disabled,
|
|
9522
9569
|
isReadOnly: readOnly,
|
|
@@ -9524,7 +9571,7 @@ var _RadioGroup = ({
|
|
|
9524
9571
|
isInvalid: error,
|
|
9525
9572
|
...rest
|
|
9526
9573
|
};
|
|
9527
|
-
return /* @__PURE__ */
|
|
9574
|
+
return /* @__PURE__ */ jsx92(
|
|
9528
9575
|
FieldBase,
|
|
9529
9576
|
{
|
|
9530
9577
|
as: RadioGroup,
|
|
@@ -9535,18 +9582,18 @@ var _RadioGroup = ({
|
|
|
9535
9582
|
variant,
|
|
9536
9583
|
size: size2,
|
|
9537
9584
|
...props,
|
|
9538
|
-
children: /* @__PURE__ */
|
|
9585
|
+
children: /* @__PURE__ */ jsx92(
|
|
9539
9586
|
"div",
|
|
9540
9587
|
{
|
|
9541
9588
|
role: "presentation",
|
|
9542
9589
|
"data-testid": "group",
|
|
9543
9590
|
"data-orientation": orientation,
|
|
9544
|
-
className:
|
|
9591
|
+
className: cn51(
|
|
9545
9592
|
classNames3.group,
|
|
9546
9593
|
"flex items-start",
|
|
9547
9594
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
9548
9595
|
),
|
|
9549
|
-
children: /* @__PURE__ */
|
|
9596
|
+
children: /* @__PURE__ */ jsx92(RadioGroupContext.Provider, { value: { width, variant, size: size2 }, children })
|
|
9550
9597
|
}
|
|
9551
9598
|
)
|
|
9552
9599
|
}
|
|
@@ -9554,33 +9601,33 @@ var _RadioGroup = ({
|
|
|
9554
9601
|
};
|
|
9555
9602
|
|
|
9556
9603
|
// src/Radio/Radio.tsx
|
|
9557
|
-
import { Fragment as
|
|
9558
|
-
var Dot = () => /* @__PURE__ */
|
|
9559
|
-
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */
|
|
9604
|
+
import { Fragment as Fragment10, jsx as jsx93, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
9605
|
+
var Dot = () => /* @__PURE__ */ jsx93("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx93("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
9606
|
+
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx93(
|
|
9560
9607
|
"div",
|
|
9561
9608
|
{
|
|
9562
|
-
className:
|
|
9609
|
+
className: cn52(
|
|
9563
9610
|
"bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
|
|
9564
9611
|
className
|
|
9565
9612
|
),
|
|
9566
9613
|
"aria-hidden": "true",
|
|
9567
9614
|
...props,
|
|
9568
|
-
children: checked ? /* @__PURE__ */
|
|
9615
|
+
children: checked ? /* @__PURE__ */ jsx93(Dot, {}) : null
|
|
9569
9616
|
}
|
|
9570
9617
|
);
|
|
9571
|
-
var _Radio =
|
|
9618
|
+
var _Radio = forwardRef25(
|
|
9572
9619
|
({ value, disabled, width, children, ...props }, ref) => {
|
|
9573
9620
|
const { variant, size: size2, width: groupWidth } = useRadioGroupContext();
|
|
9574
|
-
const classNames3 =
|
|
9621
|
+
const classNames3 = useClassNames54({
|
|
9575
9622
|
component: "Radio",
|
|
9576
9623
|
variant: variant || props.variant,
|
|
9577
9624
|
size: size2 || props.size
|
|
9578
9625
|
});
|
|
9579
|
-
return /* @__PURE__ */
|
|
9626
|
+
return /* @__PURE__ */ jsx93(
|
|
9580
9627
|
Radio,
|
|
9581
9628
|
{
|
|
9582
9629
|
ref,
|
|
9583
|
-
className:
|
|
9630
|
+
className: cn52(
|
|
9584
9631
|
"group/radio",
|
|
9585
9632
|
"relative flex items-center gap-[1ch]",
|
|
9586
9633
|
width || groupWidth || "w-full",
|
|
@@ -9589,18 +9636,18 @@ var _Radio = forwardRef23(
|
|
|
9589
9636
|
value,
|
|
9590
9637
|
isDisabled: disabled,
|
|
9591
9638
|
...props,
|
|
9592
|
-
children: ({ isSelected }) => /* @__PURE__ */ jsxs33(
|
|
9593
|
-
/* @__PURE__ */
|
|
9639
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs33(Fragment10, { children: [
|
|
9640
|
+
/* @__PURE__ */ jsx93(
|
|
9594
9641
|
Icon3,
|
|
9595
9642
|
{
|
|
9596
9643
|
checked: isSelected,
|
|
9597
|
-
className:
|
|
9644
|
+
className: cn52(
|
|
9598
9645
|
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
9599
9646
|
classNames3.radio
|
|
9600
9647
|
)
|
|
9601
9648
|
}
|
|
9602
9649
|
),
|
|
9603
|
-
/* @__PURE__ */
|
|
9650
|
+
/* @__PURE__ */ jsx93("div", { className: classNames3.label, children })
|
|
9604
9651
|
] })
|
|
9605
9652
|
}
|
|
9606
9653
|
);
|
|
@@ -9609,10 +9656,10 @@ var _Radio = forwardRef23(
|
|
|
9609
9656
|
_Radio.Group = _RadioGroup;
|
|
9610
9657
|
|
|
9611
9658
|
// src/SearchField/SearchField.tsx
|
|
9612
|
-
import { forwardRef as
|
|
9659
|
+
import { forwardRef as forwardRef26 } from "react";
|
|
9613
9660
|
import { SearchField } from "react-aria-components";
|
|
9614
|
-
import { jsx as
|
|
9615
|
-
var _SearchField =
|
|
9661
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
9662
|
+
var _SearchField = forwardRef26(
|
|
9616
9663
|
({ disabled, required, readOnly, error, action, ...rest }, ref) => {
|
|
9617
9664
|
const props = {
|
|
9618
9665
|
...rest,
|
|
@@ -9621,7 +9668,7 @@ var _SearchField = forwardRef24(
|
|
|
9621
9668
|
isReadOnly: readOnly,
|
|
9622
9669
|
isInvalid: error
|
|
9623
9670
|
};
|
|
9624
|
-
return /* @__PURE__ */
|
|
9671
|
+
return /* @__PURE__ */ jsx94(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx94(
|
|
9625
9672
|
SearchInput,
|
|
9626
9673
|
{
|
|
9627
9674
|
ref,
|
|
@@ -9632,11 +9679,11 @@ var _SearchField = forwardRef24(
|
|
|
9632
9679
|
);
|
|
9633
9680
|
|
|
9634
9681
|
// src/Select/Select.tsx
|
|
9635
|
-
import { forwardRef as
|
|
9682
|
+
import { forwardRef as forwardRef27 } from "react";
|
|
9636
9683
|
import { Select as Select2, SelectValue } from "react-aria-components";
|
|
9637
|
-
import { cn as
|
|
9638
|
-
import { jsx as
|
|
9639
|
-
var _Select =
|
|
9684
|
+
import { cn as cn53, useClassNames as useClassNames55 } from "@marigold/system";
|
|
9685
|
+
import { jsx as jsx95, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
9686
|
+
var _Select = forwardRef27(
|
|
9640
9687
|
({
|
|
9641
9688
|
disabled,
|
|
9642
9689
|
required,
|
|
@@ -9656,22 +9703,22 @@ var _Select = forwardRef25(
|
|
|
9656
9703
|
onSelectionChange: onChange2,
|
|
9657
9704
|
...rest
|
|
9658
9705
|
};
|
|
9659
|
-
const classNames3 =
|
|
9706
|
+
const classNames3 = useClassNames55({ component: "Select", variant, size: size2 });
|
|
9660
9707
|
return /* @__PURE__ */ jsxs34(FieldBase, { as: Select2, ref, variant, size: size2, ...props, children: [
|
|
9661
9708
|
/* @__PURE__ */ jsxs34(
|
|
9662
9709
|
IconButton,
|
|
9663
9710
|
{
|
|
9664
|
-
className:
|
|
9711
|
+
className: cn53(
|
|
9665
9712
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
9666
9713
|
classNames3.select
|
|
9667
9714
|
),
|
|
9668
9715
|
children: [
|
|
9669
|
-
/* @__PURE__ */
|
|
9670
|
-
/* @__PURE__ */
|
|
9716
|
+
/* @__PURE__ */ jsx95(SelectValue, { className: "[&>[slot=description]]:hidden" }),
|
|
9717
|
+
/* @__PURE__ */ jsx95(ChevronDown, { className: cn53("size-4", classNames3.icon) })
|
|
9671
9718
|
]
|
|
9672
9719
|
}
|
|
9673
9720
|
),
|
|
9674
|
-
/* @__PURE__ */
|
|
9721
|
+
/* @__PURE__ */ jsx95(_Popover, { children: /* @__PURE__ */ jsx95(_ListBox, { items, children: props.children }) })
|
|
9675
9722
|
] });
|
|
9676
9723
|
}
|
|
9677
9724
|
);
|
|
@@ -9680,36 +9727,36 @@ _Select.Section = _ListBox.Section;
|
|
|
9680
9727
|
|
|
9681
9728
|
// src/SelectList/SelectList.tsx
|
|
9682
9729
|
import {
|
|
9683
|
-
forwardRef as
|
|
9730
|
+
forwardRef as forwardRef29
|
|
9684
9731
|
} from "react";
|
|
9685
9732
|
import { GridList as SelectList } from "react-aria-components";
|
|
9686
|
-
import { cn as
|
|
9733
|
+
import { cn as cn55, useClassNames as useClassNames56 } from "@marigold/system";
|
|
9687
9734
|
|
|
9688
9735
|
// src/SelectList/Context.ts
|
|
9689
|
-
import { createContext as
|
|
9690
|
-
var SelectListContext =
|
|
9736
|
+
import { createContext as createContext13, useContext as useContext23 } from "react";
|
|
9737
|
+
var SelectListContext = createContext13(
|
|
9691
9738
|
{}
|
|
9692
9739
|
);
|
|
9693
|
-
var useSelectListContext = () =>
|
|
9740
|
+
var useSelectListContext = () => useContext23(SelectListContext);
|
|
9694
9741
|
|
|
9695
9742
|
// src/SelectList/SelectListItem.tsx
|
|
9696
|
-
import { forwardRef as
|
|
9743
|
+
import { forwardRef as forwardRef28 } from "react";
|
|
9697
9744
|
import { GridListItem as SelectListItem } from "react-aria-components";
|
|
9698
|
-
import { cn as
|
|
9699
|
-
import { jsx as
|
|
9700
|
-
var _SelectListItem =
|
|
9745
|
+
import { cn as cn54 } from "@marigold/system";
|
|
9746
|
+
import { jsx as jsx96, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
9747
|
+
var _SelectListItem = forwardRef28(
|
|
9701
9748
|
({ children, ...props }, ref) => {
|
|
9702
9749
|
let textValue = typeof children === "string" ? children : void 0;
|
|
9703
9750
|
const { classNames: classNames3 } = useSelectListContext();
|
|
9704
|
-
return /* @__PURE__ */
|
|
9751
|
+
return /* @__PURE__ */ jsx96(
|
|
9705
9752
|
SelectListItem,
|
|
9706
9753
|
{
|
|
9707
9754
|
textValue,
|
|
9708
9755
|
...props,
|
|
9709
|
-
className:
|
|
9756
|
+
className: cn54("group-[layout=grid]/list:flex-row", classNames3 == null ? void 0 : classNames3.option),
|
|
9710
9757
|
ref,
|
|
9711
9758
|
children: ({ selectionMode }) => /* @__PURE__ */ jsxs35("div", { className: "flex gap-2", children: [
|
|
9712
|
-
selectionMode === "multiple" && /* @__PURE__ */
|
|
9759
|
+
selectionMode === "multiple" && /* @__PURE__ */ jsx96(_Checkbox, { slot: "selection" }),
|
|
9713
9760
|
children
|
|
9714
9761
|
] })
|
|
9715
9762
|
}
|
|
@@ -9718,21 +9765,21 @@ var _SelectListItem = forwardRef26(
|
|
|
9718
9765
|
);
|
|
9719
9766
|
|
|
9720
9767
|
// src/SelectList/SelectList.tsx
|
|
9721
|
-
import { jsx as
|
|
9722
|
-
var _SelectList =
|
|
9768
|
+
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
9769
|
+
var _SelectList = forwardRef29(
|
|
9723
9770
|
({ onChange: onChange2, ...rest }, ref) => {
|
|
9724
|
-
const classNames3 =
|
|
9771
|
+
const classNames3 = useClassNames56({ component: "ListBox" });
|
|
9725
9772
|
const props = {
|
|
9726
9773
|
onSelectionChange: onChange2,
|
|
9727
9774
|
...rest
|
|
9728
9775
|
};
|
|
9729
|
-
return /* @__PURE__ */
|
|
9776
|
+
return /* @__PURE__ */ jsx97(SelectListContext.Provider, { value: { classNames: classNames3 }, children: /* @__PURE__ */ jsx97("div", { className: classNames3.container, children: /* @__PURE__ */ jsx97(
|
|
9730
9777
|
SelectList,
|
|
9731
9778
|
{
|
|
9732
9779
|
...props,
|
|
9733
9780
|
layout: "grid",
|
|
9734
9781
|
ref,
|
|
9735
|
-
className:
|
|
9782
|
+
className: cn55(
|
|
9736
9783
|
"group/list overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh]",
|
|
9737
9784
|
classNames3.list
|
|
9738
9785
|
),
|
|
@@ -9744,25 +9791,25 @@ var _SelectList = forwardRef27(
|
|
|
9744
9791
|
_SelectList.Item = _SelectListItem;
|
|
9745
9792
|
|
|
9746
9793
|
// src/Scrollable/Scrollable.tsx
|
|
9747
|
-
import { cn as
|
|
9748
|
-
import { jsx as
|
|
9794
|
+
import { cn as cn56, createVar as createVar8, width as twWidth2 } from "@marigold/system";
|
|
9795
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
9749
9796
|
var Scrollable = ({
|
|
9750
9797
|
children,
|
|
9751
9798
|
width = "full",
|
|
9752
9799
|
height,
|
|
9753
9800
|
...props
|
|
9754
|
-
}) => /* @__PURE__ */
|
|
9801
|
+
}) => /* @__PURE__ */ jsx98(
|
|
9755
9802
|
"div",
|
|
9756
9803
|
{
|
|
9757
9804
|
...props,
|
|
9758
|
-
className:
|
|
9805
|
+
className: cn56(["sticky h-(--height) overflow-auto", twWidth2[width]]),
|
|
9759
9806
|
style: createVar8({ height }),
|
|
9760
9807
|
children
|
|
9761
9808
|
}
|
|
9762
9809
|
);
|
|
9763
9810
|
|
|
9764
9811
|
// src/Slider/Slider.tsx
|
|
9765
|
-
import { forwardRef as
|
|
9812
|
+
import { forwardRef as forwardRef30 } from "react";
|
|
9766
9813
|
import {
|
|
9767
9814
|
Slider,
|
|
9768
9815
|
SliderOutput,
|
|
@@ -9770,12 +9817,12 @@ import {
|
|
|
9770
9817
|
SliderTrack
|
|
9771
9818
|
} from "react-aria-components";
|
|
9772
9819
|
import {
|
|
9773
|
-
cn as
|
|
9820
|
+
cn as cn57,
|
|
9774
9821
|
width as twWidth3,
|
|
9775
|
-
useClassNames as
|
|
9822
|
+
useClassNames as useClassNames57
|
|
9776
9823
|
} from "@marigold/system";
|
|
9777
|
-
import { Fragment as
|
|
9778
|
-
var _Slider =
|
|
9824
|
+
import { Fragment as Fragment11, jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
9825
|
+
var _Slider = forwardRef30(
|
|
9779
9826
|
({
|
|
9780
9827
|
thumbLabels,
|
|
9781
9828
|
variant,
|
|
@@ -9785,7 +9832,7 @@ var _Slider = forwardRef28(
|
|
|
9785
9832
|
label,
|
|
9786
9833
|
...rest
|
|
9787
9834
|
}, ref) => {
|
|
9788
|
-
const classNames3 =
|
|
9835
|
+
const classNames3 = useClassNames57({
|
|
9789
9836
|
component: "Slider",
|
|
9790
9837
|
variant,
|
|
9791
9838
|
size: size2
|
|
@@ -9798,7 +9845,7 @@ var _Slider = forwardRef28(
|
|
|
9798
9845
|
FieldBase,
|
|
9799
9846
|
{
|
|
9800
9847
|
as: Slider,
|
|
9801
|
-
className:
|
|
9848
|
+
className: cn57(
|
|
9802
9849
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
9803
9850
|
classNames3.container,
|
|
9804
9851
|
twWidth3[width]
|
|
@@ -9806,26 +9853,26 @@ var _Slider = forwardRef28(
|
|
|
9806
9853
|
ref,
|
|
9807
9854
|
...props,
|
|
9808
9855
|
children: [
|
|
9809
|
-
/* @__PURE__ */
|
|
9810
|
-
/* @__PURE__ */
|
|
9811
|
-
/* @__PURE__ */
|
|
9856
|
+
/* @__PURE__ */ jsx99(_Label, { children: props.children && props.children || label && label }),
|
|
9857
|
+
/* @__PURE__ */ jsx99(SliderOutput, { className: cn57("flex justify-end", classNames3.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
9858
|
+
/* @__PURE__ */ jsx99(
|
|
9812
9859
|
SliderTrack,
|
|
9813
9860
|
{
|
|
9814
|
-
className:
|
|
9815
|
-
children: ({ state }) => /* @__PURE__ */ jsxs36(
|
|
9816
|
-
/* @__PURE__ */
|
|
9861
|
+
className: cn57("relative col-span-2 h-2 w-full", classNames3.track),
|
|
9862
|
+
children: ({ state }) => /* @__PURE__ */ jsxs36(Fragment11, { children: [
|
|
9863
|
+
/* @__PURE__ */ jsx99(
|
|
9817
9864
|
"div",
|
|
9818
9865
|
{
|
|
9819
|
-
className:
|
|
9866
|
+
className: cn57(
|
|
9820
9867
|
"absolute top-[50%] h-2 w-full translate-y-[-50%]",
|
|
9821
9868
|
classNames3.track
|
|
9822
9869
|
)
|
|
9823
9870
|
}
|
|
9824
9871
|
),
|
|
9825
|
-
/* @__PURE__ */
|
|
9872
|
+
/* @__PURE__ */ jsx99(
|
|
9826
9873
|
"div",
|
|
9827
9874
|
{
|
|
9828
|
-
className:
|
|
9875
|
+
className: cn57(
|
|
9829
9876
|
"absolute top-[50%] h-2 translate-y-[-50%]",
|
|
9830
9877
|
classNames3.selectedTrack
|
|
9831
9878
|
),
|
|
@@ -9835,10 +9882,10 @@ var _Slider = forwardRef28(
|
|
|
9835
9882
|
}
|
|
9836
9883
|
}
|
|
9837
9884
|
),
|
|
9838
|
-
state.values.map((_, i) => /* @__PURE__ */
|
|
9885
|
+
state.values.map((_, i) => /* @__PURE__ */ jsx99(
|
|
9839
9886
|
SliderThumb,
|
|
9840
9887
|
{
|
|
9841
|
-
className:
|
|
9888
|
+
className: cn57("top-1/2 cursor-pointer", classNames3.thumb),
|
|
9842
9889
|
index: i,
|
|
9843
9890
|
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i],
|
|
9844
9891
|
name: thumbLabels == null ? void 0 : thumbLabels[i]
|
|
@@ -9855,12 +9902,12 @@ var _Slider = forwardRef28(
|
|
|
9855
9902
|
);
|
|
9856
9903
|
|
|
9857
9904
|
// src/Split/Split.tsx
|
|
9858
|
-
import { jsx as
|
|
9859
|
-
var Split = () => /* @__PURE__ */
|
|
9905
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
9906
|
+
var Split = () => /* @__PURE__ */ jsx100("div", { role: "separator", className: "grow" });
|
|
9860
9907
|
|
|
9861
9908
|
// src/Stack/Stack.tsx
|
|
9862
|
-
import { alignment as alignment2, cn as
|
|
9863
|
-
import { jsx as
|
|
9909
|
+
import { alignment as alignment2, cn as cn58, gapSpace as gapSpace8 } from "@marigold/system";
|
|
9910
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
9864
9911
|
var Stack = ({
|
|
9865
9912
|
children,
|
|
9866
9913
|
space = 0,
|
|
@@ -9870,10 +9917,10 @@ var Stack = ({
|
|
|
9870
9917
|
...props
|
|
9871
9918
|
}) => {
|
|
9872
9919
|
var _a, _b, _c, _d;
|
|
9873
|
-
return /* @__PURE__ */
|
|
9920
|
+
return /* @__PURE__ */ jsx101(
|
|
9874
9921
|
"div",
|
|
9875
9922
|
{
|
|
9876
|
-
className:
|
|
9923
|
+
className: cn58(
|
|
9877
9924
|
"flex flex-col",
|
|
9878
9925
|
gapSpace8[space],
|
|
9879
9926
|
alignX && ((_b = (_a = alignment2) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -9887,26 +9934,26 @@ var Stack = ({
|
|
|
9887
9934
|
};
|
|
9888
9935
|
|
|
9889
9936
|
// src/Switch/Switch.tsx
|
|
9890
|
-
import { forwardRef as
|
|
9937
|
+
import { forwardRef as forwardRef31 } from "react";
|
|
9891
9938
|
import { Switch } from "react-aria-components";
|
|
9892
9939
|
import {
|
|
9893
|
-
cn as
|
|
9940
|
+
cn as cn59,
|
|
9894
9941
|
width as twWidth4,
|
|
9895
|
-
useClassNames as
|
|
9942
|
+
useClassNames as useClassNames58
|
|
9896
9943
|
} from "@marigold/system";
|
|
9897
|
-
import { jsx as
|
|
9898
|
-
var _Switch =
|
|
9944
|
+
import { jsx as jsx102, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
9945
|
+
var _Switch = forwardRef31(
|
|
9899
9946
|
({
|
|
9900
9947
|
variant,
|
|
9901
9948
|
size: size2,
|
|
9902
9949
|
width = "full",
|
|
9903
|
-
|
|
9950
|
+
label,
|
|
9904
9951
|
selected,
|
|
9905
9952
|
disabled,
|
|
9906
9953
|
readOnly,
|
|
9907
9954
|
...rest
|
|
9908
9955
|
}, ref) => {
|
|
9909
|
-
const classNames3 =
|
|
9956
|
+
const classNames3 = useClassNames58({ component: "Switch", size: size2, variant });
|
|
9910
9957
|
const props = {
|
|
9911
9958
|
isDisabled: disabled,
|
|
9912
9959
|
isReadOnly: readOnly,
|
|
@@ -9918,15 +9965,15 @@ var _Switch = forwardRef29(
|
|
|
9918
9965
|
{
|
|
9919
9966
|
...props,
|
|
9920
9967
|
ref,
|
|
9921
|
-
className:
|
|
9968
|
+
className: cn59(
|
|
9922
9969
|
twWidth4[width],
|
|
9923
9970
|
"group/switch",
|
|
9924
9971
|
"flex items-center gap-[1ch]",
|
|
9925
9972
|
classNames3.container
|
|
9926
9973
|
),
|
|
9927
9974
|
children: [
|
|
9928
|
-
/* @__PURE__ */
|
|
9929
|
-
/* @__PURE__ */
|
|
9975
|
+
(props.children || label) && /* @__PURE__ */ jsx102(_Label, { elementType: "span", children: props.children || label }),
|
|
9976
|
+
/* @__PURE__ */ jsx102("div", { className: "relative", children: /* @__PURE__ */ jsx102("div", { className: classNames3.track, children: /* @__PURE__ */ jsx102("div", { className: classNames3.thumb }) }) })
|
|
9930
9977
|
]
|
|
9931
9978
|
}
|
|
9932
9979
|
);
|
|
@@ -9934,26 +9981,26 @@ var _Switch = forwardRef29(
|
|
|
9934
9981
|
);
|
|
9935
9982
|
|
|
9936
9983
|
// src/Table/Table.tsx
|
|
9937
|
-
import { useRef as
|
|
9984
|
+
import { useRef as useRef16 } from "react";
|
|
9938
9985
|
import { useTable } from "@react-aria/table";
|
|
9939
9986
|
import {
|
|
9940
9987
|
TableBody as Body2,
|
|
9941
9988
|
Cell,
|
|
9942
9989
|
Column,
|
|
9943
|
-
TableHeader as
|
|
9990
|
+
TableHeader as Header5,
|
|
9944
9991
|
Row,
|
|
9945
9992
|
useTableState
|
|
9946
9993
|
} from "@react-stately/table";
|
|
9947
|
-
import { cn as
|
|
9994
|
+
import { cn as cn66, useClassNames as useClassNames60 } from "@marigold/system";
|
|
9948
9995
|
|
|
9949
9996
|
// src/Table/Context.tsx
|
|
9950
|
-
import { createContext as
|
|
9951
|
-
var TableContext =
|
|
9952
|
-
var useTableContext = () =>
|
|
9997
|
+
import { createContext as createContext14, useContext as useContext24 } from "react";
|
|
9998
|
+
var TableContext = createContext14({});
|
|
9999
|
+
var useTableContext = () => useContext24(TableContext);
|
|
9953
10000
|
|
|
9954
10001
|
// src/Table/TableBody.tsx
|
|
9955
10002
|
import { useTableRowGroup } from "@react-aria/table";
|
|
9956
|
-
import { jsx as
|
|
10003
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
9957
10004
|
var TableBody = ({
|
|
9958
10005
|
children,
|
|
9959
10006
|
className,
|
|
@@ -9962,7 +10009,7 @@ var TableBody = ({
|
|
|
9962
10009
|
const { rowGroupProps } = useTableRowGroup();
|
|
9963
10010
|
const { state, classNames: classNames3 } = useTableContext();
|
|
9964
10011
|
if (state.collection.size === 0 && emptyState) {
|
|
9965
|
-
return /* @__PURE__ */
|
|
10012
|
+
return /* @__PURE__ */ jsx103("tbody", { className, children: /* @__PURE__ */ jsx103("tr", { className: classNames3 == null ? void 0 : classNames3.row, role: "row", children: /* @__PURE__ */ jsx103(
|
|
9966
10013
|
"td",
|
|
9967
10014
|
{
|
|
9968
10015
|
className: classNames3 == null ? void 0 : classNames3.cell,
|
|
@@ -9972,18 +10019,18 @@ var TableBody = ({
|
|
|
9972
10019
|
}
|
|
9973
10020
|
) }) });
|
|
9974
10021
|
}
|
|
9975
|
-
return /* @__PURE__ */
|
|
10022
|
+
return /* @__PURE__ */ jsx103("tbody", { ...rowGroupProps, className, children });
|
|
9976
10023
|
};
|
|
9977
10024
|
|
|
9978
10025
|
// src/Table/TableCell.tsx
|
|
9979
|
-
import { useRef as
|
|
10026
|
+
import { useRef as useRef10 } from "react";
|
|
9980
10027
|
import { useFocusRing } from "@react-aria/focus";
|
|
9981
10028
|
import { useTableCell } from "@react-aria/table";
|
|
9982
10029
|
import { mergeProps as mergeProps2 } from "@react-aria/utils";
|
|
9983
|
-
import { cn as
|
|
9984
|
-
import { jsx as
|
|
10030
|
+
import { cn as cn60, useStateProps } from "@marigold/system";
|
|
10031
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
9985
10032
|
var TableCell = ({ cell, align = "left" }) => {
|
|
9986
|
-
const ref =
|
|
10033
|
+
const ref = useRef10(null);
|
|
9987
10034
|
const { interactive, state, classNames: classNames3 } = useTableContext();
|
|
9988
10035
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
9989
10036
|
const { gridCellProps } = useTableCell(
|
|
@@ -10004,11 +10051,11 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
10004
10051
|
};
|
|
10005
10052
|
const { focusProps, isFocusVisible } = useFocusRing();
|
|
10006
10053
|
const stateProps = useStateProps({ disabled, focusVisible: isFocusVisible });
|
|
10007
|
-
return /* @__PURE__ */
|
|
10054
|
+
return /* @__PURE__ */ jsx104(
|
|
10008
10055
|
"td",
|
|
10009
10056
|
{
|
|
10010
10057
|
ref,
|
|
10011
|
-
className:
|
|
10058
|
+
className: cn60(classNames3 == null ? void 0 : classNames3.cell),
|
|
10012
10059
|
...mergeProps2(cellProps, focusProps),
|
|
10013
10060
|
...stateProps,
|
|
10014
10061
|
align,
|
|
@@ -10018,11 +10065,11 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
10018
10065
|
};
|
|
10019
10066
|
|
|
10020
10067
|
// src/Table/TableCheckboxCell.tsx
|
|
10021
|
-
import { useRef as
|
|
10068
|
+
import { useRef as useRef11 } from "react";
|
|
10022
10069
|
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
10023
10070
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
10024
10071
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
10025
|
-
import { cn as
|
|
10072
|
+
import { cn as cn61, useStateProps as useStateProps2 } from "@marigold/system";
|
|
10026
10073
|
|
|
10027
10074
|
// src/Table/utils.ts
|
|
10028
10075
|
var mapCheckboxProps = ({
|
|
@@ -10045,9 +10092,9 @@ var mapCheckboxProps = ({
|
|
|
10045
10092
|
};
|
|
10046
10093
|
|
|
10047
10094
|
// src/Table/TableCheckboxCell.tsx
|
|
10048
|
-
import { jsx as
|
|
10095
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
10049
10096
|
var TableCheckboxCell = ({ cell }) => {
|
|
10050
|
-
const ref =
|
|
10097
|
+
const ref = useRef11(null);
|
|
10051
10098
|
const { state, classNames: classNames3 } = useTableContext();
|
|
10052
10099
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
10053
10100
|
const { gridCellProps } = useTableCell2(
|
|
@@ -10062,33 +10109,33 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
10062
10109
|
);
|
|
10063
10110
|
const { focusProps, isFocusVisible } = useFocusRing2();
|
|
10064
10111
|
const stateProps = useStateProps2({ disabled, focusVisible: isFocusVisible });
|
|
10065
|
-
return /* @__PURE__ */
|
|
10112
|
+
return /* @__PURE__ */ jsx105(
|
|
10066
10113
|
"td",
|
|
10067
10114
|
{
|
|
10068
10115
|
ref,
|
|
10069
|
-
className:
|
|
10116
|
+
className: cn61("text-center align-middle leading-none", classNames3 == null ? void 0 : classNames3.cell),
|
|
10070
10117
|
...mergeProps3(gridCellProps, focusProps),
|
|
10071
10118
|
...stateProps,
|
|
10072
|
-
children: /* @__PURE__ */
|
|
10119
|
+
children: /* @__PURE__ */ jsx105(_Checkbox, { ...checkboxProps })
|
|
10073
10120
|
}
|
|
10074
10121
|
);
|
|
10075
10122
|
};
|
|
10076
10123
|
|
|
10077
10124
|
// src/Table/TableColumnHeader.tsx
|
|
10078
|
-
import { useRef as
|
|
10125
|
+
import { useRef as useRef12 } from "react";
|
|
10079
10126
|
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
10080
10127
|
import { useHover } from "@react-aria/interactions";
|
|
10081
10128
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
10082
10129
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
10083
|
-
import { cn as
|
|
10084
|
-
import { jsx as
|
|
10130
|
+
import { cn as cn62, width as twWidth5, useStateProps as useStateProps3 } from "@marigold/system";
|
|
10131
|
+
import { jsx as jsx106, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
10085
10132
|
var TableColumnHeader = ({
|
|
10086
10133
|
column: column2,
|
|
10087
10134
|
width = "auto",
|
|
10088
10135
|
align = "left"
|
|
10089
10136
|
}) => {
|
|
10090
10137
|
var _a, _b;
|
|
10091
|
-
const ref =
|
|
10138
|
+
const ref = useRef12(null);
|
|
10092
10139
|
const { state, classNames: classNames3 } = useTableContext();
|
|
10093
10140
|
const { columnHeaderProps } = useTableColumnHeader(
|
|
10094
10141
|
{
|
|
@@ -10108,13 +10155,13 @@ var TableColumnHeader = ({
|
|
|
10108
10155
|
{
|
|
10109
10156
|
colSpan: column2.colspan,
|
|
10110
10157
|
ref,
|
|
10111
|
-
className:
|
|
10158
|
+
className: cn62("cursor-default", twWidth5[width], classNames3 == null ? void 0 : classNames3.header),
|
|
10112
10159
|
...mergeProps4(columnHeaderProps, hoverProps, focusProps),
|
|
10113
10160
|
...stateProps,
|
|
10114
10161
|
align,
|
|
10115
10162
|
children: [
|
|
10116
10163
|
column2.rendered,
|
|
10117
|
-
column2.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column2.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */
|
|
10164
|
+
column2.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column2.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx106(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx106(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx106("span", { className: "hidden", children: /* @__PURE__ */ jsx106(SortDown, { className: "inline-block" }) }))
|
|
10118
10165
|
]
|
|
10119
10166
|
}
|
|
10120
10167
|
);
|
|
@@ -10122,16 +10169,16 @@ var TableColumnHeader = ({
|
|
|
10122
10169
|
|
|
10123
10170
|
// src/Table/TableHeader.tsx
|
|
10124
10171
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
10125
|
-
import { cn as
|
|
10126
|
-
import { jsx as
|
|
10172
|
+
import { cn as cn63 } from "@marigold/system";
|
|
10173
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
10127
10174
|
var TableHeader = ({ stickyHeader, children }) => {
|
|
10128
10175
|
const { rowGroupProps } = useTableRowGroup2();
|
|
10129
10176
|
const { classNames: classNames3 } = useTableContext();
|
|
10130
|
-
return /* @__PURE__ */
|
|
10177
|
+
return /* @__PURE__ */ jsx107(
|
|
10131
10178
|
"thead",
|
|
10132
10179
|
{
|
|
10133
10180
|
...rowGroupProps,
|
|
10134
|
-
className:
|
|
10181
|
+
className: cn63(
|
|
10135
10182
|
classNames3 == null ? void 0 : classNames3.thead,
|
|
10136
10183
|
// for sticky header &th needs to be sticky for b2b and core theme
|
|
10137
10184
|
// for rui sticky is applied to thead
|
|
@@ -10143,33 +10190,33 @@ var TableHeader = ({ stickyHeader, children }) => {
|
|
|
10143
10190
|
};
|
|
10144
10191
|
|
|
10145
10192
|
// src/Table/TableHeaderRow.tsx
|
|
10146
|
-
import { useRef as
|
|
10193
|
+
import { useRef as useRef13 } from "react";
|
|
10147
10194
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
10148
|
-
import { jsx as
|
|
10195
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
10149
10196
|
var TableHeaderRow = ({
|
|
10150
10197
|
item,
|
|
10151
10198
|
className,
|
|
10152
10199
|
children
|
|
10153
10200
|
}) => {
|
|
10154
10201
|
const { state } = useTableContext();
|
|
10155
|
-
const ref =
|
|
10202
|
+
const ref = useRef13(null);
|
|
10156
10203
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
10157
|
-
return /* @__PURE__ */
|
|
10204
|
+
return /* @__PURE__ */ jsx108("tr", { ...rowProps, className, ref, children });
|
|
10158
10205
|
};
|
|
10159
10206
|
|
|
10160
10207
|
// src/Table/TableRow.tsx
|
|
10161
|
-
import { useRef as
|
|
10208
|
+
import { useRef as useRef14 } from "react";
|
|
10162
10209
|
import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
|
|
10163
10210
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
10164
10211
|
import { useTableRow } from "@react-aria/table";
|
|
10165
10212
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
10166
|
-
import { cn as
|
|
10167
|
-
import { jsx as
|
|
10213
|
+
import { cn as cn64, useClassNames as useClassNames59, useStateProps as useStateProps4 } from "@marigold/system";
|
|
10214
|
+
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
10168
10215
|
var TableRow = ({ children, row }) => {
|
|
10169
|
-
const ref =
|
|
10216
|
+
const ref = useRef14(null);
|
|
10170
10217
|
const { interactive, state, ...ctx } = useTableContext();
|
|
10171
10218
|
const { variant, size: size2 } = row.props;
|
|
10172
|
-
const classNames3 =
|
|
10219
|
+
const classNames3 = useClassNames59({
|
|
10173
10220
|
component: "Table",
|
|
10174
10221
|
variant: variant || ctx.variant,
|
|
10175
10222
|
size: size2 || ctx.size
|
|
@@ -10194,11 +10241,11 @@ var TableRow = ({ children, row }) => {
|
|
|
10194
10241
|
focusVisible: isFocusVisible,
|
|
10195
10242
|
active: isPressed
|
|
10196
10243
|
});
|
|
10197
|
-
return /* @__PURE__ */
|
|
10244
|
+
return /* @__PURE__ */ jsx109(
|
|
10198
10245
|
"tr",
|
|
10199
10246
|
{
|
|
10200
10247
|
ref,
|
|
10201
|
-
className:
|
|
10248
|
+
className: cn64(
|
|
10202
10249
|
[
|
|
10203
10250
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
10204
10251
|
],
|
|
@@ -10212,7 +10259,7 @@ var TableRow = ({ children, row }) => {
|
|
|
10212
10259
|
};
|
|
10213
10260
|
|
|
10214
10261
|
// src/Table/TableSelectAllCell.tsx
|
|
10215
|
-
import { useRef as
|
|
10262
|
+
import { useRef as useRef15 } from "react";
|
|
10216
10263
|
import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
10217
10264
|
import { useHover as useHover3 } from "@react-aria/interactions";
|
|
10218
10265
|
import {
|
|
@@ -10221,17 +10268,17 @@ import {
|
|
|
10221
10268
|
} from "@react-aria/table";
|
|
10222
10269
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
10223
10270
|
import {
|
|
10224
|
-
cn as
|
|
10271
|
+
cn as cn65,
|
|
10225
10272
|
width as twWidth6,
|
|
10226
10273
|
useStateProps as useStateProps5
|
|
10227
10274
|
} from "@marigold/system";
|
|
10228
|
-
import { jsx as
|
|
10275
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
10229
10276
|
var TableSelectAllCell = ({
|
|
10230
10277
|
column: column2,
|
|
10231
10278
|
width = "auto",
|
|
10232
10279
|
align = "left"
|
|
10233
10280
|
}) => {
|
|
10234
|
-
const ref =
|
|
10281
|
+
const ref = useRef15(null);
|
|
10235
10282
|
const { state, classNames: classNames3 } = useTableContext();
|
|
10236
10283
|
const { columnHeaderProps } = useTableColumnHeader2(
|
|
10237
10284
|
{
|
|
@@ -10247,21 +10294,21 @@ var TableSelectAllCell = ({
|
|
|
10247
10294
|
hover: isHovered,
|
|
10248
10295
|
focusVisible: isFocusVisible
|
|
10249
10296
|
});
|
|
10250
|
-
return /* @__PURE__ */
|
|
10297
|
+
return /* @__PURE__ */ jsx110(
|
|
10251
10298
|
"th",
|
|
10252
10299
|
{
|
|
10253
10300
|
ref,
|
|
10254
|
-
className:
|
|
10301
|
+
className: cn65(twWidth6[width], ["leading-none"], classNames3 == null ? void 0 : classNames3.header),
|
|
10255
10302
|
...mergeProps6(columnHeaderProps, hoverProps, focusProps),
|
|
10256
10303
|
...stateProps,
|
|
10257
10304
|
align,
|
|
10258
|
-
children: /* @__PURE__ */
|
|
10305
|
+
children: /* @__PURE__ */ jsx110(_Checkbox, { ...checkboxProps })
|
|
10259
10306
|
}
|
|
10260
10307
|
);
|
|
10261
10308
|
};
|
|
10262
10309
|
|
|
10263
10310
|
// src/Table/Table.tsx
|
|
10264
|
-
import { jsx as
|
|
10311
|
+
import { jsx as jsx111, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
10265
10312
|
var Table = ({
|
|
10266
10313
|
variant,
|
|
10267
10314
|
size: size2,
|
|
@@ -10273,7 +10320,7 @@ var Table = ({
|
|
|
10273
10320
|
...props
|
|
10274
10321
|
}) => {
|
|
10275
10322
|
const interactive = selectionMode !== "none";
|
|
10276
|
-
const tableRef =
|
|
10323
|
+
const tableRef = useRef16(null);
|
|
10277
10324
|
const state = useTableState({
|
|
10278
10325
|
...props,
|
|
10279
10326
|
selectionMode,
|
|
@@ -10284,13 +10331,13 @@ var Table = ({
|
|
|
10284
10331
|
state.isKeyboardNavigationDisabled = disableKeyboardNavigation;
|
|
10285
10332
|
}
|
|
10286
10333
|
const { gridProps } = useTable(props, state, tableRef);
|
|
10287
|
-
const classNames3 =
|
|
10334
|
+
const classNames3 = useClassNames60({
|
|
10288
10335
|
component: "Table",
|
|
10289
10336
|
variant,
|
|
10290
10337
|
size: size2
|
|
10291
10338
|
});
|
|
10292
10339
|
const { collection } = state;
|
|
10293
|
-
return /* @__PURE__ */
|
|
10340
|
+
return /* @__PURE__ */ jsx111(
|
|
10294
10341
|
TableContext.Provider,
|
|
10295
10342
|
{
|
|
10296
10343
|
value: { state, interactive, classNames: classNames3, variant, size: size2 },
|
|
@@ -10298,7 +10345,7 @@ var Table = ({
|
|
|
10298
10345
|
"table",
|
|
10299
10346
|
{
|
|
10300
10347
|
ref: tableRef,
|
|
10301
|
-
className:
|
|
10348
|
+
className: cn66(
|
|
10302
10349
|
"group/table",
|
|
10303
10350
|
"border-collapse",
|
|
10304
10351
|
stretch ? "table w-full" : "block",
|
|
@@ -10306,7 +10353,7 @@ var Table = ({
|
|
|
10306
10353
|
),
|
|
10307
10354
|
...gridProps,
|
|
10308
10355
|
children: [
|
|
10309
|
-
/* @__PURE__ */
|
|
10356
|
+
/* @__PURE__ */ jsx111(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx111(
|
|
10310
10357
|
TableHeaderRow,
|
|
10311
10358
|
{
|
|
10312
10359
|
item: headerRow,
|
|
@@ -10314,7 +10361,7 @@ var Table = ({
|
|
|
10314
10361
|
children: [...collection.getChildren(headerRow.key)].map(
|
|
10315
10362
|
(column2) => {
|
|
10316
10363
|
var _a, _b, _c, _d, _e;
|
|
10317
|
-
return ((_a = column2.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
10364
|
+
return ((_a = column2.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx111(
|
|
10318
10365
|
TableSelectAllCell,
|
|
10319
10366
|
{
|
|
10320
10367
|
width: (_b = column2.props) == null ? void 0 : _b.width,
|
|
@@ -10322,7 +10369,7 @@ var Table = ({
|
|
|
10322
10369
|
align: (_c = column2.props) == null ? void 0 : _c.align
|
|
10323
10370
|
},
|
|
10324
10371
|
column2.key
|
|
10325
|
-
) : /* @__PURE__ */
|
|
10372
|
+
) : /* @__PURE__ */ jsx111(
|
|
10326
10373
|
TableColumnHeader,
|
|
10327
10374
|
{
|
|
10328
10375
|
width: (_d = column2.props) == null ? void 0 : _d.width,
|
|
@@ -10338,10 +10385,10 @@ var Table = ({
|
|
|
10338
10385
|
)) }),
|
|
10339
10386
|
/* @__PURE__ */ jsxs39(TableBody, { className: classNames3.body, emptyState, children: [
|
|
10340
10387
|
...collection.rows.map(
|
|
10341
|
-
(row) => row.type === "item" && /* @__PURE__ */
|
|
10388
|
+
(row) => row.type === "item" && /* @__PURE__ */ jsx111(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index2) => {
|
|
10342
10389
|
var _a, _b;
|
|
10343
10390
|
const currentColumn = collection.columns[index2];
|
|
10344
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
10391
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx111(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx111(
|
|
10345
10392
|
TableCell,
|
|
10346
10393
|
{
|
|
10347
10394
|
align: (_b = currentColumn.props) == null ? void 0 : _b.align,
|
|
@@ -10361,22 +10408,22 @@ var Table = ({
|
|
|
10361
10408
|
Table.Body = Body2;
|
|
10362
10409
|
Table.Cell = Cell;
|
|
10363
10410
|
Table.Column = Column;
|
|
10364
|
-
Table.Header =
|
|
10411
|
+
Table.Header = Header5;
|
|
10365
10412
|
Table.Row = Row;
|
|
10366
10413
|
|
|
10367
10414
|
// src/Text/Text.tsx
|
|
10368
10415
|
import { Text as Text2 } from "react-aria-components";
|
|
10369
10416
|
import {
|
|
10370
|
-
cn as
|
|
10417
|
+
cn as cn67,
|
|
10371
10418
|
cursorStyle,
|
|
10372
10419
|
ensureCssVar as ensureCssVar2,
|
|
10373
10420
|
fontWeight,
|
|
10374
10421
|
textAlign as textAlign2,
|
|
10375
10422
|
textSize,
|
|
10376
10423
|
textStyle,
|
|
10377
|
-
useClassNames as
|
|
10424
|
+
useClassNames as useClassNames61
|
|
10378
10425
|
} from "@marigold/system";
|
|
10379
|
-
import { jsx as
|
|
10426
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
10380
10427
|
var _Text = ({
|
|
10381
10428
|
variant,
|
|
10382
10429
|
size: size2,
|
|
@@ -10390,19 +10437,19 @@ var _Text = ({
|
|
|
10390
10437
|
as = "div",
|
|
10391
10438
|
...props
|
|
10392
10439
|
}) => {
|
|
10393
|
-
const classNames3 =
|
|
10440
|
+
const classNames3 = useClassNames61({
|
|
10394
10441
|
component: "Text",
|
|
10395
10442
|
variant,
|
|
10396
10443
|
size: size2
|
|
10397
10444
|
});
|
|
10398
10445
|
const Component2 = props.slot ? Text2 : as;
|
|
10399
10446
|
const elementType = props.slot ? { elementType: as } : {};
|
|
10400
|
-
return /* @__PURE__ */
|
|
10447
|
+
return /* @__PURE__ */ jsx112(
|
|
10401
10448
|
Component2,
|
|
10402
10449
|
{
|
|
10403
10450
|
...props,
|
|
10404
10451
|
...elementType,
|
|
10405
|
-
className:
|
|
10452
|
+
className: cn67(
|
|
10406
10453
|
"max-w-(--maxTextWidth)",
|
|
10407
10454
|
// possibly set by a <Container>
|
|
10408
10455
|
classNames3,
|
|
@@ -10419,11 +10466,11 @@ var _Text = ({
|
|
|
10419
10466
|
};
|
|
10420
10467
|
|
|
10421
10468
|
// src/TextArea/TextArea.tsx
|
|
10422
|
-
import { forwardRef as
|
|
10469
|
+
import { forwardRef as forwardRef32 } from "react";
|
|
10423
10470
|
import { TextArea, TextField } from "react-aria-components";
|
|
10424
|
-
import { useClassNames as
|
|
10425
|
-
import { jsx as
|
|
10426
|
-
var _TextArea =
|
|
10471
|
+
import { useClassNames as useClassNames62 } from "@marigold/system";
|
|
10472
|
+
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
10473
|
+
var _TextArea = forwardRef32(
|
|
10427
10474
|
({
|
|
10428
10475
|
variant,
|
|
10429
10476
|
size: size2,
|
|
@@ -10434,7 +10481,7 @@ var _TextArea = forwardRef30(
|
|
|
10434
10481
|
rows,
|
|
10435
10482
|
...rest
|
|
10436
10483
|
}, ref) => {
|
|
10437
|
-
const classNames3 =
|
|
10484
|
+
const classNames3 = useClassNames62({ component: "TextArea", variant, size: size2 });
|
|
10438
10485
|
const props = {
|
|
10439
10486
|
isDisabled: disabled,
|
|
10440
10487
|
isReadOnly: readOnly,
|
|
@@ -10442,15 +10489,15 @@ var _TextArea = forwardRef30(
|
|
|
10442
10489
|
isRequired: required,
|
|
10443
10490
|
...rest
|
|
10444
10491
|
};
|
|
10445
|
-
return /* @__PURE__ */
|
|
10492
|
+
return /* @__PURE__ */ jsx113(FieldBase, { as: TextField, ...props, variant, size: size2, children: /* @__PURE__ */ jsx113(TextArea, { className: classNames3, ref, rows }) });
|
|
10446
10493
|
}
|
|
10447
10494
|
);
|
|
10448
10495
|
|
|
10449
10496
|
// src/TextField/TextField.tsx
|
|
10450
|
-
import { forwardRef as
|
|
10497
|
+
import { forwardRef as forwardRef33 } from "react";
|
|
10451
10498
|
import { TextField as TextField2 } from "react-aria-components";
|
|
10452
|
-
import { jsx as
|
|
10453
|
-
var _TextField =
|
|
10499
|
+
import { jsx as jsx114 } from "react/jsx-runtime";
|
|
10500
|
+
var _TextField = forwardRef33(
|
|
10454
10501
|
({ required, disabled, readOnly, error, ...rest }, ref) => {
|
|
10455
10502
|
const props = {
|
|
10456
10503
|
isDisabled: disabled,
|
|
@@ -10459,13 +10506,13 @@ var _TextField = forwardRef31(
|
|
|
10459
10506
|
isRequired: required,
|
|
10460
10507
|
...rest
|
|
10461
10508
|
};
|
|
10462
|
-
return /* @__PURE__ */
|
|
10509
|
+
return /* @__PURE__ */ jsx114(FieldBase, { as: TextField2, ...props, children: /* @__PURE__ */ jsx114(_Input, { ref }) });
|
|
10463
10510
|
}
|
|
10464
10511
|
);
|
|
10465
10512
|
|
|
10466
10513
|
// src/Tiles/Tiles.tsx
|
|
10467
|
-
import { cn as
|
|
10468
|
-
import { jsx as
|
|
10514
|
+
import { cn as cn68, createVar as createVar9, gapSpace as gapSpace9 } from "@marigold/system";
|
|
10515
|
+
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
10469
10516
|
var Tiles = ({
|
|
10470
10517
|
space = 0,
|
|
10471
10518
|
stretch = false,
|
|
@@ -10478,11 +10525,11 @@ var Tiles = ({
|
|
|
10478
10525
|
if (stretch) {
|
|
10479
10526
|
column2 = `minmax(${column2}, 1fr)`;
|
|
10480
10527
|
}
|
|
10481
|
-
return /* @__PURE__ */
|
|
10528
|
+
return /* @__PURE__ */ jsx115(
|
|
10482
10529
|
"div",
|
|
10483
10530
|
{
|
|
10484
10531
|
...props,
|
|
10485
|
-
className:
|
|
10532
|
+
className: cn68(
|
|
10486
10533
|
"grid",
|
|
10487
10534
|
gapSpace9[space],
|
|
10488
10535
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
@@ -10496,11 +10543,11 @@ var Tiles = ({
|
|
|
10496
10543
|
|
|
10497
10544
|
// src/Tooltip/Tooltip.tsx
|
|
10498
10545
|
import { OverlayArrow, Tooltip } from "react-aria-components";
|
|
10499
|
-
import { cn as
|
|
10546
|
+
import { cn as cn69, useClassNames as useClassNames63 } from "@marigold/system";
|
|
10500
10547
|
|
|
10501
10548
|
// src/Tooltip/TooltipTrigger.tsx
|
|
10502
10549
|
import { TooltipTrigger } from "react-aria-components";
|
|
10503
|
-
import { jsx as
|
|
10550
|
+
import { jsx as jsx116 } from "react/jsx-runtime";
|
|
10504
10551
|
var _TooltipTrigger = ({
|
|
10505
10552
|
delay = 1e3,
|
|
10506
10553
|
children,
|
|
@@ -10514,26 +10561,26 @@ var _TooltipTrigger = ({
|
|
|
10514
10561
|
isOpen: open,
|
|
10515
10562
|
delay
|
|
10516
10563
|
};
|
|
10517
|
-
return /* @__PURE__ */
|
|
10564
|
+
return /* @__PURE__ */ jsx116(TooltipTrigger, { ...props, children });
|
|
10518
10565
|
};
|
|
10519
10566
|
|
|
10520
10567
|
// src/Tooltip/Tooltip.tsx
|
|
10521
|
-
import { jsx as
|
|
10568
|
+
import { jsx as jsx117, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
10522
10569
|
var _Tooltip = ({ children, variant, size: size2, open, ...rest }) => {
|
|
10523
10570
|
const props = {
|
|
10524
10571
|
...rest,
|
|
10525
10572
|
isOpen: open
|
|
10526
10573
|
};
|
|
10527
|
-
const classNames3 =
|
|
10574
|
+
const classNames3 = useClassNames63({ component: "Tooltip", variant, size: size2 });
|
|
10528
10575
|
const portal = usePortalContainer();
|
|
10529
10576
|
return /* @__PURE__ */ jsxs40(
|
|
10530
10577
|
Tooltip,
|
|
10531
10578
|
{
|
|
10532
10579
|
...props,
|
|
10533
|
-
className:
|
|
10580
|
+
className: cn69("group/tooltip", classNames3.container),
|
|
10534
10581
|
UNSTABLE_portalContainer: portal,
|
|
10535
10582
|
children: [
|
|
10536
|
-
/* @__PURE__ */
|
|
10583
|
+
/* @__PURE__ */ jsx117(OverlayArrow, { className: classNames3.arrow, children: /* @__PURE__ */ jsx117("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx117("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
10537
10584
|
children
|
|
10538
10585
|
]
|
|
10539
10586
|
}
|
|
@@ -10542,13 +10589,13 @@ var _Tooltip = ({ children, variant, size: size2, open, ...rest }) => {
|
|
|
10542
10589
|
_Tooltip.Trigger = _TooltipTrigger;
|
|
10543
10590
|
|
|
10544
10591
|
// src/TagGroup/Tag.tsx
|
|
10545
|
-
import {
|
|
10546
|
-
import { cn as
|
|
10592
|
+
import { Tag } from "react-aria-components";
|
|
10593
|
+
import { cn as cn70, useClassNames as useClassNames65 } from "@marigold/system";
|
|
10547
10594
|
|
|
10548
10595
|
// src/TagGroup/TagGroup.tsx
|
|
10549
10596
|
import { TagGroup, TagList } from "react-aria-components";
|
|
10550
|
-
import { useClassNames as
|
|
10551
|
-
import { jsx as
|
|
10597
|
+
import { useClassNames as useClassNames64 } from "@marigold/system";
|
|
10598
|
+
import { jsx as jsx118 } from "react/jsx-runtime";
|
|
10552
10599
|
var _TagGroup = ({
|
|
10553
10600
|
width,
|
|
10554
10601
|
items,
|
|
@@ -10558,8 +10605,8 @@ var _TagGroup = ({
|
|
|
10558
10605
|
size: size2,
|
|
10559
10606
|
...rest
|
|
10560
10607
|
}) => {
|
|
10561
|
-
const classNames3 =
|
|
10562
|
-
return /* @__PURE__ */
|
|
10608
|
+
const classNames3 = useClassNames64({ component: "Tag", variant, size: size2 });
|
|
10609
|
+
return /* @__PURE__ */ jsx118(FieldBase, { as: TagGroup, ...rest, children: /* @__PURE__ */ jsx118(
|
|
10563
10610
|
TagList,
|
|
10564
10611
|
{
|
|
10565
10612
|
items,
|
|
@@ -10571,31 +10618,23 @@ var _TagGroup = ({
|
|
|
10571
10618
|
};
|
|
10572
10619
|
|
|
10573
10620
|
// src/TagGroup/Tag.tsx
|
|
10574
|
-
import { Fragment as
|
|
10575
|
-
var CloseButton2 = ({ className }) => {
|
|
10576
|
-
return /* @__PURE__ */ jsx111(Button7, { slot: "remove", className, children: /* @__PURE__ */ jsx111("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx111("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
10577
|
-
};
|
|
10621
|
+
import { Fragment as Fragment12, jsx as jsx119, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
10578
10622
|
var _Tag = ({ variant, size: size2, children, disabled, ...rest }) => {
|
|
10579
10623
|
let textValue = typeof children === "string" ? children : void 0;
|
|
10580
|
-
const classNames3 =
|
|
10624
|
+
const classNames3 = useClassNames65({ component: "Tag", variant, size: size2 });
|
|
10581
10625
|
const props = {
|
|
10582
10626
|
isDisabled: disabled,
|
|
10583
10627
|
...rest
|
|
10584
10628
|
};
|
|
10585
|
-
return /* @__PURE__ */
|
|
10629
|
+
return /* @__PURE__ */ jsx119(
|
|
10586
10630
|
Tag,
|
|
10587
10631
|
{
|
|
10588
10632
|
textValue,
|
|
10589
10633
|
...props,
|
|
10590
|
-
className:
|
|
10591
|
-
children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs41(
|
|
10634
|
+
className: cn70("data-selection-mode:cursor-pointer", classNames3.tag),
|
|
10635
|
+
children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs41(Fragment12, { children: [
|
|
10592
10636
|
children,
|
|
10593
|
-
allowsRemoving && /* @__PURE__ */
|
|
10594
|
-
CloseButton2,
|
|
10595
|
-
{
|
|
10596
|
-
className: cn65("flex items-center", classNames3.closeButton)
|
|
10597
|
-
}
|
|
10598
|
-
)
|
|
10637
|
+
allowsRemoving && /* @__PURE__ */ jsx119(CloseButton, { className: classNames3.closeButton, slot: "remove" })
|
|
10599
10638
|
] })
|
|
10600
10639
|
}
|
|
10601
10640
|
);
|
|
@@ -10606,14 +10645,14 @@ _Tag.Group = _TagGroup;
|
|
|
10606
10645
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
10607
10646
|
|
|
10608
10647
|
// src/XLoader/XLoader.tsx
|
|
10609
|
-
import { Dialog as
|
|
10648
|
+
import { Dialog as Dialog4, Modal as Modal2 } from "react-aria-components";
|
|
10610
10649
|
import { useId as useId2 } from "@react-aria/utils";
|
|
10611
|
-
import { useClassNames as
|
|
10650
|
+
import { useClassNames as useClassNames67 } from "@marigold/system";
|
|
10612
10651
|
|
|
10613
10652
|
// src/XLoader/BaseLoader.tsx
|
|
10614
10653
|
import { Label as Label2, ProgressBar as ProgressBar2 } from "react-aria-components";
|
|
10615
10654
|
import { useLocalizedStringFormatter as useLocalizedStringFormatter2 } from "@react-aria/i18n";
|
|
10616
|
-
import { useClassNames as
|
|
10655
|
+
import { useClassNames as useClassNames66 } from "@marigold/system";
|
|
10617
10656
|
|
|
10618
10657
|
// src/intl/messages.ts
|
|
10619
10658
|
var intlMessages2 = {
|
|
@@ -10626,7 +10665,7 @@ var intlMessages2 = {
|
|
|
10626
10665
|
};
|
|
10627
10666
|
|
|
10628
10667
|
// src/XLoader/BaseLoader.tsx
|
|
10629
|
-
import { jsx as
|
|
10668
|
+
import { jsx as jsx120, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
10630
10669
|
var BaseLoader = ({
|
|
10631
10670
|
variant,
|
|
10632
10671
|
size: size2,
|
|
@@ -10635,7 +10674,7 @@ var BaseLoader = ({
|
|
|
10635
10674
|
...props
|
|
10636
10675
|
}) => {
|
|
10637
10676
|
const stringFormatter = useLocalizedStringFormatter2(intlMessages2, "marigold");
|
|
10638
|
-
const className =
|
|
10677
|
+
const className = useClassNames66({ component: "XLoader", variant, size: size2 });
|
|
10639
10678
|
return /* @__PURE__ */ jsxs42(
|
|
10640
10679
|
ProgressBar2,
|
|
10641
10680
|
{
|
|
@@ -10652,13 +10691,13 @@ var BaseLoader = ({
|
|
|
10652
10691
|
fill: "currentColor",
|
|
10653
10692
|
className: className.loader,
|
|
10654
10693
|
children: [
|
|
10655
|
-
/* @__PURE__ */
|
|
10656
|
-
/* @__PURE__ */
|
|
10694
|
+
/* @__PURE__ */ jsx120("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
10695
|
+
/* @__PURE__ */ jsx120(
|
|
10657
10696
|
"path",
|
|
10658
10697
|
{
|
|
10659
10698
|
id: "XMLID_5_",
|
|
10660
10699
|
d: "M124.3 12.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
10661
|
-
children: /* @__PURE__ */
|
|
10700
|
+
children: /* @__PURE__ */ jsx120(
|
|
10662
10701
|
"animate",
|
|
10663
10702
|
{
|
|
10664
10703
|
attributeName: "opacity",
|
|
@@ -10671,12 +10710,12 @@ var BaseLoader = ({
|
|
|
10671
10710
|
)
|
|
10672
10711
|
}
|
|
10673
10712
|
),
|
|
10674
|
-
/* @__PURE__ */
|
|
10713
|
+
/* @__PURE__ */ jsx120(
|
|
10675
10714
|
"path",
|
|
10676
10715
|
{
|
|
10677
10716
|
id: "XMLID_18_",
|
|
10678
10717
|
d: "M115.9 24.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
10679
|
-
children: /* @__PURE__ */
|
|
10718
|
+
children: /* @__PURE__ */ jsx120(
|
|
10680
10719
|
"animate",
|
|
10681
10720
|
{
|
|
10682
10721
|
attributeName: "opacity",
|
|
@@ -10689,12 +10728,12 @@ var BaseLoader = ({
|
|
|
10689
10728
|
)
|
|
10690
10729
|
}
|
|
10691
10730
|
),
|
|
10692
|
-
/* @__PURE__ */
|
|
10731
|
+
/* @__PURE__ */ jsx120(
|
|
10693
10732
|
"path",
|
|
10694
10733
|
{
|
|
10695
10734
|
id: "XMLID_19_",
|
|
10696
10735
|
d: "M107.5 35.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
10697
|
-
children: /* @__PURE__ */
|
|
10736
|
+
children: /* @__PURE__ */ jsx120(
|
|
10698
10737
|
"animate",
|
|
10699
10738
|
{
|
|
10700
10739
|
attributeName: "opacity",
|
|
@@ -10707,12 +10746,12 @@ var BaseLoader = ({
|
|
|
10707
10746
|
)
|
|
10708
10747
|
}
|
|
10709
10748
|
),
|
|
10710
|
-
/* @__PURE__ */
|
|
10749
|
+
/* @__PURE__ */ jsx120(
|
|
10711
10750
|
"path",
|
|
10712
10751
|
{
|
|
10713
10752
|
id: "XMLID_20_",
|
|
10714
10753
|
d: "M99.1 47.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
10715
|
-
children: /* @__PURE__ */
|
|
10754
|
+
children: /* @__PURE__ */ jsx120(
|
|
10716
10755
|
"animate",
|
|
10717
10756
|
{
|
|
10718
10757
|
attributeName: "opacity",
|
|
@@ -10725,12 +10764,12 @@ var BaseLoader = ({
|
|
|
10725
10764
|
)
|
|
10726
10765
|
}
|
|
10727
10766
|
),
|
|
10728
|
-
/* @__PURE__ */
|
|
10767
|
+
/* @__PURE__ */ jsx120(
|
|
10729
10768
|
"path",
|
|
10730
10769
|
{
|
|
10731
10770
|
id: "XMLID_21_",
|
|
10732
10771
|
d: "M90.7 59H90c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.8-2.2 4.9-4.9 4.9z",
|
|
10733
|
-
children: /* @__PURE__ */
|
|
10772
|
+
children: /* @__PURE__ */ jsx120(
|
|
10734
10773
|
"animate",
|
|
10735
10774
|
{
|
|
10736
10775
|
attributeName: "opacity",
|
|
@@ -10743,12 +10782,12 @@ var BaseLoader = ({
|
|
|
10743
10782
|
)
|
|
10744
10783
|
}
|
|
10745
10784
|
),
|
|
10746
|
-
/* @__PURE__ */
|
|
10785
|
+
/* @__PURE__ */ jsx120(
|
|
10747
10786
|
"path",
|
|
10748
10787
|
{
|
|
10749
10788
|
id: "XMLID_22_",
|
|
10750
10789
|
d: "M68 89.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.8c0 2.6-2.2 4.8-4.9 4.8z",
|
|
10751
|
-
children: /* @__PURE__ */
|
|
10790
|
+
children: /* @__PURE__ */ jsx120(
|
|
10752
10791
|
"animate",
|
|
10753
10792
|
{
|
|
10754
10793
|
attributeName: "opacity",
|
|
@@ -10761,12 +10800,12 @@ var BaseLoader = ({
|
|
|
10761
10800
|
)
|
|
10762
10801
|
}
|
|
10763
10802
|
),
|
|
10764
|
-
/* @__PURE__ */
|
|
10803
|
+
/* @__PURE__ */ jsx120(
|
|
10765
10804
|
"path",
|
|
10766
10805
|
{
|
|
10767
10806
|
id: "XMLID_23_",
|
|
10768
10807
|
d: "M59.6 101.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
10769
|
-
children: /* @__PURE__ */
|
|
10808
|
+
children: /* @__PURE__ */ jsx120(
|
|
10770
10809
|
"animate",
|
|
10771
10810
|
{
|
|
10772
10811
|
attributeName: "opacity",
|
|
@@ -10779,12 +10818,12 @@ var BaseLoader = ({
|
|
|
10779
10818
|
)
|
|
10780
10819
|
}
|
|
10781
10820
|
),
|
|
10782
|
-
/* @__PURE__ */
|
|
10821
|
+
/* @__PURE__ */ jsx120(
|
|
10783
10822
|
"path",
|
|
10784
10823
|
{
|
|
10785
10824
|
id: "XMLID_24_",
|
|
10786
10825
|
d: "M51.2 112.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
10787
|
-
children: /* @__PURE__ */
|
|
10826
|
+
children: /* @__PURE__ */ jsx120(
|
|
10788
10827
|
"animate",
|
|
10789
10828
|
{
|
|
10790
10829
|
attributeName: "opacity",
|
|
@@ -10797,12 +10836,12 @@ var BaseLoader = ({
|
|
|
10797
10836
|
)
|
|
10798
10837
|
}
|
|
10799
10838
|
),
|
|
10800
|
-
/* @__PURE__ */
|
|
10839
|
+
/* @__PURE__ */ jsx120(
|
|
10801
10840
|
"path",
|
|
10802
10841
|
{
|
|
10803
10842
|
id: "XMLID_25_",
|
|
10804
10843
|
d: "M42.8 124.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
10805
|
-
children: /* @__PURE__ */
|
|
10844
|
+
children: /* @__PURE__ */ jsx120(
|
|
10806
10845
|
"animate",
|
|
10807
10846
|
{
|
|
10808
10847
|
attributeName: "opacity",
|
|
@@ -10815,12 +10854,12 @@ var BaseLoader = ({
|
|
|
10815
10854
|
)
|
|
10816
10855
|
}
|
|
10817
10856
|
),
|
|
10818
|
-
/* @__PURE__ */
|
|
10857
|
+
/* @__PURE__ */ jsx120(
|
|
10819
10858
|
"path",
|
|
10820
10859
|
{
|
|
10821
10860
|
id: "XMLID_26_",
|
|
10822
10861
|
d: "M34.4 136h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
10823
|
-
children: /* @__PURE__ */
|
|
10862
|
+
children: /* @__PURE__ */ jsx120(
|
|
10824
10863
|
"animate",
|
|
10825
10864
|
{
|
|
10826
10865
|
attributeName: "opacity",
|
|
@@ -10833,12 +10872,12 @@ var BaseLoader = ({
|
|
|
10833
10872
|
)
|
|
10834
10873
|
}
|
|
10835
10874
|
),
|
|
10836
|
-
/* @__PURE__ */
|
|
10875
|
+
/* @__PURE__ */ jsx120(
|
|
10837
10876
|
"path",
|
|
10838
10877
|
{
|
|
10839
10878
|
id: "XMLID_27_",
|
|
10840
10879
|
d: "M26 147.6h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
10841
|
-
children: /* @__PURE__ */
|
|
10880
|
+
children: /* @__PURE__ */ jsx120(
|
|
10842
10881
|
"animate",
|
|
10843
10882
|
{
|
|
10844
10883
|
attributeName: "opacity",
|
|
@@ -10854,48 +10893,48 @@ var BaseLoader = ({
|
|
|
10854
10893
|
]
|
|
10855
10894
|
}
|
|
10856
10895
|
),
|
|
10857
|
-
children ? /* @__PURE__ */
|
|
10896
|
+
children ? /* @__PURE__ */ jsx120(Label2, { className: className.label, children }) : null
|
|
10858
10897
|
]
|
|
10859
10898
|
}
|
|
10860
10899
|
);
|
|
10861
10900
|
};
|
|
10862
10901
|
|
|
10863
10902
|
// src/XLoader/XLoader.tsx
|
|
10864
|
-
import { jsx as
|
|
10903
|
+
import { jsx as jsx121 } from "react/jsx-runtime";
|
|
10865
10904
|
var LoaderFullScreen = (props) => {
|
|
10866
10905
|
const id = useId2();
|
|
10867
|
-
return /* @__PURE__ */
|
|
10906
|
+
return /* @__PURE__ */ jsx121(Underlay, { defaultOpen: true, keyboardDismissable: true, variant: "modal", children: /* @__PURE__ */ jsx121(Modal2, { className: "grid h-(--visual-viewport-height) cursor-progress place-items-center", children: /* @__PURE__ */ jsx121(Dialog4, { className: "outline-0", "aria-labelledby": id, children: /* @__PURE__ */ jsx121(BaseLoader, { id, ...props }) }) }) });
|
|
10868
10907
|
};
|
|
10869
10908
|
var LoaderSection = (props) => {
|
|
10870
|
-
const className =
|
|
10909
|
+
const className = useClassNames67({
|
|
10871
10910
|
component: "Underlay",
|
|
10872
10911
|
variant: "modal",
|
|
10873
10912
|
className: "flex size-full items-center justify-center"
|
|
10874
10913
|
});
|
|
10875
|
-
return /* @__PURE__ */
|
|
10914
|
+
return /* @__PURE__ */ jsx121("div", { className, children: /* @__PURE__ */ jsx121(BaseLoader, { ...props }) });
|
|
10876
10915
|
};
|
|
10877
|
-
var XLoader = ({ mode, variant, ...props }) => mode === "fullscreen" ? /* @__PURE__ */
|
|
10916
|
+
var XLoader = ({ mode, variant, ...props }) => mode === "fullscreen" ? /* @__PURE__ */ jsx121(LoaderFullScreen, { variant: variant != null ? variant : "inverted", ...props }) : mode === "section" ? /* @__PURE__ */ jsx121(LoaderSection, { variant: variant != null ? variant : "inverted", ...props }) : /* @__PURE__ */ jsx121(BaseLoader, { variant, ...props });
|
|
10878
10917
|
|
|
10879
10918
|
// src/Tabs/Tabs.tsx
|
|
10880
10919
|
import { Tabs } from "react-aria-components";
|
|
10881
|
-
import { useClassNames as
|
|
10920
|
+
import { useClassNames as useClassNames68 } from "@marigold/system";
|
|
10882
10921
|
|
|
10883
10922
|
// src/Tabs/Context.ts
|
|
10884
|
-
import { createContext as
|
|
10885
|
-
var TabContext =
|
|
10886
|
-
var useTabContext = () =>
|
|
10923
|
+
import { createContext as createContext15, useContext as useContext25 } from "react";
|
|
10924
|
+
var TabContext = createContext15({});
|
|
10925
|
+
var useTabContext = () => useContext25(TabContext);
|
|
10887
10926
|
|
|
10888
10927
|
// src/Tabs/Tab.tsx
|
|
10889
10928
|
import { Tab } from "react-aria-components";
|
|
10890
|
-
import { cn as
|
|
10891
|
-
import { jsx as
|
|
10929
|
+
import { cn as cn71 } from "@marigold/system";
|
|
10930
|
+
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
10892
10931
|
var _Tab = (props) => {
|
|
10893
10932
|
const { classNames: classNames3 } = useTabContext();
|
|
10894
|
-
return /* @__PURE__ */
|
|
10933
|
+
return /* @__PURE__ */ jsx122(
|
|
10895
10934
|
Tab,
|
|
10896
10935
|
{
|
|
10897
10936
|
...props,
|
|
10898
|
-
className:
|
|
10937
|
+
className: cn71(
|
|
10899
10938
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
10900
10939
|
classNames3.tab
|
|
10901
10940
|
),
|
|
@@ -10906,15 +10945,15 @@ var _Tab = (props) => {
|
|
|
10906
10945
|
|
|
10907
10946
|
// src/Tabs/TabList.tsx
|
|
10908
10947
|
import { TabList } from "react-aria-components";
|
|
10909
|
-
import { cn as
|
|
10910
|
-
import { jsx as
|
|
10948
|
+
import { cn as cn72, gapSpace as gapSpace10 } from "@marigold/system";
|
|
10949
|
+
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
10911
10950
|
var _TabList = ({ space = 2, ...props }) => {
|
|
10912
10951
|
const { classNames: classNames3 } = useTabContext();
|
|
10913
|
-
return /* @__PURE__ */
|
|
10952
|
+
return /* @__PURE__ */ jsx123(
|
|
10914
10953
|
TabList,
|
|
10915
10954
|
{
|
|
10916
10955
|
...props,
|
|
10917
|
-
className:
|
|
10956
|
+
className: cn72("flex", gapSpace10[space], classNames3.tabsList),
|
|
10918
10957
|
children: props.children
|
|
10919
10958
|
}
|
|
10920
10959
|
);
|
|
@@ -10922,25 +10961,25 @@ var _TabList = ({ space = 2, ...props }) => {
|
|
|
10922
10961
|
|
|
10923
10962
|
// src/Tabs/TabPanel.tsx
|
|
10924
10963
|
import { TabPanel } from "react-aria-components";
|
|
10925
|
-
import { jsx as
|
|
10964
|
+
import { jsx as jsx124 } from "react/jsx-runtime";
|
|
10926
10965
|
var _TabPanel = (props) => {
|
|
10927
10966
|
const { classNames: classNames3 } = useTabContext();
|
|
10928
|
-
return /* @__PURE__ */
|
|
10967
|
+
return /* @__PURE__ */ jsx124(TabPanel, { ...props, className: classNames3.tabpanel, children: props.children });
|
|
10929
10968
|
};
|
|
10930
10969
|
|
|
10931
10970
|
// src/Tabs/Tabs.tsx
|
|
10932
|
-
import { jsx as
|
|
10971
|
+
import { jsx as jsx125 } from "react/jsx-runtime";
|
|
10933
10972
|
var _Tabs = ({ disabled, variant, size: size2 = "medium", ...rest }) => {
|
|
10934
10973
|
const props = {
|
|
10935
10974
|
isDisabled: disabled,
|
|
10936
10975
|
...rest
|
|
10937
10976
|
};
|
|
10938
|
-
const classNames3 =
|
|
10977
|
+
const classNames3 = useClassNames68({
|
|
10939
10978
|
component: "Tabs",
|
|
10940
10979
|
size: size2,
|
|
10941
10980
|
variant
|
|
10942
10981
|
});
|
|
10943
|
-
return /* @__PURE__ */
|
|
10982
|
+
return /* @__PURE__ */ jsx125(TabContext.Provider, { value: { classNames: classNames3 }, children: /* @__PURE__ */ jsx125(Tabs, { ...props, className: classNames3.container, children: props.children }) });
|
|
10944
10983
|
};
|
|
10945
10984
|
_Tabs.List = _TabList;
|
|
10946
10985
|
_Tabs.TabPanel = _TabPanel;
|
|
@@ -10964,7 +11003,6 @@ export {
|
|
|
10964
11003
|
Center,
|
|
10965
11004
|
_Checkbox as Checkbox,
|
|
10966
11005
|
_CheckboxGroup as CheckboxGroup,
|
|
10967
|
-
CloseButton2 as CloseButton,
|
|
10968
11006
|
Columns,
|
|
10969
11007
|
_ComboBox as ComboBox,
|
|
10970
11008
|
Container,
|
|
@@ -10972,11 +11010,12 @@ export {
|
|
|
10972
11010
|
_DatePicker as DatePicker,
|
|
10973
11011
|
_Dialog as Dialog,
|
|
10974
11012
|
_Divider as Divider,
|
|
11013
|
+
Drawer,
|
|
10975
11014
|
FieldBase,
|
|
10976
11015
|
FieldGroup,
|
|
10977
11016
|
FieldGroupContext,
|
|
10978
11017
|
Footer,
|
|
10979
|
-
Form,
|
|
11018
|
+
_Form as Form,
|
|
10980
11019
|
Grid,
|
|
10981
11020
|
_Header as Header,
|
|
10982
11021
|
_Headline as Headline,
|