@marigold/components 16.0.1 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Checkbox-D6DudF_g.mjs +431 -0
- package/dist/Checkbox-DIbAWlSt.cjs +503 -0
- package/dist/{index.js → index.cjs} +1792 -1261
- package/dist/{index.d.ts → index.d.cts} +769 -195
- package/dist/index.d.mts +834 -260
- package/dist/index.mjs +1728 -1191
- package/dist/legacy.cjs +334 -0
- package/dist/legacy.d.cts +60 -0
- package/dist/legacy.d.mts +60 -0
- package/dist/legacy.mjs +333 -0
- package/package.json +52 -38
package/dist/index.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { a as More, c as FieldBase, d as TriangleAlert, f as intlMessages, i as splitChildren, l as _Label, n as Minus, o as Collapsible, r as _CheckboxGroup, s as Check, t as _Checkbox, u as HelpText } from "./Checkbox-D6DudF_g.mjs";
|
|
2
|
+
import { Autocomplete, Breadcrumb, Breadcrumbs, Button, ButtonContext, Calendar, CalendarCell, CalendarGrid, CalendarGridBody, CalendarStateContext, Cell, Collection, Column, ComboBox, ComboBoxStateContext, DateField, DateFieldStateContext, DateInput, DatePicker, DatePickerStateContext, DateSegment, Dialog, DialogTrigger, Disclosure, DisclosureGroup, DisclosurePanel, DisclosureStateContext, DropIndicator, DropZone, FieldErrorContext, FileTrigger, Form, GridList, GridListItem, Group, Header, Heading, Input, InputContext, Label, Link, ListBox, ListBoxItem, ListBoxSection, ListStateContext, Menu, MenuItem, MenuSection, MenuTrigger, Modal, ModalOverlay, NumberField, OverlayArrow, OverlayTriggerStateContext, Popover, ProgressBar, Provider, Radio, RadioGroup, RadioGroupStateContext, ResizableTableContainer, RouterProvider, Row, SearchField, Select as Select$1, SelectStateContext, SelectValue, Separator, Slider, SliderOutput, SliderThumb, SliderTrack, Switch, Tab, TabList, TabPanel, Table as Table$1, TableBody, TableHeader, TableStateContext, Tabs, Tag, TagGroup, TagList, Text, TextArea, TextField, TimeField, ToggleButton, ToggleButtonGroup, Tooltip, TooltipTrigger, UNSTABLE_Toast, UNSTABLE_ToastContent, UNSTABLE_ToastQueue, UNSTABLE_ToastRegion, useAsyncList, useDragAndDrop, useFilter, useListData, useTableOptions } from "react-aria-components";
|
|
3
|
+
import { DateFormat, NumericFormat, SVG, ThemeProvider, ThemeProvider as ThemeProvider$1, alignment, aspect, cn, createSpacingVar, createVar, cursorStyle, ensureCssVar, fontWeight, height, lineHeight, maxWidth, paddingBottom, paddingLeft, paddingRight, paddingSpace, paddingSpaceX, paddingSpaceY, paddingTop, placeItems, textAlign, textSize, textStyle, textWrap, useClassNames, useSmallScreen, useTheme, verticalAlign, whiteSpace, width } from "@marigold/system";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Children, Component, Fragment, cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { I18nProvider, useDateFormatter, useLocale, useLocalizedStringFormatter } from "@react-aria/i18n";
|
|
8
|
+
import { useIsHidden } from "@react-aria/collections";
|
|
9
|
+
import { AnimatePresence, animate, cubicBezier, motion, useMotionValue } from "motion/react";
|
|
8
10
|
import { CalendarDate, startOfWeek, today } from "@internationalized/date";
|
|
9
11
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
10
|
-
import { chain, filterDOMProps, mergeProps, useEnterAnimation, useExitAnimation, useId, useObjectRef, useViewportSize } from "@react-aria/utils";
|
|
11
|
-
import { PressResponder
|
|
12
|
+
import { chain, filterDOMProps, getActiveElement, getOwnerDocument, mergeProps, nodeContains, useEnterAnimation, useExitAnimation, useId, useObjectRef, useViewportSize } from "@react-aria/utils";
|
|
13
|
+
import { PressResponder } from "@react-aria/interactions";
|
|
12
14
|
import { useLandmark } from "@react-aria/landmark";
|
|
13
15
|
import { useOverlayTriggerState } from "react-stately";
|
|
14
|
-
import { FocusScope, useFocusManager
|
|
16
|
+
import { FocusScope, useFocusManager } from "@react-aria/focus";
|
|
15
17
|
import { DismissButton, Overlay, UNSAFE_PortalProvider, useOverlay } from "@react-aria/overlays";
|
|
16
18
|
import { useIsSSR } from "@react-aria/ssr";
|
|
17
19
|
import { createPortal, flushSync } from "react-dom";
|
|
18
20
|
import { useField } from "@react-aria/label";
|
|
19
21
|
import { useButton } from "@react-aria/button";
|
|
20
|
-
import { useTable, useTableCell, useTableColumnHeader, useTableHeaderRow, useTableRow, useTableRowGroup, useTableSelectAllCheckbox, useTableSelectionCheckbox } from "@react-aria/table";
|
|
21
|
-
import { Cell, Column, Row, TableBody, TableHeader, useTableState } from "@react-stately/table";
|
|
22
22
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
23
23
|
|
|
24
24
|
//#region rolldown:runtime
|
|
@@ -28,16 +28,18 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
28
28
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
29
29
|
var __getProtoOf = Object.getPrototypeOf;
|
|
30
30
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
31
|
-
var
|
|
32
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
33
|
-
};
|
|
31
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
32
|
var __copyProps = (to, from$1, except, desc) => {
|
|
35
|
-
if (from$1 && typeof from$1 === "object" || typeof from$1 === "function")
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
if (from$1 && typeof from$1 === "object" || typeof from$1 === "function") {
|
|
34
|
+
for (var keys = __getOwnPropNames(from$1), i$1 = 0, n$1 = keys.length, key; i$1 < n$1; i$1++) {
|
|
35
|
+
key = keys[i$1];
|
|
36
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
37
|
+
__defProp(to, key, {
|
|
38
|
+
get: ((k$1) => from$1[k$1]).bind(null, key),
|
|
39
|
+
enumerable: !(desc = __getOwnPropDesc(from$1, key)) || desc.enumerable
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
41
43
|
}
|
|
42
44
|
return to;
|
|
43
45
|
};
|
|
@@ -58,7 +60,7 @@ const useAccordionContext = () => {
|
|
|
58
60
|
|
|
59
61
|
//#endregion
|
|
60
62
|
//#region src/icons/ChevronDown.tsx
|
|
61
|
-
const ChevronDown = ({ size: size$1 = 24, className
|
|
63
|
+
const ChevronDown = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsx("svg", {
|
|
62
64
|
xmlns: "http://www.w3.org/2000/svg",
|
|
63
65
|
width: size$1,
|
|
64
66
|
height: size$1,
|
|
@@ -108,7 +110,7 @@ const AccordionHeader = ({ children }) => {
|
|
|
108
110
|
|
|
109
111
|
//#endregion
|
|
110
112
|
//#region src/Accordion/AccordionItem.tsx
|
|
111
|
-
const AccordionItem = ({ children, disabled, expanded
|
|
113
|
+
const AccordionItem = ({ children, disabled, expanded, ...props }) => {
|
|
112
114
|
const { classNames: classNames$2 } = useAccordionContext();
|
|
113
115
|
return /* @__PURE__ */ jsx(Disclosure, {
|
|
114
116
|
isDisabled: disabled,
|
|
@@ -134,7 +136,7 @@ const AccordionPanel = ({ children }) => {
|
|
|
134
136
|
|
|
135
137
|
//#endregion
|
|
136
138
|
//#region src/Accordion/Accordion.tsx
|
|
137
|
-
const Accordion = ({ children, disabled, variant, size: size$1, stickyHeader = false, iconPosition = "right"
|
|
139
|
+
const Accordion = ({ children, disabled, variant, size: size$1, stickyHeader = false, iconPosition = "right", ...props }) => {
|
|
138
140
|
const classNames$2 = useClassNames({
|
|
139
141
|
component: "Accordion",
|
|
140
142
|
variant,
|
|
@@ -158,6 +160,112 @@ Accordion.Header = AccordionHeader;
|
|
|
158
160
|
Accordion.Content = AccordionPanel;
|
|
159
161
|
Accordion.Item = AccordionItem;
|
|
160
162
|
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region src/icons/X.tsx
|
|
165
|
+
const X = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
166
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
167
|
+
width: size$1,
|
|
168
|
+
height: size$1,
|
|
169
|
+
viewBox: "0 0 24 24",
|
|
170
|
+
fill: "none",
|
|
171
|
+
stroke: "currentColor",
|
|
172
|
+
strokeWidth: "2",
|
|
173
|
+
strokeLinecap: "round",
|
|
174
|
+
strokeLinejoin: "round",
|
|
175
|
+
className: cn("shrink-0", className),
|
|
176
|
+
...props,
|
|
177
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })]
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/CloseButton/CloseButton.tsx
|
|
182
|
+
const CloseButton = forwardRef(({ className, size: size$1, variant, ...props }, ref) => {
|
|
183
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
184
|
+
ref,
|
|
185
|
+
className: useClassNames({
|
|
186
|
+
component: "CloseButton",
|
|
187
|
+
className,
|
|
188
|
+
size: size$1,
|
|
189
|
+
variant
|
|
190
|
+
}),
|
|
191
|
+
...props,
|
|
192
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/Text/Text.tsx
|
|
198
|
+
const _Text = ({ variant, size: size$1, color, align, cursor: cursor$1, weight, fontSize, fontStyle, lineHeight: lineHeight$1, wrap, whiteSpace: whiteSpace$1, children, as = "div", ...props }) => {
|
|
199
|
+
const classNames$2 = useClassNames({
|
|
200
|
+
component: "Text",
|
|
201
|
+
variant,
|
|
202
|
+
size: size$1
|
|
203
|
+
});
|
|
204
|
+
/**
|
|
205
|
+
* Use `<Text>` when a `slot` is used. Make sure `elementType`
|
|
206
|
+
* prop is only used in combination the `<Text>`.
|
|
207
|
+
*/
|
|
208
|
+
const Component$1 = props.slot ? Text : as;
|
|
209
|
+
const elementType = props.slot ? { elementType: as } : {};
|
|
210
|
+
return /* @__PURE__ */ jsx(Component$1, {
|
|
211
|
+
...props,
|
|
212
|
+
...elementType,
|
|
213
|
+
className: cn("max-w-(--maxTextWidth)", classNames$2, fontStyle && textStyle[fontStyle], align && textAlign[align], cursor$1 && cursorStyle[cursor$1], weight && fontWeight[weight], fontSize && textSize[fontSize], lineHeight$1 && lineHeight[lineHeight$1], wrap && textWrap[wrap], whiteSpace$1 && whiteSpace[whiteSpace$1]),
|
|
214
|
+
style: { color: color && ensureCssVar(color, "color") },
|
|
215
|
+
children
|
|
216
|
+
});
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
//#endregion
|
|
220
|
+
//#region src/ActionBar/ActionButton.tsx
|
|
221
|
+
const ActionButton = ({ onPress, children }) => {
|
|
222
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
223
|
+
onPress,
|
|
224
|
+
className: useClassNames({
|
|
225
|
+
component: "Button",
|
|
226
|
+
variant: "ghost",
|
|
227
|
+
size: "default"
|
|
228
|
+
}),
|
|
229
|
+
children
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/ActionBar/ActionBar.tsx
|
|
235
|
+
const ActionBar = ({ children, id, onClearSelection, selectedItemCount = 0, variant, size: size$1 }) => {
|
|
236
|
+
const classNames$2 = useClassNames({
|
|
237
|
+
component: "ActionBar",
|
|
238
|
+
variant,
|
|
239
|
+
size: size$1
|
|
240
|
+
});
|
|
241
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
242
|
+
const isHidden = selectedItemCount === 0;
|
|
243
|
+
const countText = selectedItemCount === "all" ? "All items selected" : `${selectedItemCount} selected`;
|
|
244
|
+
if (isHidden) return null;
|
|
245
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
246
|
+
id,
|
|
247
|
+
className: cn("z-30", classNames$2.container),
|
|
248
|
+
role: "toolbar",
|
|
249
|
+
"aria-label": stringFormatter.format("bulkActionsAriaLabel"),
|
|
250
|
+
children: [
|
|
251
|
+
/* @__PURE__ */ jsx("div", {
|
|
252
|
+
className: classNames$2.count,
|
|
253
|
+
children: /* @__PURE__ */ jsx(_Text, { children: countText })
|
|
254
|
+
}),
|
|
255
|
+
/* @__PURE__ */ jsx("div", {
|
|
256
|
+
className: classNames$2.actions,
|
|
257
|
+
children
|
|
258
|
+
}),
|
|
259
|
+
onClearSelection && /* @__PURE__ */ jsx(CloseButton, {
|
|
260
|
+
"aria-label": stringFormatter.format("clearSelectionAriaLabel"),
|
|
261
|
+
onPress: onClearSelection,
|
|
262
|
+
className: classNames$2.clearButton
|
|
263
|
+
})
|
|
264
|
+
]
|
|
265
|
+
});
|
|
266
|
+
};
|
|
267
|
+
ActionBar.Button = ActionButton;
|
|
268
|
+
|
|
161
269
|
//#endregion
|
|
162
270
|
//#region src/Aside/Aside.tsx
|
|
163
271
|
/**
|
|
@@ -174,7 +282,8 @@ const Aside = ({ children, sideWidth, space = 0, side = "left", wrap = "50%" })
|
|
|
174
282
|
content: createVar({ wrap })
|
|
175
283
|
};
|
|
176
284
|
return /* @__PURE__ */ jsxs("div", {
|
|
177
|
-
className: cn("flex flex-wrap",
|
|
285
|
+
className: cn("flex flex-wrap", "gap-(--space)"),
|
|
286
|
+
style: createSpacingVar("space", `${space}`),
|
|
178
287
|
children: [/* @__PURE__ */ jsx("div", {
|
|
179
288
|
className: classNames$1[side === "left" ? "aside" : "content"],
|
|
180
289
|
style: vars[side === "left" ? "aside" : "content"],
|
|
@@ -199,124 +308,18 @@ const Aspect = ({ ratio = "square", maxWidth: maxWidth$1, children }) => {
|
|
|
199
308
|
|
|
200
309
|
//#endregion
|
|
201
310
|
//#region src/Center/Center.tsx
|
|
202
|
-
const Center = ({ maxWidth: maxWidth$1 = "100%", space = 0, children
|
|
311
|
+
const Center = ({ maxWidth: maxWidth$1 = "100%", space = 0, children, ...props }) => {
|
|
203
312
|
return /* @__PURE__ */ jsx("div", {
|
|
204
313
|
...props,
|
|
205
|
-
className: cn("
|
|
206
|
-
style:
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
//#endregion
|
|
212
|
-
//#region src/icons/TriangleAlert.tsx
|
|
213
|
-
const TriangleAlert = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
214
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
215
|
-
width: size$1,
|
|
216
|
-
height: size$1,
|
|
217
|
-
viewBox: "0 0 24 24",
|
|
218
|
-
fill: "none",
|
|
219
|
-
stroke: "currentColor",
|
|
220
|
-
strokeWidth: "2",
|
|
221
|
-
strokeLinecap: "round",
|
|
222
|
-
strokeLinejoin: "round",
|
|
223
|
-
className: cn("shrink-0", className),
|
|
224
|
-
...props,
|
|
225
|
-
children: [
|
|
226
|
-
/* @__PURE__ */ jsx("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
|
227
|
-
/* @__PURE__ */ jsx("path", { d: "M12 9v4" }),
|
|
228
|
-
/* @__PURE__ */ jsx("path", { d: "M12 17h.01" })
|
|
229
|
-
]
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
//#endregion
|
|
233
|
-
//#region src/HelpText/HelpText.tsx
|
|
234
|
-
const HelpText = ({ variant, size: size$1, description, errorMessage,...props }) => {
|
|
235
|
-
const classNames$2 = useClassNames({
|
|
236
|
-
component: "HelpText",
|
|
237
|
-
variant,
|
|
238
|
-
size: size$1
|
|
239
|
-
});
|
|
240
|
-
const ctx = useContext(FieldErrorContext);
|
|
241
|
-
if (!description && !ctx?.isInvalid) return null;
|
|
242
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
243
|
-
className: cn(classNames$2.container),
|
|
244
|
-
children: [/* @__PURE__ */ jsx(FieldError, {
|
|
245
|
-
...props,
|
|
246
|
-
className: "flex flex-col",
|
|
247
|
-
children: (validation) => {
|
|
248
|
-
/**
|
|
249
|
-
* Prefer custom error messages, fallback to native errors ones.
|
|
250
|
-
*
|
|
251
|
-
* Note that we can not merge custom and native error messages,
|
|
252
|
-
* because we can not distinguish the type of error messages
|
|
253
|
-
* in the native ones since it is just an array of strings.
|
|
254
|
-
*/
|
|
255
|
-
const messages = (typeof errorMessage === "function" ? errorMessage(validation) : errorMessage) || validation.validationErrors;
|
|
256
|
-
return Array.isArray(messages) ? messages.map((msg, idx) => /* @__PURE__ */ jsxs("div", {
|
|
257
|
-
className: "flex items-center justify-start gap-1",
|
|
258
|
-
children: [/* @__PURE__ */ jsx(TriangleAlert, { className: cn("h-4 w-4 shrink-0", classNames$2.icon) }), msg]
|
|
259
|
-
}, idx)) : /* @__PURE__ */ jsxs("div", {
|
|
260
|
-
className: "flex items-start justify-start gap-1",
|
|
261
|
-
children: [/* @__PURE__ */ jsx(TriangleAlert, { className: cn("h-4 w-4 shrink-0", classNames$2.icon) }), messages]
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
}), ctx && ctx.isInvalid ? null : /* @__PURE__ */ jsx(Text, {
|
|
265
|
-
slot: "description",
|
|
266
|
-
children: description
|
|
267
|
-
})]
|
|
268
|
-
});
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
//#endregion
|
|
272
|
-
//#region src/Label/Label.tsx
|
|
273
|
-
const _Label = ({ size: size$1, variant, children,...props }) => {
|
|
274
|
-
const className = useClassNames({
|
|
275
|
-
component: "Label",
|
|
276
|
-
size: size$1,
|
|
277
|
-
variant
|
|
278
|
-
});
|
|
279
|
-
return /* @__PURE__ */ jsx(Label, {
|
|
280
|
-
...props,
|
|
281
|
-
className: cn(className, "inline-flex"),
|
|
314
|
+
className: cn("mx-auto box-content flex flex-col items-center justify-center gap-y-(--space)", "max-w-(--maxWidth)"),
|
|
315
|
+
style: {
|
|
316
|
+
...createVar({ maxWidth: maxWidth$1 }),
|
|
317
|
+
...createSpacingVar("space", `${space}`)
|
|
318
|
+
},
|
|
282
319
|
children
|
|
283
320
|
});
|
|
284
321
|
};
|
|
285
322
|
|
|
286
|
-
//#endregion
|
|
287
|
-
//#region src/FieldBase/FieldBase.tsx
|
|
288
|
-
const fixedForwardRef = forwardRef;
|
|
289
|
-
const _FieldBase = (props, ref) => {
|
|
290
|
-
const { as: Component$1 = "div", children, label, size: size$1, variant, width: width$1 = "full", description, errorMessage, className,...rest } = props;
|
|
291
|
-
const classNames$2 = useClassNames({
|
|
292
|
-
component: "Field",
|
|
293
|
-
variant,
|
|
294
|
-
size: size$1
|
|
295
|
-
});
|
|
296
|
-
return /* @__PURE__ */ jsxs(Component$1, {
|
|
297
|
-
ref,
|
|
298
|
-
className: cn("group/field", "flex flex-col", width[width$1], classNames$2, className),
|
|
299
|
-
"data-required": props.isRequired ? true : void 0,
|
|
300
|
-
"data-error": props.isInvalid ? true : void 0,
|
|
301
|
-
...rest,
|
|
302
|
-
children: [
|
|
303
|
-
label ? /* @__PURE__ */ jsx(_Label, {
|
|
304
|
-
variant,
|
|
305
|
-
size: size$1,
|
|
306
|
-
children: label
|
|
307
|
-
}) : null,
|
|
308
|
-
children,
|
|
309
|
-
/* @__PURE__ */ jsx(HelpText, {
|
|
310
|
-
variant,
|
|
311
|
-
size: size$1,
|
|
312
|
-
description,
|
|
313
|
-
errorMessage
|
|
314
|
-
})
|
|
315
|
-
]
|
|
316
|
-
});
|
|
317
|
-
};
|
|
318
|
-
const FieldBase = fixedForwardRef(_FieldBase);
|
|
319
|
-
|
|
320
323
|
//#endregion
|
|
321
324
|
//#region src/ProgressCircle/ProgressCircle.tsx
|
|
322
325
|
const ProgressCircleSvg = ({ size: size$1 = "16", variant }) => {
|
|
@@ -353,7 +356,7 @@ const ProgressCircleSvg = ({ size: size$1 = "16", variant }) => {
|
|
|
353
356
|
})]
|
|
354
357
|
});
|
|
355
358
|
};
|
|
356
|
-
const ProgressCircle = ({ size: size$1 = "16"
|
|
359
|
+
const ProgressCircle = ({ size: size$1 = "16", ...props }) => {
|
|
357
360
|
return /* @__PURE__ */ jsx(ProgressBar, {
|
|
358
361
|
...props,
|
|
359
362
|
"aria-label": "loading",
|
|
@@ -364,7 +367,7 @@ const ProgressCircle = ({ size: size$1 = "16",...props }) => {
|
|
|
364
367
|
|
|
365
368
|
//#endregion
|
|
366
369
|
//#region src/icons/Search.tsx
|
|
367
|
-
const Search = ({ size: size$1 = 24, className
|
|
370
|
+
const Search = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
368
371
|
xmlns: "http://www.w3.org/2000/svg",
|
|
369
372
|
width: size$1,
|
|
370
373
|
height: size$1,
|
|
@@ -383,26 +386,9 @@ const Search = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */ js
|
|
|
383
386
|
})]
|
|
384
387
|
});
|
|
385
388
|
|
|
386
|
-
//#endregion
|
|
387
|
-
//#region src/icons/X.tsx
|
|
388
|
-
const X = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
389
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
390
|
-
width: size$1,
|
|
391
|
-
height: size$1,
|
|
392
|
-
viewBox: "0 0 24 24",
|
|
393
|
-
fill: "none",
|
|
394
|
-
stroke: "currentColor",
|
|
395
|
-
strokeWidth: "2",
|
|
396
|
-
strokeLinecap: "round",
|
|
397
|
-
strokeLinejoin: "round",
|
|
398
|
-
className: cn("shrink-0", className),
|
|
399
|
-
...props,
|
|
400
|
-
children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })]
|
|
401
|
-
});
|
|
402
|
-
|
|
403
389
|
//#endregion
|
|
404
390
|
//#region src/Input/Input.tsx
|
|
405
|
-
const _Input = forwardRef(({ type, icon, action, variant, size: size$1, className
|
|
391
|
+
const _Input = forwardRef(({ type, icon, action, variant, size: size$1, className, ...props }, ref) => {
|
|
406
392
|
const classNames$2 = useClassNames({
|
|
407
393
|
component: "Input",
|
|
408
394
|
variant,
|
|
@@ -417,17 +403,17 @@ const _Input = forwardRef(({ type, icon, action, variant, size: size$1, classNam
|
|
|
417
403
|
className: cn("absolute right-0 cursor-pointer", classNames$2.action, action.props.className)
|
|
418
404
|
}) : null;
|
|
419
405
|
return /* @__PURE__ */ jsxs("div", {
|
|
420
|
-
className: "group/input relative flex items-center",
|
|
406
|
+
className: cn("group/input relative flex w-(--field-width) max-w-full min-w-0 items-center"),
|
|
421
407
|
"data-icon": icon && "",
|
|
422
408
|
"data-action": action && "",
|
|
423
409
|
children: [
|
|
424
|
-
inputIcon,
|
|
425
410
|
/* @__PURE__ */ jsx(Input, {
|
|
426
411
|
...props,
|
|
427
|
-
className: cn("
|
|
412
|
+
className: cn("flex-1", "disabled:cursor-not-allowed", "[&[type=file]]:border-none [&[type=file]]:p-0", "[&[type=color]]:ml-0 [&[type=color]]:border-none [&[type=color]]:bg-transparent [&[type=color]]:p-0", classNames$2.input, className),
|
|
428
413
|
ref,
|
|
429
414
|
type
|
|
430
415
|
}),
|
|
416
|
+
inputIcon,
|
|
431
417
|
inputAction
|
|
432
418
|
]
|
|
433
419
|
});
|
|
@@ -440,13 +426,16 @@ const intlMessages$1 = {
|
|
|
440
426
|
"en-US": { "Clear search": "Clear search" },
|
|
441
427
|
"fr-FR": { "Clear search": "Effacer la recherche" }
|
|
442
428
|
};
|
|
443
|
-
const SearchInput = forwardRef(({ className, loading, onClear
|
|
429
|
+
const SearchInput = forwardRef(({ className, loading, onClear, ...props }, ref) => {
|
|
444
430
|
const stringFormatter = useLocalizedStringFormatter(intlMessages$1);
|
|
445
431
|
return /* @__PURE__ */ jsx(_Input, {
|
|
446
432
|
type: "search",
|
|
447
433
|
className: cn("[&::-webkit-search-cancel-button]:hidden", className?.input),
|
|
448
434
|
ref,
|
|
449
|
-
icon: /* @__PURE__ */ jsx(Search, {
|
|
435
|
+
icon: /* @__PURE__ */ jsx(Search, {
|
|
436
|
+
"aria-hidden": "true",
|
|
437
|
+
size: "16"
|
|
438
|
+
}),
|
|
450
439
|
action: loading ? /* @__PURE__ */ jsx(ProgressCircle, {}) : /* @__PURE__ */ jsx(Button, {
|
|
451
440
|
className: className?.action,
|
|
452
441
|
onPress: () => onClear?.(),
|
|
@@ -464,23 +453,6 @@ const SearchInput = forwardRef(({ className, loading, onClear,...props }, ref) =
|
|
|
464
453
|
const ListBoxContext = createContext({});
|
|
465
454
|
const useListBoxContext = () => useContext(ListBoxContext);
|
|
466
455
|
|
|
467
|
-
//#endregion
|
|
468
|
-
//#region src/icons/Check.tsx
|
|
469
|
-
const Check = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */ jsx("svg", {
|
|
470
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
471
|
-
width: size$1,
|
|
472
|
-
height: size$1,
|
|
473
|
-
viewBox: "0 0 24 24",
|
|
474
|
-
fill: "none",
|
|
475
|
-
stroke: "currentColor",
|
|
476
|
-
strokeWidth: "2",
|
|
477
|
-
strokeLinecap: "round",
|
|
478
|
-
strokeLinejoin: "round",
|
|
479
|
-
className: cn("shrink-0", className),
|
|
480
|
-
...props,
|
|
481
|
-
children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
|
|
482
|
-
});
|
|
483
|
-
|
|
484
456
|
//#endregion
|
|
485
457
|
//#region src/ListBox/ListBoxItem.tsx
|
|
486
458
|
const _ListBoxItem = ({ ...props }) => {
|
|
@@ -502,7 +474,7 @@ const _ListBoxItem = ({ ...props }) => {
|
|
|
502
474
|
|
|
503
475
|
//#endregion
|
|
504
476
|
//#region src/ListBox/ListBoxSection.tsx
|
|
505
|
-
const _Section = ({ header, children
|
|
477
|
+
const _Section = ({ header, children, ...props }) => {
|
|
506
478
|
const { classNames: classNames$2 } = useListBoxContext();
|
|
507
479
|
return /* @__PURE__ */ jsxs(ListBoxSection, {
|
|
508
480
|
...props,
|
|
@@ -513,7 +485,7 @@ const _Section = ({ header, children,...props }) => {
|
|
|
513
485
|
|
|
514
486
|
//#endregion
|
|
515
487
|
//#region src/ListBox/ListBox.tsx
|
|
516
|
-
const _ListBox = forwardRef(({ variant, size: size$1
|
|
488
|
+
const _ListBox = forwardRef(({ variant, size: size$1, ...props }, ref) => {
|
|
517
489
|
const classNames$2 = useClassNames({
|
|
518
490
|
component: "ListBox",
|
|
519
491
|
variant,
|
|
@@ -526,7 +498,7 @@ const _ListBox = forwardRef(({ variant, size: size$1,...props }, ref) => {
|
|
|
526
498
|
className: classNames$2.container,
|
|
527
499
|
children: /* @__PURE__ */ jsx(ListBox, {
|
|
528
500
|
...props,
|
|
529
|
-
className: cn("overflow-y-auto
|
|
501
|
+
className: cn("overflow-y-auto", classNames$2.list),
|
|
530
502
|
ref,
|
|
531
503
|
...listBoxProps,
|
|
532
504
|
children: props.children
|
|
@@ -537,31 +509,9 @@ const _ListBox = forwardRef(({ variant, size: size$1,...props }, ref) => {
|
|
|
537
509
|
_ListBox.Item = _ListBoxItem;
|
|
538
510
|
_ListBox.Section = _Section;
|
|
539
511
|
|
|
540
|
-
//#endregion
|
|
541
|
-
//#region src/Overlay/Underlay.tsx
|
|
542
|
-
const Underlay = ({ size: size$1, variant, open, dismissable, keyboardDismissable,...rest }) => {
|
|
543
|
-
const classNames$2 = useClassNames({
|
|
544
|
-
component: "Underlay",
|
|
545
|
-
size: size$1,
|
|
546
|
-
variant
|
|
547
|
-
});
|
|
548
|
-
const props = {
|
|
549
|
-
isOpen: open,
|
|
550
|
-
isDismissable: dismissable,
|
|
551
|
-
isKeyboardDismissDisabled: keyboardDismissable,
|
|
552
|
-
...rest
|
|
553
|
-
};
|
|
554
|
-
return /* @__PURE__ */ jsx(ModalOverlay, {
|
|
555
|
-
className: ({ isEntering, isExiting }) => cn("fixed inset-0 z-40 grid place-items-center overflow-y-auto", isEntering ? "animate-in fade-in duration-300 ease-out" : "", isExiting ? "animate-out fade-out duration-200 ease-in" : "", classNames$2),
|
|
556
|
-
...props,
|
|
557
|
-
"data-testid": "underlay-id",
|
|
558
|
-
children: props.children
|
|
559
|
-
});
|
|
560
|
-
};
|
|
561
|
-
|
|
562
512
|
//#endregion
|
|
563
513
|
//#region src/Overlay/Popover.tsx
|
|
564
|
-
const _Popover = forwardRef(({ keyboardDismissDisabled, placement, open, children
|
|
514
|
+
const _Popover = forwardRef(({ keyboardDismissDisabled, placement, offset: offset$1 = 0, open, children, ...rest }, ref) => {
|
|
565
515
|
const props = {
|
|
566
516
|
isKeyboardDismissDisabled: keyboardDismissDisabled,
|
|
567
517
|
isOpen: open,
|
|
@@ -573,97 +523,272 @@ const _Popover = forwardRef(({ keyboardDismissDisabled, placement, open, childre
|
|
|
573
523
|
variant: placement,
|
|
574
524
|
className: "min-w-(--trigger-width)"
|
|
575
525
|
});
|
|
576
|
-
return /* @__PURE__ */ jsx(
|
|
577
|
-
ref,
|
|
578
|
-
...props,
|
|
579
|
-
className: cn("fixed! top-auto! bottom-0! left-0! max-h-fit! w-full", classNames$2),
|
|
580
|
-
children: [children, /* @__PURE__ */ jsx(Underlay, { open })]
|
|
581
|
-
}) : /* @__PURE__ */ jsx(Popover, {
|
|
526
|
+
return /* @__PURE__ */ jsx(Popover, {
|
|
582
527
|
ref,
|
|
583
528
|
...props,
|
|
584
|
-
className: classNames$2,
|
|
529
|
+
className: cn("z-30 flex", classNames$2),
|
|
585
530
|
placement,
|
|
586
|
-
offset:
|
|
531
|
+
offset: offset$1,
|
|
587
532
|
children
|
|
588
|
-
})
|
|
533
|
+
});
|
|
589
534
|
});
|
|
590
535
|
|
|
591
536
|
//#endregion
|
|
592
|
-
//#region src/
|
|
593
|
-
const
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
}
|
|
537
|
+
//#region src/Button/Button.tsx
|
|
538
|
+
const _Button = forwardRef(({ children, variant, size: size$1, disabled, loading, fullWidth, ...props }, ref) => {
|
|
539
|
+
const classNames$2 = useClassNames({
|
|
540
|
+
component: "Button",
|
|
541
|
+
variant,
|
|
542
|
+
size: size$1
|
|
543
|
+
});
|
|
544
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
545
|
+
...props,
|
|
546
|
+
ref,
|
|
547
|
+
className: cn(classNames$2, fullWidth ? "w-full" : void 0, loading && "cursor-progress!"),
|
|
548
|
+
isPending: loading,
|
|
549
|
+
isDisabled: disabled,
|
|
550
|
+
children: loading ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
551
|
+
className: "absolute",
|
|
552
|
+
children: /* @__PURE__ */ jsx(ProgressCircle, {})
|
|
553
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
554
|
+
className: "invisible flex gap-[inherit]",
|
|
555
|
+
children
|
|
556
|
+
})] }) : children
|
|
557
|
+
});
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
//#endregion
|
|
561
|
+
//#region src/Tray/Context.tsx
|
|
562
|
+
const TrayContext = createContext(null);
|
|
563
|
+
const useTrayContext = () => useContext(TrayContext);
|
|
564
|
+
|
|
565
|
+
//#endregion
|
|
566
|
+
//#region src/Tray/TrayActions.tsx
|
|
567
|
+
const TrayActions = ({ children }) => {
|
|
568
|
+
const { classNames: classNames$2 } = useTrayContext();
|
|
569
|
+
return /* @__PURE__ */ jsx("div", {
|
|
570
|
+
className: cn("[grid-area:actions]", classNames$2.actions),
|
|
571
|
+
children
|
|
572
|
+
});
|
|
624
573
|
};
|
|
625
574
|
|
|
626
575
|
//#endregion
|
|
627
|
-
//#region src/
|
|
628
|
-
const
|
|
629
|
-
const
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
loading,
|
|
634
|
-
className: { action: cn(state?.inputValue === "" ? "invisible" : "visible", classNames$2) },
|
|
635
|
-
onKeyDown: (e$1) => {
|
|
636
|
-
if (e$1.key === "Enter" || e$1.key === "Escape") e$1.preventDefault();
|
|
637
|
-
if (e$1.key === "Enter") {
|
|
638
|
-
if (state?.selectionManager.focusedKey === null) onSubmit?.(null, state?.inputValue);
|
|
639
|
-
}
|
|
576
|
+
//#region src/Tray/TrayContent.tsx
|
|
577
|
+
const TrayContent = ({ children, className }) => {
|
|
578
|
+
const { classNames: classNames$2 } = useTrayContext();
|
|
579
|
+
return /* @__PURE__ */ jsx("div", {
|
|
580
|
+
ref: (node$1) => {
|
|
581
|
+
if (node$1 && !node$1.style.minHeight) node$1.style.minHeight = `${node$1.offsetHeight}px`;
|
|
640
582
|
},
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
state?.setSelectedKey(null);
|
|
644
|
-
onClear?.();
|
|
645
|
-
}
|
|
583
|
+
className: cn("[grid-area:content]", classNames$2.content, className),
|
|
584
|
+
children
|
|
646
585
|
});
|
|
647
586
|
};
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
587
|
+
|
|
588
|
+
//#endregion
|
|
589
|
+
//#region src/Tray/TrayModal.tsx
|
|
590
|
+
const MotionModal = motion.create(Modal);
|
|
591
|
+
const MotionModalOverlay = motion.create(ModalOverlay);
|
|
592
|
+
const inertiaTransition = {
|
|
593
|
+
type: "inertia",
|
|
594
|
+
bounceStiffness: 300,
|
|
595
|
+
bounceDamping: 40,
|
|
596
|
+
timeConstant: 300
|
|
597
|
+
};
|
|
598
|
+
const staticTransition = {
|
|
599
|
+
duration: .5,
|
|
600
|
+
ease: cubicBezier(.32, .72, 0, 1)
|
|
601
|
+
};
|
|
602
|
+
const TrayModal = ({ open, onOpenChange, dismissable = true, keyboardDismissable = true, children }) => {
|
|
603
|
+
const classNames$2 = useClassNames({ component: "Tray" });
|
|
604
|
+
const state = useContext(OverlayTriggerStateContext);
|
|
605
|
+
const h$1 = typeof window !== "undefined" ? window.innerHeight : 0;
|
|
606
|
+
const y$1 = useMotionValue(h$1);
|
|
607
|
+
const handleOpenChange = (isOpen) => {
|
|
608
|
+
onOpenChange?.(isOpen);
|
|
609
|
+
if (!isOpen) state?.close();
|
|
610
|
+
};
|
|
611
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(MotionModalOverlay, {
|
|
612
|
+
isOpen: true,
|
|
613
|
+
onOpenChange: handleOpenChange,
|
|
614
|
+
isDismissable: dismissable,
|
|
615
|
+
isKeyboardDismissDisabled: !keyboardDismissable,
|
|
616
|
+
className: cn(classNames$2.overlay),
|
|
617
|
+
children: /* @__PURE__ */ jsx(MotionModal, {
|
|
618
|
+
className: classNames$2.container,
|
|
619
|
+
initial: { y: h$1 },
|
|
620
|
+
animate: { y: 0 },
|
|
621
|
+
exit: { y: h$1 },
|
|
622
|
+
transition: staticTransition,
|
|
623
|
+
style: { y: y$1 },
|
|
624
|
+
drag: "y",
|
|
625
|
+
dragConstraints: { top: 0 },
|
|
626
|
+
onDragEnd: (_e, { offset: offset$1, velocity }) => {
|
|
627
|
+
if (offset$1.y > window.innerHeight * .75 || velocity.y > 10) handleOpenChange(false);
|
|
628
|
+
else animate(y$1, 0, {
|
|
629
|
+
...inertiaTransition,
|
|
630
|
+
min: 0,
|
|
631
|
+
max: 0
|
|
632
|
+
});
|
|
633
|
+
},
|
|
634
|
+
children
|
|
635
|
+
})
|
|
636
|
+
}) });
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
//#endregion
|
|
640
|
+
//#region src/Tray/TrayTitle.tsx
|
|
641
|
+
const TrayTitle = ({ children }) => {
|
|
642
|
+
const { classNames: classNames$2 } = useTrayContext();
|
|
643
|
+
return /* @__PURE__ */ jsx(Header, {
|
|
644
|
+
className: cn("[grid-area:title]", classNames$2.header),
|
|
645
|
+
children: /* @__PURE__ */ jsx(Heading, {
|
|
646
|
+
slot: "title",
|
|
647
|
+
level: 2,
|
|
648
|
+
className: classNames$2.title,
|
|
649
|
+
children
|
|
650
|
+
})
|
|
651
|
+
});
|
|
652
|
+
};
|
|
653
|
+
|
|
654
|
+
//#endregion
|
|
655
|
+
//#region src/Tray/TrayTrigger.tsx
|
|
656
|
+
const TrayTrigger = ({ open, children, ...props }) => /* @__PURE__ */ jsx(DialogTrigger, {
|
|
657
|
+
isOpen: open,
|
|
658
|
+
...props,
|
|
659
|
+
children
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
//#endregion
|
|
663
|
+
//#region src/Tray/Tray.tsx
|
|
664
|
+
const Tray = ({ open, onOpenChange, dismissable = true, keyboardDismissable = true, children, ...props }) => {
|
|
665
|
+
const state = useContext(OverlayTriggerStateContext);
|
|
666
|
+
const isHidden = useIsHidden();
|
|
667
|
+
const classNames$2 = useClassNames({ component: "Tray" });
|
|
668
|
+
const openState = open ?? state?.isOpen;
|
|
669
|
+
if (isHidden) return /* @__PURE__ */ jsx(TrayContext.Provider, {
|
|
670
|
+
value: { classNames: classNames$2 },
|
|
671
|
+
children
|
|
672
|
+
});
|
|
673
|
+
return /* @__PURE__ */ jsx(TrayContext.Provider, {
|
|
674
|
+
value: { classNames: classNames$2 },
|
|
675
|
+
children: /* @__PURE__ */ jsx(TrayModal, {
|
|
676
|
+
open: openState,
|
|
677
|
+
dismissable,
|
|
678
|
+
onOpenChange,
|
|
679
|
+
keyboardDismissable,
|
|
680
|
+
children: /* @__PURE__ */ jsxs(Dialog, {
|
|
681
|
+
...props,
|
|
682
|
+
className: cn("group/tray [grid-template-areas:'drag'_'title'_'content'_'actions']", classNames$2.container),
|
|
683
|
+
children: [/* @__PURE__ */ jsx("div", { className: cn("[grid-area:drag]", classNames$2.dragHandle) }), children]
|
|
684
|
+
})
|
|
685
|
+
})
|
|
686
|
+
});
|
|
687
|
+
};
|
|
688
|
+
Tray.Trigger = TrayTrigger;
|
|
689
|
+
Tray.Title = TrayTitle;
|
|
690
|
+
Tray.Content = TrayContent;
|
|
691
|
+
Tray.Actions = TrayActions;
|
|
692
|
+
|
|
693
|
+
//#endregion
|
|
694
|
+
//#region src/Autocomplete/MobileAutocomplete.tsx
|
|
695
|
+
const MobileAutocompleteTrigger = ({ placeholder }) => {
|
|
696
|
+
const state = useContext(ComboBoxStateContext);
|
|
697
|
+
const inputClassNames = useClassNames({ component: "Input" });
|
|
698
|
+
const autocompleteClassNames = useClassNames({ component: "Autocomplete" });
|
|
699
|
+
const displayText = state?.selectedItem?.textValue || "";
|
|
700
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
701
|
+
className: autocompleteClassNames.mobileTrigger,
|
|
702
|
+
"data-icon": "",
|
|
703
|
+
children: [/* @__PURE__ */ jsx(Search, {
|
|
704
|
+
"aria-hidden": "true",
|
|
705
|
+
size: "16",
|
|
706
|
+
className: cn("pointer-events-none absolute z-10", inputClassNames.icon)
|
|
707
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
708
|
+
className: cn("w-full flex-1 text-left", "group-data-error/field:ui-state-error", "group-data-focus-visible/trigger:ui-state-focus", inputClassNames.input),
|
|
709
|
+
children: displayText || /* @__PURE__ */ jsx("span", {
|
|
710
|
+
className: "text-muted-foreground",
|
|
711
|
+
children: placeholder
|
|
712
|
+
})
|
|
713
|
+
})]
|
|
714
|
+
});
|
|
715
|
+
};
|
|
716
|
+
const MobileAutocomplete = ({ placeholder, label, emptyState, children, input }) => {
|
|
717
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
718
|
+
return /* @__PURE__ */ jsxs(Tray.Trigger, { children: [/* @__PURE__ */ jsx(Button, {
|
|
719
|
+
className: "group/trigger outline-none",
|
|
720
|
+
children: /* @__PURE__ */ jsx(MobileAutocompleteTrigger, { placeholder })
|
|
721
|
+
}), /* @__PURE__ */ jsxs(Tray, { children: [
|
|
722
|
+
/* @__PURE__ */ jsx(Tray.Title, { children: label }),
|
|
723
|
+
/* @__PURE__ */ jsxs(Tray.Content, {
|
|
724
|
+
className: "flex flex-col gap-2",
|
|
725
|
+
children: [input, /* @__PURE__ */ jsx(_ListBox, {
|
|
726
|
+
renderEmptyState: () => emptyState ?? /* @__PURE__ */ jsx(Center, { children: stringFormatter.format("noResultsFound") }),
|
|
727
|
+
children
|
|
728
|
+
})]
|
|
729
|
+
}),
|
|
730
|
+
/* @__PURE__ */ jsx(Tray.Actions, { children: /* @__PURE__ */ jsx(_Button, {
|
|
731
|
+
slot: "close",
|
|
732
|
+
children: stringFormatter.format("close")
|
|
733
|
+
}) })
|
|
734
|
+
] })] });
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
//#endregion
|
|
738
|
+
//#region src/Autocomplete/Autocomplete.tsx
|
|
739
|
+
const AutocompleteInput = ({ loading, onSubmit, onClear, ref, autoFocus }) => {
|
|
740
|
+
const state = useContext(ComboBoxStateContext);
|
|
741
|
+
const classNames$2 = useClassNames({ component: "ComboBox" });
|
|
742
|
+
return /* @__PURE__ */ jsx(SearchInput, {
|
|
743
|
+
ref,
|
|
744
|
+
loading,
|
|
745
|
+
autoFocus,
|
|
746
|
+
className: { action: cn(state?.inputValue === "" ? "invisible" : "visible", classNames$2) },
|
|
747
|
+
onKeyDown: (e$1) => {
|
|
748
|
+
if (e$1.key === "Enter" || e$1.key === "Escape") e$1.preventDefault();
|
|
749
|
+
if (e$1.key === "Enter") {
|
|
750
|
+
if (state?.selectionManager.focusedKey === null) onSubmit?.(null, state?.inputValue);
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
onClear: () => {
|
|
754
|
+
state?.setInputValue("");
|
|
755
|
+
state?.setSelectedKey(null);
|
|
756
|
+
onClear?.();
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
};
|
|
760
|
+
const _Autocomplete = forwardRef(({ children, defaultValue, value, disabled, error, readOnly, required, emptyState, loading, onChange, onClear, onSubmit, ...rest }, ref) => {
|
|
761
|
+
const props = {
|
|
762
|
+
onSelectionChange: (key) => key !== null && onSubmit?.(key, null),
|
|
763
|
+
defaultInputValue: defaultValue,
|
|
764
|
+
inputValue: value,
|
|
765
|
+
onInputChange: onChange,
|
|
766
|
+
allowsCustomValue: true,
|
|
767
|
+
isDisabled: disabled,
|
|
768
|
+
isInvalid: error,
|
|
769
|
+
isReadOnly: readOnly,
|
|
658
770
|
isRequired: required,
|
|
659
771
|
...rest
|
|
660
772
|
};
|
|
661
773
|
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
662
|
-
|
|
774
|
+
const isSmallScreen = useSmallScreen();
|
|
775
|
+
return /* @__PURE__ */ jsx(FieldBase, {
|
|
663
776
|
as: ComboBox,
|
|
664
777
|
ref,
|
|
665
778
|
...props,
|
|
666
|
-
children:
|
|
779
|
+
children: isSmallScreen ? /* @__PURE__ */ jsx(MobileAutocomplete, {
|
|
780
|
+
placeholder: rest.placeholder,
|
|
781
|
+
label: rest.label,
|
|
782
|
+
emptyState,
|
|
783
|
+
input: /* @__PURE__ */ jsx(AutocompleteInput, {
|
|
784
|
+
loading,
|
|
785
|
+
onSubmit,
|
|
786
|
+
onClear,
|
|
787
|
+
ref,
|
|
788
|
+
autoFocus: true
|
|
789
|
+
}),
|
|
790
|
+
children
|
|
791
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(AutocompleteInput, {
|
|
667
792
|
loading,
|
|
668
793
|
onSubmit,
|
|
669
794
|
onClear,
|
|
@@ -671,29 +796,61 @@ const _Autocomplete = forwardRef(({ children, defaultValue, value, disabled, err
|
|
|
671
796
|
}), /* @__PURE__ */ jsx(_Popover, { children: /* @__PURE__ */ jsx(_ListBox, {
|
|
672
797
|
renderEmptyState: () => emptyState ?? /* @__PURE__ */ jsx(Center, { children: stringFormatter.format("noResultsFound") }),
|
|
673
798
|
children
|
|
674
|
-
}) })]
|
|
799
|
+
}) })] })
|
|
675
800
|
});
|
|
676
801
|
});
|
|
677
802
|
_Autocomplete.Option = _ListBox.Item;
|
|
678
803
|
_Autocomplete.Section = _ListBox.Section;
|
|
679
804
|
|
|
805
|
+
//#endregion
|
|
806
|
+
//#region src/icons/Lock.tsx
|
|
807
|
+
const Lock = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
808
|
+
"data-testid": "lock-icon",
|
|
809
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
810
|
+
width: size$1,
|
|
811
|
+
height: size$1,
|
|
812
|
+
viewBox: "0 0 24 24",
|
|
813
|
+
fill: "none",
|
|
814
|
+
stroke: "currentColor",
|
|
815
|
+
strokeWidth: "2",
|
|
816
|
+
strokeLinecap: "round",
|
|
817
|
+
strokeLinejoin: "round",
|
|
818
|
+
className: cn("shrink-0", className),
|
|
819
|
+
...props,
|
|
820
|
+
children: [
|
|
821
|
+
/* @__PURE__ */ jsx("circle", {
|
|
822
|
+
cx: "12",
|
|
823
|
+
cy: "16",
|
|
824
|
+
r: "1"
|
|
825
|
+
}),
|
|
826
|
+
/* @__PURE__ */ jsx("rect", {
|
|
827
|
+
x: "3",
|
|
828
|
+
y: "10",
|
|
829
|
+
width: "18",
|
|
830
|
+
height: "12",
|
|
831
|
+
rx: "2"
|
|
832
|
+
}),
|
|
833
|
+
/* @__PURE__ */ jsx("path", { d: "M7 10V7a5 5 0 0 1 10 0v3" })
|
|
834
|
+
]
|
|
835
|
+
});
|
|
836
|
+
|
|
680
837
|
//#endregion
|
|
681
838
|
//#region src/Badge/Badge.tsx
|
|
682
|
-
const Badge = ({ variant, size: size$1, children
|
|
683
|
-
return /* @__PURE__ */
|
|
839
|
+
const Badge = ({ variant, size: size$1, children, ...props }) => {
|
|
840
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
684
841
|
className: useClassNames({
|
|
685
842
|
component: "Badge",
|
|
686
843
|
variant,
|
|
687
844
|
size: size$1
|
|
688
845
|
}),
|
|
689
846
|
...props,
|
|
690
|
-
children
|
|
847
|
+
children: [["master", "admin"].includes(variant ?? "") && /* @__PURE__ */ jsx(Lock, { size: 16 }), children]
|
|
691
848
|
});
|
|
692
849
|
};
|
|
693
850
|
|
|
694
851
|
//#endregion
|
|
695
852
|
//#region src/icons/ChevronRight.tsx
|
|
696
|
-
const ChevronRight = ({ size: size$1 = 24, className
|
|
853
|
+
const ChevronRight = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsx("svg", {
|
|
697
854
|
xmlns: "http://www.w3.org/2000/svg",
|
|
698
855
|
width: size$1,
|
|
699
856
|
height: size$1,
|
|
@@ -710,7 +867,7 @@ const ChevronRight = ({ size: size$1 = 24, className,...props }) => /* @__PURE__
|
|
|
710
867
|
|
|
711
868
|
//#endregion
|
|
712
869
|
//#region src/IconButton/IconButton.tsx
|
|
713
|
-
const IconButton = ({ className, children, variant, size: size$1
|
|
870
|
+
const IconButton = ({ className, children, variant, size: size$1, ...props }) => {
|
|
714
871
|
return /* @__PURE__ */ jsx(Button, {
|
|
715
872
|
className: cn("shrink-0 cursor-pointer outline-0", useClassNames({
|
|
716
873
|
component: "IconButton",
|
|
@@ -751,7 +908,7 @@ const BreadcrumbsItem = (_) => null;
|
|
|
751
908
|
|
|
752
909
|
//#endregion
|
|
753
910
|
//#region src/Breadcrumbs/Breadcrumbs.tsx
|
|
754
|
-
const _Breadcrumbs = forwardRef(({ children, variant, size: size$1, disabled, maxVisibleItems
|
|
911
|
+
const _Breadcrumbs = forwardRef(({ children, variant, size: size$1, disabled, maxVisibleItems, ...props }, ref) => {
|
|
755
912
|
const { container, item: breadcrumbsItem, link, current } = useClassNames({
|
|
756
913
|
component: "Breadcrumbs",
|
|
757
914
|
variant,
|
|
@@ -777,7 +934,7 @@ const _Breadcrumbs = forwardRef(({ children, variant, size: size$1, disabled, ma
|
|
|
777
934
|
children: displayedItems.map((item, index$1) => {
|
|
778
935
|
if (!isValidElement(item)) return null;
|
|
779
936
|
const isLast = index$1 === displayedItems.length - 1;
|
|
780
|
-
const { href, children: itemChildren
|
|
937
|
+
const { href, children: itemChildren, ...ariaProps } = item.props;
|
|
781
938
|
return /* @__PURE__ */ jsxs(Breadcrumb, {
|
|
782
939
|
...ariaProps,
|
|
783
940
|
className: breadcrumbsItem,
|
|
@@ -805,30 +962,6 @@ const Breakout = ({ children }) => /* @__PURE__ */ jsx("div", {
|
|
|
805
962
|
children
|
|
806
963
|
});
|
|
807
964
|
|
|
808
|
-
//#endregion
|
|
809
|
-
//#region src/Button/Button.tsx
|
|
810
|
-
const _Button = forwardRef(({ children, variant, size: size$1, disabled, loading, fullWidth,...props }, ref) => {
|
|
811
|
-
const classNames$2 = useClassNames({
|
|
812
|
-
component: "Button",
|
|
813
|
-
variant,
|
|
814
|
-
size: size$1
|
|
815
|
-
});
|
|
816
|
-
return /* @__PURE__ */ jsx(Button, {
|
|
817
|
-
...props,
|
|
818
|
-
ref,
|
|
819
|
-
className: cn(classNames$2, fullWidth ? "w-full" : void 0, loading && "cursor-progress!"),
|
|
820
|
-
isPending: loading,
|
|
821
|
-
isDisabled: disabled,
|
|
822
|
-
children: loading ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
823
|
-
className: "absolute",
|
|
824
|
-
children: /* @__PURE__ */ jsx(ProgressCircle, {})
|
|
825
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
826
|
-
className: "invisible flex gap-[inherit]",
|
|
827
|
-
children
|
|
828
|
-
})] }) : children
|
|
829
|
-
});
|
|
830
|
-
});
|
|
831
|
-
|
|
832
965
|
//#endregion
|
|
833
966
|
//#region src/Calendar/CalendarGridHeader.tsx
|
|
834
967
|
function CalendarGridHeader(props) {
|
|
@@ -862,9 +995,10 @@ function CalendarGridHeader(props) {
|
|
|
862
995
|
|
|
863
996
|
//#endregion
|
|
864
997
|
//#region src/Calendar/CalendarGrid.tsx
|
|
865
|
-
const _CalendarGrid = () => {
|
|
998
|
+
const _CalendarGrid = ({ offset: offset$1 }) => {
|
|
866
999
|
const classNames$2 = useClassNames({ component: "Calendar" });
|
|
867
1000
|
return /* @__PURE__ */ jsxs(CalendarGrid, {
|
|
1001
|
+
offset: offset$1,
|
|
868
1002
|
className: classNames$2.calendarGrid,
|
|
869
1003
|
children: [/* @__PURE__ */ jsx(CalendarGridHeader, {}), /* @__PURE__ */ jsx(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx(CalendarCell, {
|
|
870
1004
|
date,
|
|
@@ -874,8 +1008,8 @@ const _CalendarGrid = () => {
|
|
|
874
1008
|
};
|
|
875
1009
|
|
|
876
1010
|
//#endregion
|
|
877
|
-
//#region src/icons/
|
|
878
|
-
const
|
|
1011
|
+
//#region src/icons/ChevronLeft.tsx
|
|
1012
|
+
const ChevronLeft = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsx("svg", {
|
|
879
1013
|
xmlns: "http://www.w3.org/2000/svg",
|
|
880
1014
|
width: size$1,
|
|
881
1015
|
height: size$1,
|
|
@@ -887,13 +1021,75 @@ const ChevronsVertical = ({ size: size$1 = 24, className,...props }) => /* @__PU
|
|
|
887
1021
|
strokeLinejoin: "round",
|
|
888
1022
|
className: cn("shrink-0", className),
|
|
889
1023
|
...props,
|
|
890
|
-
children: /* @__PURE__ */ jsx("path", { d: "
|
|
1024
|
+
children: /* @__PURE__ */ jsx("path", { d: "m15 18-6-6 6-6" })
|
|
891
1025
|
});
|
|
892
1026
|
|
|
893
1027
|
//#endregion
|
|
894
1028
|
//#region src/Calendar/Context.tsx
|
|
895
|
-
const CalendarContext = createContext(
|
|
896
|
-
const useCalendarContext = () =>
|
|
1029
|
+
const CalendarContext = createContext(null);
|
|
1030
|
+
const useCalendarContext = () => {
|
|
1031
|
+
const ctx = useContext(CalendarContext);
|
|
1032
|
+
if (!ctx) throw new Error("Calendar components must be used within <Calendar>");
|
|
1033
|
+
return ctx;
|
|
1034
|
+
};
|
|
1035
|
+
|
|
1036
|
+
//#endregion
|
|
1037
|
+
//#region src/Calendar/CalendarHeader.tsx
|
|
1038
|
+
const CalendarHeader = ({ monthOffset = 0, showPrevious = true, showNext = true }) => {
|
|
1039
|
+
const state = useContext(CalendarStateContext);
|
|
1040
|
+
const { classNames: classNames$2 } = useCalendarContext();
|
|
1041
|
+
const monthFormatter = useDateFormatter({
|
|
1042
|
+
month: "long",
|
|
1043
|
+
year: "numeric",
|
|
1044
|
+
timeZone: state.timeZone
|
|
1045
|
+
});
|
|
1046
|
+
const monthDate = state.visibleRange.start.add({ months: monthOffset });
|
|
1047
|
+
const formattedMonth = monthFormatter.format(monthDate.toDate(state.timeZone));
|
|
1048
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1049
|
+
className: "mb-4 flex min-h-[36px] items-center justify-between",
|
|
1050
|
+
children: [
|
|
1051
|
+
/* @__PURE__ */ jsx("div", {
|
|
1052
|
+
className: "flex-1",
|
|
1053
|
+
children: showPrevious && /* @__PURE__ */ jsx(IconButton, {
|
|
1054
|
+
className: cn("inline-flex items-center justify-center gap-[0.5ch]", classNames$2.calendarControllers),
|
|
1055
|
+
variant: "navigation",
|
|
1056
|
+
slot: "previous",
|
|
1057
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { size: "20" })
|
|
1058
|
+
})
|
|
1059
|
+
}),
|
|
1060
|
+
/* @__PURE__ */ jsx(Heading, {
|
|
1061
|
+
className: "text-sm font-medium",
|
|
1062
|
+
children: formattedMonth
|
|
1063
|
+
}),
|
|
1064
|
+
/* @__PURE__ */ jsx("div", {
|
|
1065
|
+
className: "flex flex-1 justify-end",
|
|
1066
|
+
children: showNext && /* @__PURE__ */ jsx(IconButton, {
|
|
1067
|
+
className: cn("inline-flex items-center justify-center gap-[0.5ch]", classNames$2.calendarControllers),
|
|
1068
|
+
variant: "navigation",
|
|
1069
|
+
slot: "next",
|
|
1070
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { size: "20" })
|
|
1071
|
+
})
|
|
1072
|
+
})
|
|
1073
|
+
]
|
|
1074
|
+
});
|
|
1075
|
+
};
|
|
1076
|
+
|
|
1077
|
+
//#endregion
|
|
1078
|
+
//#region src/icons/ChevronsVertical.tsx
|
|
1079
|
+
const ChevronsVertical = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsx("svg", {
|
|
1080
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1081
|
+
width: size$1,
|
|
1082
|
+
height: size$1,
|
|
1083
|
+
viewBox: "0 0 24 24",
|
|
1084
|
+
fill: "none",
|
|
1085
|
+
stroke: "currentColor",
|
|
1086
|
+
strokeWidth: "2",
|
|
1087
|
+
strokeLinecap: "round",
|
|
1088
|
+
strokeLinejoin: "round",
|
|
1089
|
+
className: cn("shrink-0", className),
|
|
1090
|
+
...props,
|
|
1091
|
+
children: /* @__PURE__ */ jsx("path", { d: "M7 15l5 5 5-5M7 9l5-5 5 5" })
|
|
1092
|
+
});
|
|
897
1093
|
|
|
898
1094
|
//#endregion
|
|
899
1095
|
//#region src/Calendar/useFormattedMonths.tsx
|
|
@@ -931,23 +1127,6 @@ const CalendarListBox = ({ type, isDisabled, setSelectedDropdown }) => {
|
|
|
931
1127
|
});
|
|
932
1128
|
};
|
|
933
1129
|
|
|
934
|
-
//#endregion
|
|
935
|
-
//#region src/icons/ChevronLeft.tsx
|
|
936
|
-
const ChevronLeft = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */ jsx("svg", {
|
|
937
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
938
|
-
width: size$1,
|
|
939
|
-
height: size$1,
|
|
940
|
-
viewBox: "0 0 24 24",
|
|
941
|
-
fill: "none",
|
|
942
|
-
stroke: "currentColor",
|
|
943
|
-
strokeWidth: "2",
|
|
944
|
-
strokeLinecap: "round",
|
|
945
|
-
strokeLinejoin: "round",
|
|
946
|
-
className: cn("shrink-0", className),
|
|
947
|
-
...props,
|
|
948
|
-
children: /* @__PURE__ */ jsx("path", { d: "m15 18-6-6 6-6" })
|
|
949
|
-
});
|
|
950
|
-
|
|
951
1130
|
//#endregion
|
|
952
1131
|
//#region src/Calendar/MonthControls.tsx
|
|
953
1132
|
function MonthControls() {
|
|
@@ -1058,335 +1237,123 @@ function hasOnlyOneSelectableYear(minValue, maxValue) {
|
|
|
1058
1237
|
|
|
1059
1238
|
//#endregion
|
|
1060
1239
|
//#region src/Calendar/Calendar.tsx
|
|
1061
|
-
const _Calendar = ({ disabled, readOnly, size: size$1, variant, width: width$1 = "fit", dateUnavailable, minValue
|
|
1062
|
-
const
|
|
1063
|
-
const
|
|
1064
|
-
const props = {
|
|
1065
|
-
isDisabled: disabled,
|
|
1066
|
-
isReadOnly: readOnly,
|
|
1067
|
-
isDateUnavailable: dateUnavailable,
|
|
1068
|
-
minValue,
|
|
1069
|
-
maxValue,
|
|
1070
|
-
...rest
|
|
1071
|
-
};
|
|
1072
|
-
const classNames$2 = useClassNames({
|
|
1073
|
-
component: "Calendar",
|
|
1074
|
-
size: size$1,
|
|
1075
|
-
variant
|
|
1076
|
-
});
|
|
1077
|
-
const [selectedDropdown, setSelectedDropdown] = useState();
|
|
1078
|
-
const ViewMap = {
|
|
1079
|
-
month: /* @__PURE__ */ jsx(MonthListBox_default, {
|
|
1080
|
-
setSelectedDropdown,
|
|
1081
|
-
minValue,
|
|
1082
|
-
maxValue
|
|
1083
|
-
}),
|
|
1084
|
-
year: /* @__PURE__ */ jsx(YearListBox_default, {
|
|
1085
|
-
setSelectedDropdown,
|
|
1086
|
-
minValue,
|
|
1087
|
-
maxValue
|
|
1088
|
-
})
|
|
1089
|
-
};
|
|
1090
|
-
return /* @__PURE__ */ jsx(CalendarContext.Provider, {
|
|
1091
|
-
value: { classNames: classNames$2 },
|
|
1092
|
-
children: /* @__PURE__ */ jsxs(Calendar, {
|
|
1093
|
-
className: cn("relative flex min-h-[350px] flex-col rounded-xs p-4", width[width$1], classNames$2.calendar),
|
|
1094
|
-
...props,
|
|
1095
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
1096
|
-
className: cn("pointer-events-none absolute top-1/2 left-0 w-full -translate-y-1/2 opacity-0", selectedDropdown && "pointer-events-auto opacity-100"),
|
|
1097
|
-
children: ViewMap[selectedDropdown]
|
|
1098
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
1099
|
-
className: cn("flex flex-col", selectedDropdown && "pointer-events-none opacity-0"),
|
|
1100
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
1101
|
-
className: "mb-4 flex items-center justify-between",
|
|
1102
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
1103
|
-
className: "flex w-fit gap-4",
|
|
1104
|
-
children: [/* @__PURE__ */ jsx(CalendarListBox, {
|
|
1105
|
-
type: "month",
|
|
1106
|
-
isDisabled: hasOnlyOneSelectableMonth(minValue, maxValue) || props.isDisabled,
|
|
1107
|
-
setSelectedDropdown
|
|
1108
|
-
}, "month"), /* @__PURE__ */ jsx(CalendarListBox, {
|
|
1109
|
-
type: "year",
|
|
1110
|
-
isDisabled: hasOnlyOneSelectableYear(minValue, maxValue) || props.isDisabled,
|
|
1111
|
-
setSelectedDropdown
|
|
1112
|
-
}, "year")]
|
|
1113
|
-
}), /* @__PURE__ */ jsx(MonthControls_default, {})]
|
|
1114
|
-
}), /* @__PURE__ */ jsx(_CalendarGrid, {})]
|
|
1115
|
-
})]
|
|
1116
|
-
})
|
|
1117
|
-
});
|
|
1118
|
-
};
|
|
1119
|
-
|
|
1120
|
-
//#endregion
|
|
1121
|
-
//#region src/Card/Card.tsx
|
|
1122
|
-
const Card = ({ children, variant, size: size$1, space = 0, p: p$1, px, py, pt, pb, pl, pr,...props }) => {
|
|
1123
|
-
const classNames$2 = useClassNames({
|
|
1124
|
-
component: "Card",
|
|
1125
|
-
variant,
|
|
1126
|
-
size: size$1
|
|
1127
|
-
});
|
|
1128
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1129
|
-
...props,
|
|
1130
|
-
className: cn("flex flex-col", classNames$2, gapSpace[space], paddingSpace !== void 0 && paddingSpace[p$1], paddingSpaceX !== void 0 && paddingSpaceX[px], paddingSpaceY !== void 0 && paddingSpaceY[py], paddingRight !== void 0 && paddingRight[pr], paddingLeft !== void 0 && paddingLeft[pl], paddingBottom !== void 0 && paddingBottom[pb], paddingTop !== void 0 && paddingTop[pt]),
|
|
1131
|
-
children
|
|
1132
|
-
});
|
|
1133
|
-
};
|
|
1134
|
-
|
|
1135
|
-
//#endregion
|
|
1136
|
-
//#region src/Collapsible/Context.tsx
|
|
1137
|
-
const CollapsibleContext = createContext(void 0);
|
|
1138
|
-
const CollapsibleProvider = ({ value, children }) => /* @__PURE__ */ jsx(CollapsibleContext.Provider, {
|
|
1139
|
-
value,
|
|
1140
|
-
children
|
|
1141
|
-
});
|
|
1142
|
-
|
|
1143
|
-
//#endregion
|
|
1144
|
-
//#region src/Collapsible/CollapsibleContent.tsx
|
|
1145
|
-
const CollapsibleContent = ({ variant, size: size$1, children,...props }) => {
|
|
1146
|
-
const classNames$2 = useClassNames({
|
|
1147
|
-
component: "Collapsible",
|
|
1148
|
-
variant,
|
|
1149
|
-
size: size$1,
|
|
1150
|
-
context: CollapsibleContext
|
|
1151
|
-
});
|
|
1152
|
-
return /* @__PURE__ */ jsx(DisclosurePanel, {
|
|
1153
|
-
...props,
|
|
1154
|
-
className: classNames$2.content,
|
|
1155
|
-
children
|
|
1156
|
-
});
|
|
1157
|
-
};
|
|
1158
|
-
|
|
1159
|
-
//#endregion
|
|
1160
|
-
//#region src/Collapsible/CollapsibleTrigger.tsx
|
|
1161
|
-
const CollapsibleTrigger = ({ variant, size: size$1, children, level,...props }) => {
|
|
1162
|
-
const classNames$2 = useClassNames({
|
|
1163
|
-
component: "Collapsible",
|
|
1164
|
-
variant,
|
|
1165
|
-
size: size$1,
|
|
1166
|
-
context: CollapsibleContext
|
|
1167
|
-
});
|
|
1168
|
-
return /* @__PURE__ */ jsx(Heading, {
|
|
1169
|
-
level,
|
|
1170
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
1171
|
-
...props,
|
|
1172
|
-
slot: "trigger",
|
|
1173
|
-
className: classNames$2.trigger,
|
|
1174
|
-
children
|
|
1175
|
-
})
|
|
1176
|
-
});
|
|
1177
|
-
};
|
|
1178
|
-
|
|
1179
|
-
//#endregion
|
|
1180
|
-
//#region src/Collapsible/Collapsible.tsx
|
|
1181
|
-
const Collapsible = ({ variant, size: size$1, children, unstyled,...props }) => {
|
|
1182
|
-
const classNames$2 = useClassNames({
|
|
1183
|
-
component: "Collapsible",
|
|
1184
|
-
variant,
|
|
1185
|
-
size: size$1
|
|
1186
|
-
});
|
|
1187
|
-
return /* @__PURE__ */ jsx(CollapsibleProvider, {
|
|
1188
|
-
value: {
|
|
1189
|
-
variant,
|
|
1190
|
-
size: size$1
|
|
1191
|
-
},
|
|
1192
|
-
children: /* @__PURE__ */ jsx(Disclosure, {
|
|
1193
|
-
...props,
|
|
1194
|
-
className: cn(classNames$2.container, unstyled && "expanded:contents expanded:[&_[role=group]]:contents"),
|
|
1195
|
-
children
|
|
1196
|
-
})
|
|
1197
|
-
});
|
|
1198
|
-
};
|
|
1199
|
-
Collapsible.Trigger = CollapsibleTrigger;
|
|
1200
|
-
Collapsible.Content = CollapsibleContent;
|
|
1201
|
-
|
|
1202
|
-
//#endregion
|
|
1203
|
-
//#region src/Collapsible/More.tsx
|
|
1204
|
-
const More = ({ children, defaultExpanded = false, unstyled = true, showCount = false,...props }) => {
|
|
1205
|
-
/**
|
|
1206
|
-
* We need to add state here, because toggling on a checkbox will
|
|
1207
|
-
* force a rerender and without the state the <Collapsible> will be collapsed.
|
|
1208
|
-
*/
|
|
1209
|
-
const [isExpanded, setIsExpanded] = useState(defaultExpanded);
|
|
1210
|
-
const stringFormatter = useLocalizedStringFormatter(intlMessages, "marigold");
|
|
1211
|
-
const count = `${Children.count(children)}`;
|
|
1212
|
-
return /* @__PURE__ */ jsxs(Collapsible, {
|
|
1213
|
-
variant: "link",
|
|
1214
|
-
unstyled,
|
|
1215
|
-
isExpanded,
|
|
1216
|
-
...props,
|
|
1217
|
-
children: [/* @__PURE__ */ jsx(Collapsible.Content, { children }), /* @__PURE__ */ jsx(Collapsible.Trigger, {
|
|
1218
|
-
onPress: () => setIsExpanded(!isExpanded),
|
|
1219
|
-
children: isExpanded ? stringFormatter.format(showCount ? "showLessCount" : "showLess").replace("{count}", count) : stringFormatter.format(showCount ? "showMoreCount" : "showMore").replace("{count}", count)
|
|
1220
|
-
})]
|
|
1221
|
-
});
|
|
1222
|
-
};
|
|
1223
|
-
|
|
1224
|
-
//#endregion
|
|
1225
|
-
//#region src/utils/children.utils.ts
|
|
1226
|
-
const splitChildren = (children, at) => {
|
|
1227
|
-
const childArray = Children.toArray(children);
|
|
1228
|
-
if (at === void 0) return [childArray, []];
|
|
1229
|
-
return [childArray.slice(0, at), childArray.slice(at)];
|
|
1230
|
-
};
|
|
1231
|
-
|
|
1232
|
-
//#endregion
|
|
1233
|
-
//#region src/Checkbox/Context.tsx
|
|
1234
|
-
const CheckboxGroupContext = createContext(null);
|
|
1235
|
-
const useCheckboxGroupContext = () => useContext(CheckboxGroupContext);
|
|
1236
|
-
|
|
1237
|
-
//#endregion
|
|
1238
|
-
//#region src/Checkbox/CheckboxGroup.tsx
|
|
1239
|
-
const CollapsibleGroup$1 = ({ children }) => {
|
|
1240
|
-
const state = useContext(CheckboxGroupStateContext);
|
|
1241
|
-
if (!children || children.length === 0) return null;
|
|
1242
|
-
return /* @__PURE__ */ jsx(More, {
|
|
1243
|
-
defaultExpanded: children.some((child) => isValidElement(child) && state.value.includes(child.props.value)),
|
|
1244
|
-
showCount: true,
|
|
1245
|
-
children
|
|
1246
|
-
});
|
|
1247
|
-
};
|
|
1248
|
-
const _CheckboxGroup = ({ children, variant, size: size$1, required, disabled, readOnly, error, width: width$1, orientation = "vertical", collapseAt,...rest }) => {
|
|
1249
|
-
const classNames$2 = useClassNames({
|
|
1250
|
-
component: "Checkbox",
|
|
1251
|
-
variant,
|
|
1252
|
-
size: size$1,
|
|
1253
|
-
className: { group: "gap-x-2" }
|
|
1254
|
-
});
|
|
1240
|
+
const _Calendar = ({ disabled, readOnly, size: size$1, variant, width: width$1 = "fit", dateUnavailable, minValue, maxValue, visibleDuration = { months: 1 }, pageBehavior = "visible", ...rest }) => {
|
|
1241
|
+
const visibleMonths = visibleDuration?.months ?? 1;
|
|
1242
|
+
const isMultiMonth = visibleMonths > 1;
|
|
1255
1243
|
const props = {
|
|
1256
|
-
className: classNames$2.group,
|
|
1257
|
-
isRequired: required,
|
|
1258
1244
|
isDisabled: disabled,
|
|
1259
|
-
isReadOnly: readOnly,
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
as: CheckboxGroup,
|
|
1266
|
-
width: width$1,
|
|
1267
|
-
...props,
|
|
1268
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
1269
|
-
role: "presentation",
|
|
1270
|
-
"data-orientation": orientation,
|
|
1271
|
-
className: cn(classNames$2.group, "group/checkboxgroup flex items-start", orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"),
|
|
1272
|
-
children: /* @__PURE__ */ jsxs(CheckboxGroupContext.Provider, {
|
|
1273
|
-
value: {
|
|
1274
|
-
width: width$1,
|
|
1275
|
-
variant,
|
|
1276
|
-
size: size$1
|
|
1277
|
-
},
|
|
1278
|
-
children: [visibleChildren, /* @__PURE__ */ jsx(CollapsibleGroup$1, { children: collapsedChildren })]
|
|
1279
|
-
})
|
|
1280
|
-
})
|
|
1281
|
-
});
|
|
1282
|
-
};
|
|
1283
|
-
|
|
1284
|
-
//#endregion
|
|
1285
|
-
//#region src/icons/Minus.tsx
|
|
1286
|
-
const Minus = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */ jsx("svg", {
|
|
1287
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1288
|
-
width: size$1,
|
|
1289
|
-
height: size$1,
|
|
1290
|
-
viewBox: "0 0 24 24",
|
|
1291
|
-
fill: "none",
|
|
1292
|
-
stroke: "currentColor",
|
|
1293
|
-
strokeWidth: "2",
|
|
1294
|
-
strokeLinecap: "round",
|
|
1295
|
-
strokeLinejoin: "round",
|
|
1296
|
-
className: cn("shrink-0", className),
|
|
1297
|
-
...props,
|
|
1298
|
-
children: /* @__PURE__ */ jsx("path", { d: "M5 12h14" })
|
|
1299
|
-
});
|
|
1300
|
-
|
|
1301
|
-
//#endregion
|
|
1302
|
-
//#region src/Checkbox/Checkbox.tsx
|
|
1303
|
-
const Field = ({ description, children }) => {
|
|
1304
|
-
const className = useClassNames({ component: "Field" });
|
|
1305
|
-
const descriptionId = useId();
|
|
1306
|
-
if (!description) return children;
|
|
1307
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1308
|
-
className,
|
|
1309
|
-
children: /* @__PURE__ */ jsxs(Provider, {
|
|
1310
|
-
values: [[CheckboxContext, { "aria-describedby": descriptionId }], [TextContext, { id: descriptionId }]],
|
|
1311
|
-
children: [children, /* @__PURE__ */ jsx(HelpText, { description })]
|
|
1312
|
-
})
|
|
1313
|
-
});
|
|
1314
|
-
};
|
|
1315
|
-
const Icon$1 = ({ className, checked, indeterminate,...props }) => {
|
|
1316
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1317
|
-
"aria-hidden": "true",
|
|
1318
|
-
className: cn("flex shrink-0 grow-0 basis-4 items-center justify-center", "h-4 w-4 p-px", "bg-white", "rounded-[3px] border border-solid border-black", className),
|
|
1319
|
-
...props,
|
|
1320
|
-
children: indeterminate ? /* @__PURE__ */ jsx(Minus, {
|
|
1321
|
-
size: "12",
|
|
1322
|
-
strokeWidth: "4"
|
|
1323
|
-
}) : checked ? /* @__PURE__ */ jsx(Check, {
|
|
1324
|
-
size: "12",
|
|
1325
|
-
strokeWidth: "4"
|
|
1326
|
-
}) : null
|
|
1327
|
-
});
|
|
1328
|
-
};
|
|
1329
|
-
const _Checkbox = forwardRef(({ error, disabled, readOnly, required, checked, defaultChecked, indeterminate, variant, size: size$1, label, description,...rest }, ref) => {
|
|
1330
|
-
const props = {
|
|
1331
|
-
isIndeterminate: indeterminate,
|
|
1332
|
-
isDisabled: disabled,
|
|
1333
|
-
isReadOnly: readOnly,
|
|
1334
|
-
isRequired: required,
|
|
1335
|
-
isInvalid: error,
|
|
1336
|
-
isSelected: checked,
|
|
1337
|
-
defaultSelected: defaultChecked,
|
|
1245
|
+
isReadOnly: readOnly,
|
|
1246
|
+
isDateUnavailable: dateUnavailable,
|
|
1247
|
+
minValue,
|
|
1248
|
+
maxValue,
|
|
1249
|
+
visibleDuration,
|
|
1250
|
+
pageBehavior,
|
|
1338
1251
|
...rest
|
|
1339
1252
|
};
|
|
1340
|
-
const group = useCheckboxGroupContext();
|
|
1341
1253
|
const classNames$2 = useClassNames({
|
|
1342
|
-
component: "
|
|
1343
|
-
|
|
1344
|
-
|
|
1254
|
+
component: "Calendar",
|
|
1255
|
+
size: size$1,
|
|
1256
|
+
variant
|
|
1345
1257
|
});
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1258
|
+
const [selectedDropdown, setSelectedDropdown] = useState();
|
|
1259
|
+
const ViewMap = {
|
|
1260
|
+
month: /* @__PURE__ */ jsx(MonthListBox_default, {
|
|
1261
|
+
setSelectedDropdown,
|
|
1262
|
+
minValue,
|
|
1263
|
+
maxValue
|
|
1264
|
+
}),
|
|
1265
|
+
year: /* @__PURE__ */ jsx(YearListBox_default, {
|
|
1266
|
+
setSelectedDropdown,
|
|
1267
|
+
minValue,
|
|
1268
|
+
maxValue
|
|
1269
|
+
})
|
|
1270
|
+
};
|
|
1271
|
+
if (isMultiMonth) return /* @__PURE__ */ jsx(CalendarContext.Provider, {
|
|
1272
|
+
value: {
|
|
1273
|
+
classNames: classNames$2,
|
|
1274
|
+
visibleMonths,
|
|
1275
|
+
minValue,
|
|
1276
|
+
maxValue,
|
|
1277
|
+
disabled
|
|
1278
|
+
},
|
|
1279
|
+
children: /* @__PURE__ */ jsx(Calendar, {
|
|
1280
|
+
className: cn("relative flex min-h-[350px] flex-col", width[width$1], classNames$2.calendar),
|
|
1351
1281
|
...props,
|
|
1352
|
-
children:
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1282
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1283
|
+
className: cn("flex gap-4", classNames$2.calendarContainer),
|
|
1284
|
+
children: [...Array(visibleMonths).keys()].map((i$1) => /* @__PURE__ */ jsxs("div", {
|
|
1285
|
+
className: cn("flex-1", classNames$2.calendarMonth),
|
|
1286
|
+
children: [/* @__PURE__ */ jsx(CalendarHeader, {
|
|
1287
|
+
monthOffset: i$1,
|
|
1288
|
+
showPrevious: i$1 === 0,
|
|
1289
|
+
showNext: i$1 === visibleMonths - 1
|
|
1290
|
+
}), /* @__PURE__ */ jsx(_CalendarGrid, { offset: { months: i$1 } })]
|
|
1291
|
+
}, i$1))
|
|
1292
|
+
})
|
|
1360
1293
|
})
|
|
1361
1294
|
});
|
|
1362
|
-
|
|
1363
|
-
|
|
1295
|
+
return /* @__PURE__ */ jsx(CalendarContext.Provider, {
|
|
1296
|
+
value: {
|
|
1297
|
+
classNames: classNames$2,
|
|
1298
|
+
visibleMonths,
|
|
1299
|
+
minValue,
|
|
1300
|
+
maxValue,
|
|
1301
|
+
disabled
|
|
1302
|
+
},
|
|
1303
|
+
children: /* @__PURE__ */ jsxs(Calendar, {
|
|
1304
|
+
className: cn("relative flex min-h-[350px] flex-col", width[width$1], classNames$2.calendar),
|
|
1305
|
+
...props,
|
|
1306
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1307
|
+
className: cn("pointer-events-none absolute top-1/2 left-0 w-full -translate-y-1/2 opacity-0", selectedDropdown && "pointer-events-auto opacity-100"),
|
|
1308
|
+
children: ViewMap[selectedDropdown]
|
|
1309
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1310
|
+
className: cn("flex flex-col", selectedDropdown && "pointer-events-none opacity-0"),
|
|
1311
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1312
|
+
className: "mb-4 flex items-center justify-between",
|
|
1313
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1314
|
+
className: "flex w-fit gap-4",
|
|
1315
|
+
children: [/* @__PURE__ */ jsx(CalendarListBox, {
|
|
1316
|
+
type: "month",
|
|
1317
|
+
isDisabled: hasOnlyOneSelectableMonth(minValue, maxValue) || props.isDisabled,
|
|
1318
|
+
setSelectedDropdown
|
|
1319
|
+
}, "month"), /* @__PURE__ */ jsx(CalendarListBox, {
|
|
1320
|
+
type: "year",
|
|
1321
|
+
isDisabled: hasOnlyOneSelectableYear(minValue, maxValue) || props.isDisabled,
|
|
1322
|
+
setSelectedDropdown
|
|
1323
|
+
}, "year")]
|
|
1324
|
+
}), /* @__PURE__ */ jsx(MonthControls_default, {})]
|
|
1325
|
+
}), /* @__PURE__ */ jsx(_CalendarGrid, {})]
|
|
1326
|
+
})]
|
|
1327
|
+
})
|
|
1328
|
+
});
|
|
1329
|
+
};
|
|
1364
1330
|
|
|
1365
1331
|
//#endregion
|
|
1366
|
-
//#region src/
|
|
1367
|
-
const
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
variant
|
|
1375
|
-
}),
|
|
1332
|
+
//#region src/Card/Card.tsx
|
|
1333
|
+
const Card = ({ children, variant, size: size$1, space = "0", stretch, p: p$1, px, py, pt, pb, pl, pr, ...props }) => {
|
|
1334
|
+
const classNames$2 = useClassNames({
|
|
1335
|
+
component: "Card",
|
|
1336
|
+
variant,
|
|
1337
|
+
size: size$1
|
|
1338
|
+
});
|
|
1339
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1376
1340
|
...props,
|
|
1377
|
-
|
|
1341
|
+
className: cn("flex flex-col gap-y-(--space)", stretch ? "" : "w-fit", classNames$2, paddingSpace !== void 0 && paddingSpace[p$1], paddingSpaceX !== void 0 && paddingSpaceX[px], paddingSpaceY !== void 0 && paddingSpaceY[py], paddingRight !== void 0 && paddingRight[pr], paddingLeft !== void 0 && paddingLeft[pl], paddingBottom !== void 0 && paddingBottom[pb], paddingTop !== void 0 && paddingTop[pt]),
|
|
1342
|
+
style: createSpacingVar("space", `${space}`),
|
|
1343
|
+
children
|
|
1378
1344
|
});
|
|
1379
|
-
}
|
|
1345
|
+
};
|
|
1380
1346
|
|
|
1381
1347
|
//#endregion
|
|
1382
1348
|
//#region src/Columns/Columns.tsx
|
|
1383
|
-
const Columns = ({ space = 0, columns, collapseAt = "0em", stretch, children
|
|
1349
|
+
const Columns = ({ space = 0, columns, collapseAt = "0em", stretch, children, ...props }) => {
|
|
1384
1350
|
if (Children.count(children) !== columns.length) throw new Error(`Columns: expected ${columns.length} children, got ${Children.count(children)}`);
|
|
1385
1351
|
return /* @__PURE__ */ jsx("div", {
|
|
1386
|
-
className: cn("flex flex-wrap items-stretch", stretch && "h-full"
|
|
1352
|
+
className: cn("flex flex-wrap items-stretch gap-(--space)", stretch && "h-full"),
|
|
1353
|
+
style: createSpacingVar("space", `${space}`),
|
|
1387
1354
|
...props,
|
|
1388
1355
|
children: Children.map(children, (child, idx) => /* @__PURE__ */ jsx("div", {
|
|
1389
|
-
className: cn(columns[idx] === "fit" ? "flex h-fit w-fit" : "flex-(--columnSize)", "basis-[calc((var(--collapseAt)
|
|
1356
|
+
className: cn(columns[idx] === "fit" ? "flex h-fit w-fit" : "flex-(--columnSize)", "basis-[calc((var(--collapseAt)-100%)*999)]"),
|
|
1390
1357
|
style: createVar({
|
|
1391
1358
|
collapseAt,
|
|
1392
1359
|
columnSize: columns[idx]
|
|
@@ -1396,9 +1363,51 @@ const Columns = ({ space = 0, columns, collapseAt = "0em", stretch, children,...
|
|
|
1396
1363
|
});
|
|
1397
1364
|
};
|
|
1398
1365
|
|
|
1366
|
+
//#endregion
|
|
1367
|
+
//#region src/ComboBox/MobileCombobox.tsx
|
|
1368
|
+
const MobileComboBoxTrigger = ({ placeholder }) => {
|
|
1369
|
+
const state = useContext(ComboBoxStateContext);
|
|
1370
|
+
const inputClassNames = useClassNames({ component: "Input" });
|
|
1371
|
+
const comboBoxClassNames = useClassNames({ component: "ComboBox" });
|
|
1372
|
+
const displayText = state?.selectedItem?.textValue || "";
|
|
1373
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1374
|
+
className: comboBoxClassNames.mobileTrigger,
|
|
1375
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1376
|
+
className: cn("w-full flex-1 text-left", "group-data-error/field:ui-state-error", "group-data-focus-visible/trigger:ui-state-focus", inputClassNames.input),
|
|
1377
|
+
children: displayText || /* @__PURE__ */ jsx("span", {
|
|
1378
|
+
className: "text-muted-foreground",
|
|
1379
|
+
children: placeholder
|
|
1380
|
+
})
|
|
1381
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
1382
|
+
className: cn("absolute right-2 cursor-pointer", inputClassNames.action, comboBoxClassNames),
|
|
1383
|
+
children: /* @__PURE__ */ jsx(ChevronsVertical, { size: "16" })
|
|
1384
|
+
})]
|
|
1385
|
+
});
|
|
1386
|
+
};
|
|
1387
|
+
const MobileComboBox = ({ placeholder, label, emptyState, children }) => {
|
|
1388
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
1389
|
+
return /* @__PURE__ */ jsxs(Tray.Trigger, { children: [/* @__PURE__ */ jsx(Button, {
|
|
1390
|
+
className: "group/trigger outline-none",
|
|
1391
|
+
children: /* @__PURE__ */ jsx(MobileComboBoxTrigger, { placeholder })
|
|
1392
|
+
}), /* @__PURE__ */ jsxs(Tray, { children: [
|
|
1393
|
+
/* @__PURE__ */ jsx(Tray.Title, { children: label }),
|
|
1394
|
+
/* @__PURE__ */ jsxs(Tray.Content, {
|
|
1395
|
+
className: "flex flex-col gap-2",
|
|
1396
|
+
children: [/* @__PURE__ */ jsx(_Input, { autoFocus: true }), /* @__PURE__ */ jsx(_ListBox, {
|
|
1397
|
+
renderEmptyState: () => emptyState ?? /* @__PURE__ */ jsx(Center, { children: stringFormatter.format("noResultsFound") }),
|
|
1398
|
+
children
|
|
1399
|
+
})]
|
|
1400
|
+
}),
|
|
1401
|
+
/* @__PURE__ */ jsx(Tray.Actions, { children: /* @__PURE__ */ jsx(_Button, {
|
|
1402
|
+
slot: "close",
|
|
1403
|
+
children: stringFormatter.format("close")
|
|
1404
|
+
}) })
|
|
1405
|
+
] })] });
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1399
1408
|
//#endregion
|
|
1400
1409
|
//#region src/ComboBox/ComboBox.tsx
|
|
1401
|
-
const _ComboBox = forwardRef(({ variant, size: size$1, required, disabled, readOnly, error, defaultValue, value, emptyState, onChange, children, loading
|
|
1410
|
+
const _ComboBox = forwardRef(({ variant, size: size$1, required, disabled, readOnly, error, defaultValue, value, emptyState, onChange, children, loading, ...rest }, ref) => {
|
|
1402
1411
|
const props = {
|
|
1403
1412
|
isDisabled: disabled,
|
|
1404
1413
|
isReadOnly: readOnly,
|
|
@@ -1415,17 +1424,23 @@ const _ComboBox = forwardRef(({ variant, size: size$1, required, disabled, readO
|
|
|
1415
1424
|
size: size$1
|
|
1416
1425
|
});
|
|
1417
1426
|
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
1418
|
-
|
|
1427
|
+
const isSmallScreen = useSmallScreen();
|
|
1428
|
+
return /* @__PURE__ */ jsx(FieldBase, {
|
|
1419
1429
|
as: ComboBox,
|
|
1420
1430
|
ref,
|
|
1421
1431
|
...props,
|
|
1422
|
-
children:
|
|
1423
|
-
|
|
1432
|
+
children: isSmallScreen ? /* @__PURE__ */ jsx(MobileComboBox, {
|
|
1433
|
+
placeholder: rest.placeholder,
|
|
1434
|
+
label: rest.label,
|
|
1435
|
+
emptyState,
|
|
1436
|
+
children
|
|
1437
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(_Input, { action: /* @__PURE__ */ jsx(IconButton, {
|
|
1438
|
+
className: classNames$2.icon,
|
|
1424
1439
|
children: loading ? /* @__PURE__ */ jsx(ProgressCircle, {}) : /* @__PURE__ */ jsx(ChevronsVertical, { size: "16" })
|
|
1425
1440
|
}) }), /* @__PURE__ */ jsx(_Popover, { children: /* @__PURE__ */ jsx(_ListBox, {
|
|
1426
1441
|
renderEmptyState: () => emptyState ?? /* @__PURE__ */ jsx(Center, { children: stringFormatter.format("noResultsFound") }),
|
|
1427
1442
|
children
|
|
1428
|
-
}) })]
|
|
1443
|
+
}) })] })
|
|
1429
1444
|
});
|
|
1430
1445
|
});
|
|
1431
1446
|
_ComboBox.Option = _ListBox.Item;
|
|
@@ -1453,19 +1468,22 @@ const gridColumn = {
|
|
|
1453
1468
|
center: "*:col-[2]",
|
|
1454
1469
|
right: "*:col-[3]"
|
|
1455
1470
|
};
|
|
1456
|
-
const Container = ({ contentLength = "default", align = "left", alignItems = "none", space = 0, children
|
|
1471
|
+
const Container = ({ contentLength = "default", align = "left", alignItems = "none", space = 0, children, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
1457
1472
|
...props,
|
|
1458
|
-
className: cn("grid", placeItems[alignItems], gridColsAlign[align], gridColumn[align]
|
|
1459
|
-
style:
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1473
|
+
className: cn("grid gap-(--space)", placeItems[alignItems], gridColsAlign[align], gridColumn[align]),
|
|
1474
|
+
style: {
|
|
1475
|
+
...createVar({
|
|
1476
|
+
maxTextWidth: containerTextLength[contentLength],
|
|
1477
|
+
maxHeadlineWidth: containerHeadlineLength[contentLength]
|
|
1478
|
+
}),
|
|
1479
|
+
...createSpacingVar("space", `${space}`)
|
|
1480
|
+
},
|
|
1463
1481
|
children
|
|
1464
1482
|
});
|
|
1465
1483
|
|
|
1466
1484
|
//#endregion
|
|
1467
1485
|
//#region src/icons/CircleQuestionMark.tsx
|
|
1468
|
-
const CircleQuestionMark = ({ size: size$1 = 24, className
|
|
1486
|
+
const CircleQuestionMark = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
1469
1487
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1470
1488
|
width: size$1,
|
|
1471
1489
|
height: size$1,
|
|
@@ -1490,7 +1508,7 @@ const CircleQuestionMark = ({ size: size$1 = 24, className,...props }) => /* @__
|
|
|
1490
1508
|
|
|
1491
1509
|
//#endregion
|
|
1492
1510
|
//#region src/icons/Info.tsx
|
|
1493
|
-
const Info = ({ size: size$1 = 24, className
|
|
1511
|
+
const Info = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
1494
1512
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1495
1513
|
width: size$1,
|
|
1496
1514
|
height: size$1,
|
|
@@ -1517,11 +1535,11 @@ const Info = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */ jsxs
|
|
|
1517
1535
|
//#region src/ContextualHelp/ContextualHelpContent.tsx
|
|
1518
1536
|
const ContextualHelpContent = ({ children, variant, size: size$1 }) => {
|
|
1519
1537
|
return /* @__PURE__ */ jsx("div", {
|
|
1520
|
-
className: useClassNames({
|
|
1538
|
+
className: cn("min-h-0 overflow-y-auto [grid-area:content]", useClassNames({
|
|
1521
1539
|
component: "ContextualHelp",
|
|
1522
1540
|
variant,
|
|
1523
1541
|
size: size$1
|
|
1524
|
-
}).content,
|
|
1542
|
+
}).content),
|
|
1525
1543
|
children
|
|
1526
1544
|
});
|
|
1527
1545
|
};
|
|
@@ -1530,11 +1548,11 @@ const ContextualHelpContent = ({ children, variant, size: size$1 }) => {
|
|
|
1530
1548
|
//#region src/ContextualHelp/ContextualHelpTitle.tsx
|
|
1531
1549
|
const ContextualHelpTitle = ({ children, variant, size: size$1 }) => {
|
|
1532
1550
|
return /* @__PURE__ */ jsx(Heading, {
|
|
1533
|
-
className: useClassNames({
|
|
1551
|
+
className: cn("[grid-area:title]", useClassNames({
|
|
1534
1552
|
component: "ContextualHelp",
|
|
1535
1553
|
variant,
|
|
1536
1554
|
size: size$1
|
|
1537
|
-
}).title,
|
|
1555
|
+
}).title),
|
|
1538
1556
|
children
|
|
1539
1557
|
});
|
|
1540
1558
|
};
|
|
@@ -1545,12 +1563,12 @@ const icons$2 = {
|
|
|
1545
1563
|
help: CircleQuestionMark,
|
|
1546
1564
|
info: Info
|
|
1547
1565
|
};
|
|
1548
|
-
const DialogTrigger$1 = ({ open
|
|
1566
|
+
const DialogTrigger$1 = ({ open, ...rest }) => /* @__PURE__ */ jsx(DialogTrigger, {
|
|
1549
1567
|
isOpen: open,
|
|
1550
1568
|
...rest
|
|
1551
1569
|
});
|
|
1552
1570
|
const _ContextualHelp = forwardRef(({ children, variant = "help", size: size$1, width: width$1, placement = "bottom start", offset: offset$1 = 0, defaultOpen, open, onOpenChange, ariaLabel }, ref) => {
|
|
1553
|
-
const Icon$
|
|
1571
|
+
const Icon$1 = icons$2[variant];
|
|
1554
1572
|
const classNames$2 = useClassNames({
|
|
1555
1573
|
component: "ContextualHelp",
|
|
1556
1574
|
variant,
|
|
@@ -1565,14 +1583,13 @@ const _ContextualHelp = forwardRef(({ children, variant = "help", size: size$1,
|
|
|
1565
1583
|
ref,
|
|
1566
1584
|
className: classNames$2.trigger,
|
|
1567
1585
|
"aria-label": ariaLabel ?? (variant === "info" ? stringFormatter.format("moreInfo") : stringFormatter.format("help")),
|
|
1568
|
-
children: /* @__PURE__ */ jsx(Icon$
|
|
1569
|
-
}), /* @__PURE__ */ jsx(
|
|
1586
|
+
children: /* @__PURE__ */ jsx(Icon$1, { size: 20 })
|
|
1587
|
+
}), /* @__PURE__ */ jsx(_Popover, {
|
|
1570
1588
|
placement,
|
|
1571
1589
|
offset: offset$1,
|
|
1572
|
-
className: classNames$2.popover,
|
|
1573
|
-
[`data-${width$1 ?? "medium"}`]: true,
|
|
1574
1590
|
children: /* @__PURE__ */ jsx(Dialog, {
|
|
1575
|
-
className: classNames$2.container,
|
|
1591
|
+
className: cn("grid [grid-template-areas:'title'_'content']", classNames$2.container),
|
|
1592
|
+
[`data-${width$1 ?? "medium"}`]: true,
|
|
1576
1593
|
children
|
|
1577
1594
|
})
|
|
1578
1595
|
})]
|
|
@@ -1583,7 +1600,7 @@ _ContextualHelp.Content = ContextualHelpContent;
|
|
|
1583
1600
|
|
|
1584
1601
|
//#endregion
|
|
1585
1602
|
//#region src/DateField/DateSegment.tsx
|
|
1586
|
-
const _DateSegment = ({ segment
|
|
1603
|
+
const _DateSegment = ({ segment, ...props }) => {
|
|
1587
1604
|
return /* @__PURE__ */ jsx(DateSegment, {
|
|
1588
1605
|
...props,
|
|
1589
1606
|
segment,
|
|
@@ -1662,7 +1679,7 @@ const isValidDate = (year, month, day) => {
|
|
|
1662
1679
|
if (month === 2 && isLeapYear) return day <= 29;
|
|
1663
1680
|
return day <= daysInMonth[month - 1];
|
|
1664
1681
|
};
|
|
1665
|
-
const _DateInput = ({ variant, size: size$1, action, onPaste
|
|
1682
|
+
const _DateInput = ({ variant, size: size$1, action, onPaste, ...props }) => {
|
|
1666
1683
|
const classNames$2 = useClassNames({
|
|
1667
1684
|
component: "DateField",
|
|
1668
1685
|
variant,
|
|
@@ -1680,10 +1697,10 @@ const _DateInput = ({ variant, size: size$1, action, onPaste,...props }) => {
|
|
|
1680
1697
|
}
|
|
1681
1698
|
};
|
|
1682
1699
|
return /* @__PURE__ */ jsxs(Group, {
|
|
1683
|
-
className: classNames$2.field,
|
|
1700
|
+
className: cn(classNames$2.field, "w-(--field-width) max-w-full min-w-0 overflow-hidden"),
|
|
1684
1701
|
onPaste: handlePaste,
|
|
1685
1702
|
children: [/* @__PURE__ */ jsx(DateInput, {
|
|
1686
|
-
className: "flex flex-1 items-center",
|
|
1703
|
+
className: cn("flex flex-1 items-center", classNames$2.input),
|
|
1687
1704
|
...props,
|
|
1688
1705
|
children: (segment) => /* @__PURE__ */ jsx(_DateSegment, {
|
|
1689
1706
|
className: classNames$2.segment,
|
|
@@ -1695,7 +1712,7 @@ const _DateInput = ({ variant, size: size$1, action, onPaste,...props }) => {
|
|
|
1695
1712
|
|
|
1696
1713
|
//#endregion
|
|
1697
1714
|
//#region src/DateField/DateField.tsx
|
|
1698
|
-
const _DateField = forwardRef(({ variant, size: size$1, action, disabled, required, error, readOnly, onChange
|
|
1715
|
+
const _DateField = forwardRef(({ variant, size: size$1, action, disabled, required, error, readOnly, onChange, ...rest }, ref) => {
|
|
1699
1716
|
return /* @__PURE__ */ jsx(FieldBase, {
|
|
1700
1717
|
as: DateField,
|
|
1701
1718
|
variant,
|
|
@@ -1705,17 +1722,14 @@ const _DateField = forwardRef(({ variant, size: size$1, action, disabled, requir
|
|
|
1705
1722
|
isReadOnly: readOnly,
|
|
1706
1723
|
isInvalid: error,
|
|
1707
1724
|
isRequired: required,
|
|
1725
|
+
onChange,
|
|
1708
1726
|
...rest,
|
|
1709
|
-
children: /* @__PURE__ */ jsx(DateInputWithPasteWrapper, {
|
|
1710
|
-
onChange,
|
|
1711
|
-
action
|
|
1712
|
-
})
|
|
1727
|
+
children: /* @__PURE__ */ jsx(DateInputWithPasteWrapper, { action })
|
|
1713
1728
|
});
|
|
1714
1729
|
});
|
|
1715
|
-
const DateInputWithPasteWrapper = ({
|
|
1730
|
+
const DateInputWithPasteWrapper = ({ ...props }) => {
|
|
1716
1731
|
const ctx = useContext(DateFieldStateContext);
|
|
1717
1732
|
const onPaste = (date) => {
|
|
1718
|
-
if (onChange) onChange(date);
|
|
1719
1733
|
ctx?.setValue(date);
|
|
1720
1734
|
};
|
|
1721
1735
|
return /* @__PURE__ */ jsx(_DateInput, {
|
|
@@ -1726,7 +1740,7 @@ const DateInputWithPasteWrapper = ({ onChange,...props }) => {
|
|
|
1726
1740
|
|
|
1727
1741
|
//#endregion
|
|
1728
1742
|
//#region src/icons/Calendar.tsx
|
|
1729
|
-
const Calendar$1 = ({ size: size$1 = 24, className
|
|
1743
|
+
const Calendar$1 = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
1730
1744
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1731
1745
|
width: size$1,
|
|
1732
1746
|
height: size$1,
|
|
@@ -1754,7 +1768,7 @@ const Calendar$1 = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ *
|
|
|
1754
1768
|
|
|
1755
1769
|
//#endregion
|
|
1756
1770
|
//#region src/DatePicker/DatePicker.tsx
|
|
1757
|
-
const _DatePicker = forwardRef(({ dateUnavailable, disabled, required, readOnly, error, variant, size: size$1, open, granularity = "day", onChange
|
|
1771
|
+
const _DatePicker = forwardRef(({ dateUnavailable, disabled, required, readOnly, error, variant, size: size$1, open, granularity = "day", onChange, ...rest }, ref) => {
|
|
1758
1772
|
const props = {
|
|
1759
1773
|
isDateUnavailable: dateUnavailable,
|
|
1760
1774
|
isDisabled: disabled,
|
|
@@ -1771,6 +1785,8 @@ const _DatePicker = forwardRef(({ dateUnavailable, disabled, required, readOnly,
|
|
|
1771
1785
|
size: size$1,
|
|
1772
1786
|
variant
|
|
1773
1787
|
});
|
|
1788
|
+
const isSmallScreen = useSmallScreen();
|
|
1789
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
1774
1790
|
return /* @__PURE__ */ jsxs(FieldBase, {
|
|
1775
1791
|
as: DatePicker,
|
|
1776
1792
|
variant,
|
|
@@ -1786,10 +1802,17 @@ const _DatePicker = forwardRef(({ dateUnavailable, disabled, required, readOnly,
|
|
|
1786
1802
|
"data-testid": "action"
|
|
1787
1803
|
})
|
|
1788
1804
|
})
|
|
1789
|
-
}),
|
|
1805
|
+
}), isSmallScreen ? /* @__PURE__ */ jsxs(Tray, { children: [
|
|
1806
|
+
/* @__PURE__ */ jsx(Tray.Title, { children: rest.label }),
|
|
1807
|
+
/* @__PURE__ */ jsx(Tray.Content, { children: /* @__PURE__ */ jsx(_Calendar, { disabled }) }),
|
|
1808
|
+
/* @__PURE__ */ jsx(Tray.Actions, { children: /* @__PURE__ */ jsx(_Button, {
|
|
1809
|
+
slot: "close",
|
|
1810
|
+
children: stringFormatter.format("close")
|
|
1811
|
+
}) })
|
|
1812
|
+
] }) : /* @__PURE__ */ jsx(_Popover, { children: /* @__PURE__ */ jsx(Dialog, { children: /* @__PURE__ */ jsx(_Calendar, { disabled }) }) })]
|
|
1790
1813
|
});
|
|
1791
1814
|
});
|
|
1792
|
-
const DatePickerWithPasteWrapper = ({ onChange
|
|
1815
|
+
const DatePickerWithPasteWrapper = ({ onChange, ...props }) => {
|
|
1793
1816
|
const ctx = useContext(DatePickerStateContext);
|
|
1794
1817
|
const onPaste = (date) => {
|
|
1795
1818
|
if (onChange) onChange(date);
|
|
@@ -1801,9 +1824,31 @@ const DatePickerWithPasteWrapper = ({ onChange,...props }) => {
|
|
|
1801
1824
|
});
|
|
1802
1825
|
};
|
|
1803
1826
|
|
|
1827
|
+
//#endregion
|
|
1828
|
+
//#region src/Overlay/Underlay.tsx
|
|
1829
|
+
const Underlay = ({ size: size$1, variant, open, dismissable, keyboardDismissable, ...rest }) => {
|
|
1830
|
+
const classNames$2 = useClassNames({
|
|
1831
|
+
component: "Underlay",
|
|
1832
|
+
size: size$1,
|
|
1833
|
+
variant
|
|
1834
|
+
});
|
|
1835
|
+
const props = {
|
|
1836
|
+
isOpen: open,
|
|
1837
|
+
isDismissable: dismissable,
|
|
1838
|
+
isKeyboardDismissDisabled: keyboardDismissable,
|
|
1839
|
+
...rest
|
|
1840
|
+
};
|
|
1841
|
+
return /* @__PURE__ */ jsx(ModalOverlay, {
|
|
1842
|
+
className: ({ isEntering, isExiting }) => cn("fixed inset-0 z-50 grid place-items-center overflow-y-auto", isEntering ? "animate-in fade-in duration-300 ease-out" : "", isExiting ? "animate-out fade-out duration-200 ease-in" : "", classNames$2),
|
|
1843
|
+
...props,
|
|
1844
|
+
"data-testid": "underlay-id",
|
|
1845
|
+
children: props.children
|
|
1846
|
+
});
|
|
1847
|
+
};
|
|
1848
|
+
|
|
1804
1849
|
//#endregion
|
|
1805
1850
|
//#region src/Overlay/Modal.tsx
|
|
1806
|
-
const _Modal = forwardRef(({ size: size$1, open, dismissable, keyboardDismissable, onOpenChange, children
|
|
1851
|
+
const _Modal = forwardRef(({ size: size$1, open, dismissable, keyboardDismissable, onOpenChange, children, ...props }, ref) => {
|
|
1807
1852
|
const className = useClassNames({
|
|
1808
1853
|
component: "Modal",
|
|
1809
1854
|
size: size$1
|
|
@@ -1843,7 +1888,7 @@ const DialogActions = ({ variant, size: size$1, children }) => {
|
|
|
1843
1888
|
//#region src/Dialog/DialogContent.tsx
|
|
1844
1889
|
const DialogContent = ({ variant, size: size$1, children }) => {
|
|
1845
1890
|
return /* @__PURE__ */ jsx("div", {
|
|
1846
|
-
className: cn("min-h-0 overflow-auto [grid-area:content]", useClassNames({
|
|
1891
|
+
className: cn("min-h-0 overflow-y-auto [grid-area:content]", useClassNames({
|
|
1847
1892
|
component: "Dialog",
|
|
1848
1893
|
variant,
|
|
1849
1894
|
size: size$1
|
|
@@ -1873,7 +1918,7 @@ const DialogTitle = ({ variant, size: size$1, children }) => {
|
|
|
1873
1918
|
|
|
1874
1919
|
//#endregion
|
|
1875
1920
|
//#region src/Dialog/DialogTrigger.tsx
|
|
1876
|
-
const _DialogTrigger = ({ open, dismissable, keyboardDismissable
|
|
1921
|
+
const _DialogTrigger = ({ open, dismissable, keyboardDismissable, ...rest }) => {
|
|
1877
1922
|
const ctx = {
|
|
1878
1923
|
isDismissable: dismissable,
|
|
1879
1924
|
isKeyboardDismissDisabled: !keyboardDismissable
|
|
@@ -1900,7 +1945,7 @@ const _DialogTrigger = ({ open, dismissable, keyboardDismissable,...rest }) => {
|
|
|
1900
1945
|
* Needed so that the close button and function can be used inside the dialog,
|
|
1901
1946
|
* when the dialog is controlled and no <Dialog.Trigger> is used.
|
|
1902
1947
|
*/
|
|
1903
|
-
const InnerDialog = forwardRef(({ variant, size: size$1, closeButton
|
|
1948
|
+
const InnerDialog = forwardRef(({ variant, size: size$1, closeButton, ...props }, ref) => {
|
|
1904
1949
|
const state = useContext(OverlayTriggerStateContext);
|
|
1905
1950
|
const classNames$2 = useClassNames({
|
|
1906
1951
|
component: "Dialog",
|
|
@@ -1918,7 +1963,7 @@ const InnerDialog = forwardRef(({ variant, size: size$1, closeButton,...props },
|
|
|
1918
1963
|
}), children]
|
|
1919
1964
|
});
|
|
1920
1965
|
});
|
|
1921
|
-
const _Dialog = forwardRef(({ open, onOpenChange, children
|
|
1966
|
+
const _Dialog = forwardRef(({ open, onOpenChange, children, ...props }, ref) => {
|
|
1922
1967
|
const ctx = useContext(DialogContext);
|
|
1923
1968
|
return /* @__PURE__ */ jsx(_Modal, {
|
|
1924
1969
|
size: props.size,
|
|
@@ -1940,7 +1985,7 @@ _Dialog.Actions = DialogActions;
|
|
|
1940
1985
|
|
|
1941
1986
|
//#endregion
|
|
1942
1987
|
//#region src/Dialog/ConfirmationDialog.tsx
|
|
1943
|
-
const ConfirmationDialog = ({ title, confirmationLabel, cancelLabel, onCancel, onConfirm, autoFocusButton, children, variant, size: size$1 = "xsmall"
|
|
1988
|
+
const ConfirmationDialog = ({ title, confirmationLabel, cancelLabel, onCancel, onConfirm, autoFocusButton, children, variant, size: size$1 = "xsmall", ...props }) => {
|
|
1944
1989
|
const stringFormatter = useLocalizedStringFormatter(intlMessages, "marigold");
|
|
1945
1990
|
return /* @__PURE__ */ jsx(_Dialog, {
|
|
1946
1991
|
role: "alertdialog",
|
|
@@ -2012,7 +2057,7 @@ const useConfirmation = () => {
|
|
|
2012
2057
|
|
|
2013
2058
|
//#endregion
|
|
2014
2059
|
//#region src/Divider/Divider.tsx
|
|
2015
|
-
const _Divider = ({ variant
|
|
2060
|
+
const _Divider = ({ variant, ...props }) => {
|
|
2016
2061
|
return /* @__PURE__ */ jsx(Separator, {
|
|
2017
2062
|
className: cn("border-none", useClassNames({
|
|
2018
2063
|
component: "Divider",
|
|
@@ -2119,7 +2164,7 @@ const useNonModal = ({ nonModalRef, keyboardDismissable = true }, state) => {
|
|
|
2119
2164
|
|
|
2120
2165
|
//#endregion
|
|
2121
2166
|
//#region src/Overlay/NonModal.tsx
|
|
2122
|
-
const NonModalInner = ({ state, isExiting
|
|
2167
|
+
const NonModalInner = ({ state, isExiting, ...props }) => {
|
|
2123
2168
|
const { nonModalProps } = useNonModal(props, state);
|
|
2124
2169
|
const ref = props.nonModalRef;
|
|
2125
2170
|
const isEntering = useEnterAnimation(ref) || props.isEntering || false;
|
|
@@ -2162,7 +2207,7 @@ const NonModalInner = ({ state, isExiting,...props }) => {
|
|
|
2162
2207
|
})
|
|
2163
2208
|
});
|
|
2164
2209
|
};
|
|
2165
|
-
const NonModal = forwardRef(({ open
|
|
2210
|
+
const NonModal = forwardRef(({ open, ...rest }, ref) => {
|
|
2166
2211
|
const props = {
|
|
2167
2212
|
isOpen: open,
|
|
2168
2213
|
...rest
|
|
@@ -2184,15 +2229,15 @@ const NonModal = forwardRef(({ open,...rest }, ref) => {
|
|
|
2184
2229
|
|
|
2185
2230
|
//#endregion
|
|
2186
2231
|
//#region src/Drawer/DrawerModal.tsx
|
|
2187
|
-
const MobileModal = ({ children
|
|
2232
|
+
const MobileModal = ({ children, ...props }) => /* @__PURE__ */ jsx(ModalOverlay, {
|
|
2188
2233
|
...props,
|
|
2189
|
-
className: "fixed inset-0 z-
|
|
2234
|
+
className: "fixed inset-0 z-50 h-(--visual-viewport-height)",
|
|
2190
2235
|
children: /* @__PURE__ */ jsx(Modal, {
|
|
2191
2236
|
className: "flex *:flex-1",
|
|
2192
2237
|
children
|
|
2193
2238
|
})
|
|
2194
2239
|
});
|
|
2195
|
-
const DrawerModal = ({ children, className
|
|
2240
|
+
const DrawerModal = ({ children, className, ...props }) => {
|
|
2196
2241
|
return useSmallScreen() ? /* @__PURE__ */ jsx(MobileModal, { children }) : /* @__PURE__ */ jsx(NonModal, {
|
|
2197
2242
|
...props,
|
|
2198
2243
|
className: cn("fixed", className),
|
|
@@ -2223,7 +2268,7 @@ const DrawerTitle = ({ variant, size: size$1, children }) => {
|
|
|
2223
2268
|
|
|
2224
2269
|
//#endregion
|
|
2225
2270
|
//#region src/Drawer/DrawerTrigger.tsx
|
|
2226
|
-
const DrawerTrigger = ({ open, children
|
|
2271
|
+
const DrawerTrigger = ({ open, children, ...props }) => /* @__PURE__ */ jsx(DialogTrigger, {
|
|
2227
2272
|
isOpen: open,
|
|
2228
2273
|
...props,
|
|
2229
2274
|
children
|
|
@@ -2231,7 +2276,7 @@ const DrawerTrigger = ({ open, children,...props }) => /* @__PURE__ */ jsx(Dialo
|
|
|
2231
2276
|
|
|
2232
2277
|
//#endregion
|
|
2233
2278
|
//#region src/Drawer/Drawer.tsx
|
|
2234
|
-
const Drawer = ({ children, size: size$1 = "medium", variant, open, keyboardDismissable, closeButton, role = "complementary", placement = "right"
|
|
2279
|
+
const Drawer = ({ children, size: size$1 = "medium", variant, open, keyboardDismissable, closeButton, role = "complementary", placement = "right", ...props }) => {
|
|
2235
2280
|
const ref = useRef(null);
|
|
2236
2281
|
const classNames$2 = useClassNames({
|
|
2237
2282
|
component: "Drawer",
|
|
@@ -2268,7 +2313,7 @@ const Drawer = ({ children, size: size$1 = "medium", variant, open, keyboardDism
|
|
|
2268
2313
|
children: [closeButton && /* @__PURE__ */ jsx(CloseButton, {
|
|
2269
2314
|
"aria-label": "dismiss drawer",
|
|
2270
2315
|
style: { "--i": 0 },
|
|
2271
|
-
className: classNames$2.closeButton,
|
|
2316
|
+
className: cn("z-80", classNames$2.closeButton),
|
|
2272
2317
|
onPress: ctx?.close
|
|
2273
2318
|
}), children]
|
|
2274
2319
|
})
|
|
@@ -2280,21 +2325,113 @@ Drawer.Title = DrawerTitle;
|
|
|
2280
2325
|
Drawer.Content = DrawerContent;
|
|
2281
2326
|
Drawer.Actions = DrawerActions;
|
|
2282
2327
|
|
|
2328
|
+
//#endregion
|
|
2329
|
+
//#region src/EmptyState/EmptyState.tsx
|
|
2330
|
+
const EmptyState = ({ title, description, action, variant, size: size$1, ...props }) => {
|
|
2331
|
+
const classNames$2 = useClassNames({
|
|
2332
|
+
component: "EmptyState",
|
|
2333
|
+
variant,
|
|
2334
|
+
size: size$1
|
|
2335
|
+
});
|
|
2336
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2337
|
+
className: classNames$2.container,
|
|
2338
|
+
...props,
|
|
2339
|
+
children: [
|
|
2340
|
+
/* @__PURE__ */ jsxs("svg", {
|
|
2341
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2342
|
+
width: "151",
|
|
2343
|
+
height: "84",
|
|
2344
|
+
viewBox: "0 0 151 84",
|
|
2345
|
+
fill: "none",
|
|
2346
|
+
className: "mb-6",
|
|
2347
|
+
"data-testid": "empty-state-illustration",
|
|
2348
|
+
"aria-hidden": "true",
|
|
2349
|
+
children: [
|
|
2350
|
+
/* @__PURE__ */ jsx("ellipse", {
|
|
2351
|
+
cx: "75.5",
|
|
2352
|
+
cy: "70.8003",
|
|
2353
|
+
rx: "75.5",
|
|
2354
|
+
ry: "13.1577",
|
|
2355
|
+
fill: "#EDECEC"
|
|
2356
|
+
}),
|
|
2357
|
+
/* @__PURE__ */ jsx("path", {
|
|
2358
|
+
d: "M42.6059 8.14447C44.1096 9.39758 47.6183 9.91971 49.1847 10.0241V71.1133H30.0747C24.561 69.636 23.1826 65.4853 23.1826 63.5947V44.4847C25.6888 44.6936 30.7013 43.4822 30.7013 36.966C30.7013 30.4499 25.6888 27.9854 23.1826 27.5677V10.0241C23.1826 9.0843 23.8092 5.95152 25.3756 4.38513C26.6287 3.13202 29.4482 2.19218 30.7013 1.87891H39.4731C39.8908 3.4453 41.1021 6.89135 42.6059 8.14447Z",
|
|
2359
|
+
fill: "white"
|
|
2360
|
+
}),
|
|
2361
|
+
/* @__PURE__ */ jsx("path", {
|
|
2362
|
+
d: "M49.8666 10.2474C53.7335 9.54586 56.338 4.88273 57.4051 1.95542C57.5564 1.54028 57.9458 1.25503 58.3876 1.25951L119.214 1.87704C119.31 1.87801 119.405 1.89262 119.497 1.92186C120.92 2.37547 123.927 3.55656 125.624 5.01129C127.379 6.51502 127.817 9.18833 127.817 10.337V62.3412C127.817 62.8503 127.379 64.6283 125.624 67.6669C123.87 70.7055 121.134 71.2304 119.985 71.113H49.8713C49.3191 71.113 48.8713 70.6652 48.8713 70.1129V11.337C48.8713 10.7847 49.3232 10.346 49.8666 10.2474Z",
|
|
2363
|
+
fill: "#F7F7F7"
|
|
2364
|
+
}),
|
|
2365
|
+
/* @__PURE__ */ jsx("path", {
|
|
2366
|
+
d: "M118.808 0.00662447C119.277 0.0239338 119.926 0.0808981 120.675 0.239747C122.169 0.556561 124.122 1.29138 125.805 2.97481C127.438 4.60764 128.326 6.49112 128.807 7.93403C129.049 8.66006 129.193 9.28997 129.277 9.74517C129.32 9.97315 129.347 10.1589 129.364 10.2928C129.373 10.3598 129.379 10.4142 129.383 10.4543C129.385 10.4744 129.388 10.491 129.389 10.5039C129.389 10.5103 129.39 10.5158 129.39 10.5204C129.39 10.5226 129.39 10.5247 129.391 10.5265C129.391 10.5275 129.39 10.5288 129.391 10.5296L129.391 10.5308C129.391 10.5314 129.363 10.534 127.83 10.6617L129.391 10.5314L129.397 10.5963V62.0393H127.83L129.397 62.0406V62.0424C129.397 62.0433 129.396 62.0445 129.396 62.0455V62.0693C129.396 62.0822 129.395 62.0981 129.395 62.1164C129.394 62.1531 129.392 62.2007 129.389 62.2584C129.382 62.3739 129.369 62.5305 129.345 62.7228C129.297 63.1075 129.204 63.6376 129.023 64.2708C128.66 65.5397 127.947 67.2208 126.547 68.97C125.047 70.845 123.178 71.7713 121.718 72.2276C120.987 72.4561 120.345 72.5713 119.879 72.6296C119.645 72.6588 119.453 72.6743 119.314 72.6822C119.244 72.6862 119.186 72.6884 119.144 72.6896C119.122 72.6902 119.104 72.6906 119.09 72.6908H119.06C119.059 72.6908 119.059 72.6907 119.059 71.1244V72.6908H30.7135V71.1244C30.7135 72.6907 30.713 72.6908 30.7123 72.6908H30.6835C30.6706 72.6906 30.6548 72.6901 30.6364 72.6896C30.5996 72.6885 30.552 72.6863 30.4944 72.6828C30.3793 72.676 30.2235 72.6633 30.0337 72.6388C29.6548 72.5899 29.1357 72.4946 28.5303 72.3084C27.317 71.9351 25.7472 71.1925 24.2803 69.7257C22.7636 68.2089 22.1015 66.5005 21.82 65.1868C21.6793 64.5305 21.6319 63.9643 21.6199 63.5537C21.6138 63.3478 21.6167 63.1789 21.6217 63.0551C21.6237 63.0048 21.6261 62.9618 21.6284 62.9266V45.1486C21.6286 43.8942 22.6347 43.0011 23.7161 42.9116L24.0331 42.878C24.8301 42.7745 26.0052 42.4838 27.0092 41.7111C28.075 40.8909 29.1471 39.3773 29.1471 36.3505C29.1471 33.3076 28.0617 31.7216 26.9591 30.8351C25.7833 29.8899 24.3901 29.5858 23.6286 29.4939C22.5764 29.3669 21.6285 28.4802 21.6284 27.2655V9.95932L21.6358 9.88345L23.1948 10.0352C21.7189 9.8917 21.6405 9.88363 21.6364 9.88284V9.87978C21.6365 9.87838 21.6368 9.87666 21.637 9.87488C21.6374 9.87126 21.6377 9.86657 21.6382 9.86142C21.6393 9.85103 21.6406 9.83741 21.6425 9.82104C21.6463 9.78802 21.6517 9.7429 21.659 9.68704C21.6738 9.57522 21.6968 9.41902 21.73 9.22691C21.7963 8.84347 21.9054 8.31069 22.0794 7.6954C22.4226 6.48194 23.042 4.86123 24.1518 3.43433C25.3427 1.90326 26.9783 1.06453 28.2158 0.609929C28.8469 0.378108 29.4093 0.233047 29.8177 0.145519C30.0228 0.101583 30.1914 0.0715045 30.3133 0.0519029C30.3744 0.0420967 30.424 0.034942 30.4608 0.0298756C30.4792 0.0273413 30.4948 0.0252681 30.5067 0.0237569C30.5125 0.0230192 30.5178 0.0224319 30.522 0.0219212C30.524 0.0216751 30.5259 0.021504 30.5275 0.0213094C30.5283 0.0212086 30.5292 0.0213966 30.5299 0.0213094L30.5312 0.0206975C30.5317 0.0210523 30.5345 0.0436789 30.678 1.27136L30.5318 0.0206975L30.6223 0.0102957H39.172C40.3083 0.0102957 41.1716 0.844137 41.3668 1.83673L41.3968 2.03742L41.4414 2.39353C41.5737 3.30078 41.9215 4.71028 42.8053 5.92954C43.7515 7.23492 45.4105 8.46873 48.5703 8.4688C51.4189 8.4688 52.9238 7.27959 53.8025 5.9742C54.7445 4.57463 55.0359 2.91873 55.1192 2.04905L55.1314 1.94748C55.2805 0.902099 56.1685 0.0104433 57.3421 0.0102957H118.063C118.066 0.0101221 118.069 0.00986006 118.072 0.00968382C118.115 0.00726142 118.171 0.00493038 118.241 0.00295324C118.38 -0.000999543 118.572 -0.00205497 118.808 0.00662447ZM118.245 3.13818C118.244 3.13828 118.242 3.13812 118.241 3.13818L118.245 3.13757H118.245L118.245 3.13818ZM32.2799 36.3505C32.2799 40.2506 30.8314 42.7228 28.9195 44.1941C27.4746 45.306 25.8841 45.7531 24.7612 45.9355V63.0575L24.7539 63.1352C24.7532 63.1453 24.7523 63.1613 24.7514 63.1823C24.7491 63.2396 24.7471 63.3352 24.7508 63.4619C24.7583 63.717 24.7893 64.0909 24.8836 64.5309C25.072 65.41 25.5065 66.5214 26.4959 67.5107C27.5351 68.5498 28.6283 69.0606 29.4512 69.3139C29.8638 69.4408 30.2065 69.5023 30.4345 69.5317C30.5481 69.5464 30.6323 69.5527 30.6811 69.5556C30.7051 69.557 30.7204 69.5578 30.7263 69.558H119.059C119.072 69.5577 119.098 69.5565 119.136 69.5543C119.211 69.55 119.333 69.541 119.49 69.5213C119.807 69.4817 120.262 69.4005 120.784 69.2374C121.83 68.9105 123.094 68.2708 124.1 67.0132C125.207 65.6299 125.747 64.3345 126.011 63.4105C126.143 62.9474 126.206 62.5761 126.236 62.3343C126.251 62.2138 126.258 62.1258 126.261 62.0748C126.263 62.0495 126.264 62.0333 126.264 62.0271V10.7474C126.262 10.7333 126.26 10.7163 126.258 10.6966C126.247 10.6139 126.228 10.4838 126.197 10.3154C126.134 9.97754 126.024 9.49099 125.835 8.92465C125.454 7.78278 124.776 6.37641 123.589 5.18978C122.453 4.05392 121.116 3.53577 120.026 3.30461C119.483 3.18954 119.016 3.14891 118.692 3.13696C118.531 3.13101 118.407 3.13232 118.33 3.13451C118.291 3.1356 118.264 3.13677 118.25 3.13757C118.243 3.13796 118.24 3.13816 118.239 3.13818C118.239 3.13818 118.24 3.13826 118.241 3.13818L118.184 3.14308H58.1351C57.9431 4.34163 57.4898 6.10606 56.4011 7.72354C54.9709 9.84828 52.5151 11.6016 48.5703 11.6016C44.4144 11.6015 41.8086 9.89301 40.2685 7.76821C39.0862 6.13709 38.5955 4.35234 38.3888 3.14308H30.823C30.8191 3.1437 30.815 3.14423 30.8108 3.14491C30.737 3.15678 30.6216 3.17759 30.4743 3.20916C30.1779 3.27267 29.7611 3.37964 29.2958 3.55058C28.3405 3.90154 27.3131 4.47255 26.6244 5.35805C25.8547 6.34775 25.3774 7.54657 25.0941 8.54835C24.9549 9.04044 24.8681 9.46424 24.8169 9.76046C24.7914 9.9081 24.7752 10.0232 24.7655 10.097C24.7638 10.1096 24.7625 10.1211 24.7612 10.1313V26.5049C25.8771 26.7257 27.4732 27.2291 28.9219 28.3938C30.8178 29.9179 32.2799 32.4295 32.2799 36.3505Z",
|
|
2367
|
+
fill: "#C8C8C8"
|
|
2368
|
+
}),
|
|
2369
|
+
/* @__PURE__ */ jsx("path", {
|
|
2370
|
+
d: "M47.3049 66.4135V64.2848C47.3051 63.4198 48.0063 62.7184 48.8713 62.7184C49.7363 62.7184 50.4376 63.4198 50.4377 64.2848V66.4135C50.4377 67.2786 49.7364 67.9799 48.8713 67.9799C48.0062 67.9799 47.3049 67.2786 47.3049 66.4135ZM47.3049 58.204V53.9466C47.3051 53.0817 48.0063 52.3802 48.8713 52.3802C49.7363 52.3802 50.4376 53.0817 50.4377 53.9466V58.204C50.4376 59.069 49.7363 59.7704 48.8713 59.7704C48.0063 59.7704 47.3051 59.069 47.3049 58.204ZM47.3049 47.8659V43.6085C47.3051 42.7435 48.0063 42.0421 48.8713 42.0421C49.7363 42.0421 50.4376 42.7435 50.4377 43.6085V47.8659C50.4376 48.7308 49.7363 49.4323 48.8713 49.4323C48.0063 49.4323 47.3051 48.7308 47.3049 47.8659ZM47.3049 37.5277V33.2703C47.3051 32.4053 48.0063 31.7039 48.8713 31.7039C49.7363 31.7039 50.4376 32.4053 50.4377 33.2703V37.5277C50.4376 38.3927 49.7363 39.0941 48.8713 39.0941C48.0063 39.0941 47.3051 38.3927 47.3049 37.5277ZM47.3049 27.1895V22.9321C47.3051 22.0671 48.0063 21.3657 48.8713 21.3657C49.7363 21.3657 50.4376 22.0671 50.4377 22.9321V27.1895C50.4376 28.0545 49.7363 28.7559 48.8713 28.7559C48.0063 28.7559 47.3051 28.0545 47.3049 27.1895ZM47.3049 16.8513V14.7226C47.3049 13.8575 48.0062 13.1562 48.8713 13.1562C49.7364 13.1562 50.4377 13.8575 50.4377 14.7226V16.8513C50.4376 17.7163 49.7363 18.4177 48.8713 18.4177C48.0063 18.4177 47.3051 17.7163 47.3049 16.8513Z",
|
|
2371
|
+
fill: "#C8C8C8"
|
|
2372
|
+
}),
|
|
2373
|
+
/* @__PURE__ */ jsx("path", {
|
|
2374
|
+
d: "M63.6644 30.1688C63.9188 29.3419 64.7956 28.8778 65.6224 29.1322C68.1752 29.9177 75.1526 31.0546 81.9128 29.1231C82.7446 28.8856 83.6118 29.3676 83.8494 30.1994C84.0869 31.0311 83.6049 31.8983 82.7731 32.1359C75.2793 34.2769 67.6632 33.0382 64.7009 32.1267C63.8741 31.8723 63.41 30.9956 63.6644 30.1688Z",
|
|
2375
|
+
fill: "#C8C8C8"
|
|
2376
|
+
}),
|
|
2377
|
+
/* @__PURE__ */ jsx("path", {
|
|
2378
|
+
d: "M94.2091 30.1688C94.4635 29.3419 95.3402 28.8778 96.1671 29.1322C98.7198 29.9177 105.697 31.0546 112.458 29.1231C113.289 28.8856 114.156 29.3676 114.394 30.1994C114.632 31.0311 114.15 31.8983 113.318 32.1359C105.824 34.2769 98.2078 33.0382 95.2456 32.1267C94.4188 31.8723 93.9547 30.9956 94.2091 30.1688Z",
|
|
2379
|
+
fill: "#C8C8C8"
|
|
2380
|
+
}),
|
|
2381
|
+
/* @__PURE__ */ jsx("path", {
|
|
2382
|
+
d: "M98.9176 52.8999C98.9176 52.0483 98.7013 51.3673 98.4508 50.9603C98.37 50.8291 98.3018 50.7487 98.2519 50.6996C98.2021 50.7487 98.1338 50.8291 98.0531 50.9603C97.8026 51.3673 97.5862 52.0483 97.5862 52.8999C97.5862 53.7515 97.8026 54.4325 98.0531 54.8396C98.1337 54.9705 98.2021 55.0505 98.2519 55.0996C98.3018 55.0505 98.3702 54.9705 98.4508 54.8396C98.7013 54.4325 98.9176 53.7515 98.9176 52.8999ZM100.797 52.8999C100.797 55.1843 99.6577 57.0362 98.2519 57.0362C96.8462 57.0362 95.7065 55.1843 95.7065 52.8999C95.7065 50.6155 96.8462 48.7637 98.2519 48.7637C99.6577 48.7637 100.797 50.6155 100.797 52.8999Z",
|
|
2383
|
+
fill: "#C8C8C8"
|
|
2384
|
+
}),
|
|
2385
|
+
/* @__PURE__ */ jsx("path", {
|
|
2386
|
+
d: "M118.636 50.2557L118.807 49.3678L122.064 46.6211L122.072 46.5827L119.534 46.0927L119.763 44.9043L124.094 45.7405L123.907 46.7087L120.827 49.4061L120.819 49.4445L123.378 49.9385L123.149 51.127L118.636 50.2557Z",
|
|
2387
|
+
fill: "#C8C8C8"
|
|
2388
|
+
}),
|
|
2389
|
+
/* @__PURE__ */ jsx("path", {
|
|
2390
|
+
d: "M131.588 40.8727L131.845 39.772L136.046 36.4992L136.057 36.4515L132.911 35.7164L133.256 34.2431L138.625 35.4977L138.344 36.698L134.365 39.9177L134.354 39.9654L137.526 40.7066L137.182 42.1799L131.588 40.8727Z",
|
|
2391
|
+
fill: "#C8C8C8"
|
|
2392
|
+
}),
|
|
2393
|
+
/* @__PURE__ */ jsx("path", {
|
|
2394
|
+
d: "M136.063 29.0709L135.74 27.4065L139.484 20.3498L139.47 20.2777L134.713 21.2007L134.28 18.9728L142.399 17.3976L142.752 19.2127L139.28 26.0602L139.294 26.1323L144.09 25.2016L144.523 27.4295L136.063 29.0709Z",
|
|
2395
|
+
fill: "#C8C8C8"
|
|
2396
|
+
})
|
|
2397
|
+
]
|
|
2398
|
+
}),
|
|
2399
|
+
/* @__PURE__ */ jsx("div", {
|
|
2400
|
+
className: classNames$2.title,
|
|
2401
|
+
children: title
|
|
2402
|
+
}),
|
|
2403
|
+
description && /* @__PURE__ */ jsx("div", {
|
|
2404
|
+
className: classNames$2.description,
|
|
2405
|
+
children: description
|
|
2406
|
+
}),
|
|
2407
|
+
action && /* @__PURE__ */ jsx("div", {
|
|
2408
|
+
className: classNames$2.action,
|
|
2409
|
+
children: action
|
|
2410
|
+
})
|
|
2411
|
+
]
|
|
2412
|
+
});
|
|
2413
|
+
};
|
|
2414
|
+
|
|
2283
2415
|
//#endregion
|
|
2284
2416
|
//#region src/FileField/FileFieldItem.tsx
|
|
2285
2417
|
const FileFieldItem = ({ children, onRemove }) => {
|
|
2418
|
+
const classNames$2 = useClassNames({ component: "FileField" });
|
|
2419
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages, "marigold");
|
|
2286
2420
|
return /* @__PURE__ */ jsxs("div", {
|
|
2287
|
-
className: "
|
|
2288
|
-
children: [children, /* @__PURE__ */ jsx(
|
|
2289
|
-
"
|
|
2290
|
-
|
|
2421
|
+
className: cn("grid", classNames$2.item),
|
|
2422
|
+
children: [children, /* @__PURE__ */ jsx("div", {
|
|
2423
|
+
className: cn("[grid-area:remove]", classNames$2.itemRemove),
|
|
2424
|
+
children: /* @__PURE__ */ jsx(CloseButton, {
|
|
2425
|
+
"aria-label": stringFormatter.format("removeFile"),
|
|
2426
|
+
onPress: onRemove
|
|
2427
|
+
})
|
|
2291
2428
|
})]
|
|
2292
2429
|
});
|
|
2293
2430
|
};
|
|
2294
2431
|
|
|
2295
2432
|
//#endregion
|
|
2296
2433
|
//#region src/icons/Upload.tsx
|
|
2297
|
-
const Upload = ({ size: size$1 = 24, className
|
|
2434
|
+
const Upload = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
2298
2435
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2299
2436
|
width: size$1,
|
|
2300
2437
|
height: size$1,
|
|
@@ -2311,7 +2448,7 @@ const Upload = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */ js
|
|
|
2311
2448
|
|
|
2312
2449
|
//#endregion
|
|
2313
2450
|
//#region src/FileField/FileTrigger.tsx
|
|
2314
|
-
const _FileTrigger = ({ label, disabled
|
|
2451
|
+
const _FileTrigger = ({ label, disabled, ...rest }) => {
|
|
2315
2452
|
return /* @__PURE__ */ jsx(FileTrigger, {
|
|
2316
2453
|
...rest,
|
|
2317
2454
|
children: /* @__PURE__ */ jsxs(_Button, {
|
|
@@ -2355,24 +2492,35 @@ const normalizeAndLimitFiles = (files, { accept, multiple }) => {
|
|
|
2355
2492
|
|
|
2356
2493
|
//#endregion
|
|
2357
2494
|
//#region src/FileField/FileField.tsx
|
|
2358
|
-
const FileField = ({ disabled = false, accept = ["*"], multiple = false, width: width$1, label
|
|
2495
|
+
const FileField = ({ disabled = false, accept = ["*"], multiple = false, width: width$1, label, name, ...props }) => {
|
|
2359
2496
|
const [files, setFiles] = useState(null);
|
|
2497
|
+
const hiddenInputRef = useRef(null);
|
|
2360
2498
|
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
2361
2499
|
const dropZoneLabel = stringFormatter.format("dropZoneLabel");
|
|
2362
2500
|
const buttonLabel = stringFormatter.format("uploadLabel");
|
|
2501
|
+
const syncHiddenInput = (newFiles) => {
|
|
2502
|
+
if (!hiddenInputRef.current || !name || typeof DataTransfer === "undefined") return;
|
|
2503
|
+
const dt = new DataTransfer();
|
|
2504
|
+
newFiles?.forEach((f$1) => dt.items.add(f$1));
|
|
2505
|
+
hiddenInputRef.current.files = dt.files;
|
|
2506
|
+
};
|
|
2363
2507
|
const handleSelect = (files$1) => {
|
|
2364
|
-
|
|
2508
|
+
const normalized = normalizeAndLimitFiles(files$1 ? Array.from(files$1) : [], {
|
|
2365
2509
|
accept,
|
|
2366
2510
|
multiple
|
|
2367
|
-
})
|
|
2511
|
+
});
|
|
2512
|
+
setFiles(normalized);
|
|
2513
|
+
syncHiddenInput(normalized);
|
|
2368
2514
|
};
|
|
2369
2515
|
const handleDrop = async (e$1) => {
|
|
2370
2516
|
try {
|
|
2371
2517
|
const filePromises = e$1.items.filter(isFileDropItem).map((item) => item.getFile());
|
|
2372
|
-
|
|
2518
|
+
const normalized = normalizeAndLimitFiles((await Promise.all(filePromises)).filter(Boolean), {
|
|
2373
2519
|
accept,
|
|
2374
2520
|
multiple
|
|
2375
|
-
})
|
|
2521
|
+
});
|
|
2522
|
+
setFiles(normalized);
|
|
2523
|
+
syncHiddenInput(normalized);
|
|
2376
2524
|
} catch {}
|
|
2377
2525
|
};
|
|
2378
2526
|
const fileTriggerProps = {
|
|
@@ -2387,46 +2535,58 @@ const FileField = ({ disabled = false, accept = ["*"], multiple = false, width:
|
|
|
2387
2535
|
label,
|
|
2388
2536
|
className: classNames$2.container,
|
|
2389
2537
|
...props,
|
|
2390
|
-
children: [
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2538
|
+
children: [
|
|
2539
|
+
/* @__PURE__ */ jsx(DropZone, {
|
|
2540
|
+
onDrop: handleDrop,
|
|
2541
|
+
isDisabled: disabled,
|
|
2542
|
+
className: classNames$2.dropZone,
|
|
2543
|
+
"data-testid": "dropzone",
|
|
2544
|
+
...props,
|
|
2545
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
2546
|
+
className: classNames$2.dropZoneContent,
|
|
2547
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
2548
|
+
className: classNames$2.dropZoneLabel,
|
|
2549
|
+
children: dropZoneLabel
|
|
2550
|
+
}), /* @__PURE__ */ jsx(_FileTrigger, {
|
|
2551
|
+
...fileTriggerProps,
|
|
2552
|
+
label: buttonLabel,
|
|
2553
|
+
disabled
|
|
2554
|
+
})]
|
|
2555
|
+
})
|
|
2556
|
+
}),
|
|
2557
|
+
files?.map((file, index$1) => /* @__PURE__ */ jsxs(FileField.Item, {
|
|
2558
|
+
onRemove: () => {
|
|
2559
|
+
const updated = (files ?? []).filter((_, i$1) => i$1 !== index$1);
|
|
2560
|
+
setFiles(updated);
|
|
2561
|
+
syncHiddenInput(updated);
|
|
2562
|
+
},
|
|
2563
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
2564
|
+
className: cn("[grid-area:label]", classNames$2.itemLabel),
|
|
2413
2565
|
children: file.name
|
|
2414
|
-
}), /* @__PURE__ */ jsxs("
|
|
2415
|
-
className: classNames$2.itemDescription,
|
|
2566
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
2567
|
+
className: cn("[grid-area:description]", classNames$2.itemDescription),
|
|
2416
2568
|
children: [(file.size / 1024 / 1024).toFixed(2), " MB"]
|
|
2417
2569
|
})]
|
|
2570
|
+
}, index$1)),
|
|
2571
|
+
name && /* @__PURE__ */ jsx("input", {
|
|
2572
|
+
type: "file",
|
|
2573
|
+
ref: hiddenInputRef,
|
|
2574
|
+
name,
|
|
2575
|
+
hidden: true,
|
|
2576
|
+
multiple
|
|
2418
2577
|
})
|
|
2419
|
-
|
|
2578
|
+
]
|
|
2420
2579
|
});
|
|
2421
2580
|
};
|
|
2422
2581
|
FileField.Item = FileFieldItem;
|
|
2423
2582
|
|
|
2424
2583
|
//#endregion
|
|
2425
2584
|
//#region src/Form/Form.tsx
|
|
2426
|
-
const _Form = ({ unstyled, maxWidth: maxWidth$1 = "full"
|
|
2585
|
+
const _Form = forwardRef(({ unstyled, maxWidth: maxWidth$1 = "full", ...props }, ref) => /* @__PURE__ */ jsx(Form, {
|
|
2427
2586
|
...props,
|
|
2587
|
+
ref,
|
|
2428
2588
|
className: cn(maxWidth[maxWidth$1], unstyled && "contents")
|
|
2429
|
-
});
|
|
2589
|
+
}));
|
|
2430
2590
|
|
|
2431
2591
|
//#endregion
|
|
2432
2592
|
//#region src/Grid/GridArea.tsx
|
|
@@ -2439,13 +2599,14 @@ const GridArea = ({ name, children }) => /* @__PURE__ */ jsx("div", {
|
|
|
2439
2599
|
//#region src/Grid/Grid.tsx
|
|
2440
2600
|
const parseGridAreas = (areas) => areas.map((area) => `"${area}"`).join("\n");
|
|
2441
2601
|
const parseTemplateValue = (values) => values.map((val) => typeof val === "number" ? `${val}fr` : val).join(" ");
|
|
2442
|
-
const Grid = ({ children, areas, columns, rows, alignX, alignY, height: height$1 = "auto", space = 0
|
|
2602
|
+
const Grid = ({ children, areas, columns, rows, alignX, alignY, height: height$1 = "auto", space = 0, ...props }) => {
|
|
2443
2603
|
return /* @__PURE__ */ jsx("div", {
|
|
2444
|
-
className: cn("grid", alignX && alignment?.horizontal?.alignmentX[alignX], alignY && alignment?.horizontal?.alignmentY[alignY],
|
|
2604
|
+
className: cn("grid gap-(--space)", alignX && alignment?.horizontal?.alignmentX[alignX], alignY && alignment?.horizontal?.alignmentY[alignY], height[height$1]),
|
|
2445
2605
|
style: {
|
|
2446
2606
|
gridTemplateAreas: parseGridAreas(areas),
|
|
2447
2607
|
gridTemplateColumns: parseTemplateValue(columns),
|
|
2448
|
-
gridTemplateRows: parseTemplateValue(rows)
|
|
2608
|
+
gridTemplateRows: parseTemplateValue(rows),
|
|
2609
|
+
...createSpacingVar("space", `${space}`)
|
|
2449
2610
|
},
|
|
2450
2611
|
...props,
|
|
2451
2612
|
children
|
|
@@ -2455,7 +2616,7 @@ Grid.Area = GridArea;
|
|
|
2455
2616
|
|
|
2456
2617
|
//#endregion
|
|
2457
2618
|
//#region src/Headline/Headline.tsx
|
|
2458
|
-
const _Headline = ({ variant, size: size$1, children, align = "left", color, level = "1"
|
|
2619
|
+
const _Headline = ({ variant, size: size$1, children, align = "left", color, level = "1", lineHeight: lineHeight$1, ...props }) => {
|
|
2459
2620
|
const classNames$2 = useClassNames({
|
|
2460
2621
|
component: "Headline",
|
|
2461
2622
|
variant,
|
|
@@ -2464,7 +2625,7 @@ const _Headline = ({ variant, size: size$1, children, align = "left", color, lev
|
|
|
2464
2625
|
return /* @__PURE__ */ jsx(Heading, {
|
|
2465
2626
|
level: Number(level),
|
|
2466
2627
|
...props,
|
|
2467
|
-
className: cn(classNames$2, "max-w-(--maxHeadlineWidth)", textAlign[align]),
|
|
2628
|
+
className: cn(classNames$2, "max-w-(--maxHeadlineWidth)", textAlign[align], lineHeight$1 && lineHeight[lineHeight$1]),
|
|
2468
2629
|
style: { color: color && ensureCssVar(color, "color") },
|
|
2469
2630
|
children
|
|
2470
2631
|
});
|
|
@@ -2476,9 +2637,10 @@ const inlineAlignmentY = {
|
|
|
2476
2637
|
...alignment.horizontal.alignmentY,
|
|
2477
2638
|
input: "items-end [&:has([slot=description])]:items-end [&:has([slot=description])_>*:not(:has([slot=description]))]:mb-6 [&:has([slot=errorMessage])_>*:not(:has([slot=errorMessage]))]:mb-6"
|
|
2478
2639
|
};
|
|
2479
|
-
const Inline = ({ space = 0, noWrap, alignX, alignY, children
|
|
2640
|
+
const Inline = ({ space = 0, noWrap, alignX, alignY, children, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
2480
2641
|
...props,
|
|
2481
|
-
className: cn("flex", !noWrap && "flex-wrap",
|
|
2642
|
+
className: cn("flex gap-(--space)", !noWrap && "flex-wrap", alignX && alignment?.horizontal?.alignmentX[alignX], alignY && inlineAlignmentY[alignY]),
|
|
2643
|
+
style: createSpacingVar("space", `${space}`),
|
|
2482
2644
|
children
|
|
2483
2645
|
});
|
|
2484
2646
|
|
|
@@ -2491,7 +2653,7 @@ const Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx("div"
|
|
|
2491
2653
|
|
|
2492
2654
|
//#endregion
|
|
2493
2655
|
//#region src/Link/Link.tsx
|
|
2494
|
-
const _Link = forwardRef(({ variant, size: size$1, disabled, children
|
|
2656
|
+
const _Link = forwardRef(({ variant, size: size$1, disabled, children, ...props }, ref) => {
|
|
2495
2657
|
const classNames$2 = useClassNames({
|
|
2496
2658
|
component: "Link",
|
|
2497
2659
|
variant,
|
|
@@ -2508,7 +2670,7 @@ const _Link = forwardRef(({ variant, size: size$1, disabled, children,...props }
|
|
|
2508
2670
|
|
|
2509
2671
|
//#endregion
|
|
2510
2672
|
//#region src/LinkButton/LinkButton.tsx
|
|
2511
|
-
const _LinkButton = forwardRef(({ children, variant, size: size$1, disabled, fullWidth
|
|
2673
|
+
const _LinkButton = forwardRef(({ children, variant, size: size$1, disabled, fullWidth, ...props }, ref) => {
|
|
2512
2674
|
const classNames$2 = useClassNames({
|
|
2513
2675
|
component: "Button",
|
|
2514
2676
|
variant,
|
|
@@ -2530,7 +2692,7 @@ const useListContext = () => useContext(ListContext);
|
|
|
2530
2692
|
|
|
2531
2693
|
//#endregion
|
|
2532
2694
|
//#region src/List/ListItem.tsx
|
|
2533
|
-
const ListItem = ({ children
|
|
2695
|
+
const ListItem = ({ children, ...props }) => {
|
|
2534
2696
|
const { classNames: classNames$2 } = useListContext();
|
|
2535
2697
|
return /* @__PURE__ */ jsx("li", {
|
|
2536
2698
|
...props,
|
|
@@ -2541,7 +2703,7 @@ const ListItem = ({ children,...props }) => {
|
|
|
2541
2703
|
|
|
2542
2704
|
//#endregion
|
|
2543
2705
|
//#region src/List/List.tsx
|
|
2544
|
-
const List = ({ as = "ul", children, variant, size: size$1
|
|
2706
|
+
const List = ({ as = "ul", children, variant, size: size$1, ...props }) => {
|
|
2545
2707
|
const Component$1 = as;
|
|
2546
2708
|
const classNames$2 = useClassNames({
|
|
2547
2709
|
component: "List",
|
|
@@ -2561,7 +2723,7 @@ List.Item = ListItem;
|
|
|
2561
2723
|
|
|
2562
2724
|
//#endregion
|
|
2563
2725
|
//#region src/icons/EllipsisVertical.tsx
|
|
2564
|
-
const EllipsisVertical = ({ size: size$1 = 24, className
|
|
2726
|
+
const EllipsisVertical = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
2565
2727
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2566
2728
|
width: size$1,
|
|
2567
2729
|
height: size$1,
|
|
@@ -2594,7 +2756,7 @@ const EllipsisVertical = ({ size: size$1 = 24, className,...props }) => /* @__PU
|
|
|
2594
2756
|
|
|
2595
2757
|
//#endregion
|
|
2596
2758
|
//#region src/Menu/MenuItem.tsx
|
|
2597
|
-
const _MenuItem = ({ children, variant, size: size$1
|
|
2759
|
+
const _MenuItem = ({ children, variant, size: size$1, ...props }) => {
|
|
2598
2760
|
const classNames$2 = useClassNames({
|
|
2599
2761
|
component: "Menu",
|
|
2600
2762
|
variant,
|
|
@@ -2609,7 +2771,7 @@ const _MenuItem = ({ children, variant, size: size$1,...props }) => {
|
|
|
2609
2771
|
|
|
2610
2772
|
//#endregion
|
|
2611
2773
|
//#region src/Menu/MenuSection.tsx
|
|
2612
|
-
const _MenuSection = ({ children, title
|
|
2774
|
+
const _MenuSection = ({ children, title, ...props }) => {
|
|
2613
2775
|
const className = useClassNames({ component: "Menu" });
|
|
2614
2776
|
return /* @__PURE__ */ jsxs(MenuSection, {
|
|
2615
2777
|
...props,
|
|
@@ -2622,12 +2784,14 @@ const _MenuSection = ({ children, title,...props }) => {
|
|
|
2622
2784
|
|
|
2623
2785
|
//#endregion
|
|
2624
2786
|
//#region src/Menu/Menu.tsx
|
|
2625
|
-
const _Menu = ({ children, label, variant, size: size$1, disabled, open, placement, "aria-label": ariaLabel
|
|
2787
|
+
const _Menu = ({ children, label, variant, size: size$1, disabled, open, placement, "aria-label": ariaLabel, ...props }) => {
|
|
2626
2788
|
const classNames$2 = useClassNames({
|
|
2627
2789
|
component: "Menu",
|
|
2628
2790
|
variant,
|
|
2629
2791
|
size: size$1
|
|
2630
2792
|
});
|
|
2793
|
+
const isSmallScreen = useSmallScreen();
|
|
2794
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
2631
2795
|
return /* @__PURE__ */ jsxs(MenuTrigger, {
|
|
2632
2796
|
...props,
|
|
2633
2797
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
@@ -2635,7 +2799,18 @@ const _Menu = ({ children, label, variant, size: size$1, disabled, open, placeme
|
|
|
2635
2799
|
"aria-label": ariaLabel,
|
|
2636
2800
|
isDisabled: disabled,
|
|
2637
2801
|
children: label
|
|
2638
|
-
}), /* @__PURE__ */
|
|
2802
|
+
}), isSmallScreen ? /* @__PURE__ */ jsxs(Tray, { children: [
|
|
2803
|
+
/* @__PURE__ */ jsx(Tray.Title, { children: label }),
|
|
2804
|
+
/* @__PURE__ */ jsx(Tray.Content, { children: /* @__PURE__ */ jsx(Menu, {
|
|
2805
|
+
...props,
|
|
2806
|
+
className: classNames$2.container,
|
|
2807
|
+
children
|
|
2808
|
+
}) }),
|
|
2809
|
+
/* @__PURE__ */ jsx(Tray.Actions, { children: /* @__PURE__ */ jsx(_Button, {
|
|
2810
|
+
slot: "close",
|
|
2811
|
+
children: stringFormatter.format("close")
|
|
2812
|
+
}) })
|
|
2813
|
+
] }) : /* @__PURE__ */ jsx(_Popover, {
|
|
2639
2814
|
open,
|
|
2640
2815
|
placement,
|
|
2641
2816
|
children: /* @__PURE__ */ jsx(Menu, {
|
|
@@ -2651,7 +2826,7 @@ _Menu.Section = _MenuSection;
|
|
|
2651
2826
|
|
|
2652
2827
|
//#endregion
|
|
2653
2828
|
//#region src/Menu/ActionMenu.tsx
|
|
2654
|
-
const ActionMenu = ({ children
|
|
2829
|
+
const ActionMenu = ({ children, ...props }) => /* @__PURE__ */ jsx(_Menu, {
|
|
2655
2830
|
...props,
|
|
2656
2831
|
label: /* @__PURE__ */ jsx(EllipsisVertical, {}),
|
|
2657
2832
|
children
|
|
@@ -2810,7 +2985,7 @@ function _objectWithoutProperties$1(e$1, t$1) {
|
|
|
2810
2985
|
}
|
|
2811
2986
|
|
|
2812
2987
|
//#endregion
|
|
2813
|
-
//#region ../../node_modules/.pnpm/react-select@5.10.2_@types+react@19.2.
|
|
2988
|
+
//#region ../../node_modules/.pnpm/react-select@5.10.2_@types+react@19.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
2814
2989
|
var _excluded$6 = [
|
|
2815
2990
|
"defaultInputValue",
|
|
2816
2991
|
"defaultMenuIsOpen",
|
|
@@ -3848,7 +4023,15 @@ var createCache = function createCache$1(options$1) {
|
|
|
3848
4023
|
|
|
3849
4024
|
//#endregion
|
|
3850
4025
|
//#region ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js
|
|
3851
|
-
|
|
4026
|
+
/** @license React v16.13.1
|
|
4027
|
+
* react-is.production.min.js
|
|
4028
|
+
*
|
|
4029
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
4030
|
+
*
|
|
4031
|
+
* This source code is licensed under the MIT license found in the
|
|
4032
|
+
* LICENSE file in the root directory of this source tree.
|
|
4033
|
+
*/
|
|
4034
|
+
var require_react_is_production_min = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3852
4035
|
var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w$1 = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
|
|
3853
4036
|
function z(a) {
|
|
3854
4037
|
if ("object" === typeof a && null !== a) {
|
|
@@ -3931,12 +4114,21 @@ var require_react_is_production_min = /* @__PURE__ */ __commonJS({ "../../node_m
|
|
|
3931
4114
|
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w$1 || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
3932
4115
|
};
|
|
3933
4116
|
exports.typeOf = z;
|
|
3934
|
-
})
|
|
4117
|
+
}));
|
|
3935
4118
|
|
|
3936
4119
|
//#endregion
|
|
3937
4120
|
//#region ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js
|
|
3938
|
-
|
|
4121
|
+
/** @license React v16.13.1
|
|
4122
|
+
* react-is.development.js
|
|
4123
|
+
*
|
|
4124
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
4125
|
+
*
|
|
4126
|
+
* This source code is licensed under the MIT license found in the
|
|
4127
|
+
* LICENSE file in the root directory of this source tree.
|
|
4128
|
+
*/
|
|
4129
|
+
var require_react_is_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3939
4130
|
if (process.env.NODE_ENV !== "production") (function() {
|
|
4131
|
+
"use strict";
|
|
3940
4132
|
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
3941
4133
|
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
|
|
3942
4134
|
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
|
|
@@ -4073,18 +4265,18 @@ var require_react_is_development = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
4073
4265
|
exports.isValidElementType = isValidElementType;
|
|
4074
4266
|
exports.typeOf = typeOf;
|
|
4075
4267
|
})();
|
|
4076
|
-
})
|
|
4268
|
+
}));
|
|
4077
4269
|
|
|
4078
4270
|
//#endregion
|
|
4079
4271
|
//#region ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js
|
|
4080
|
-
var require_react_is = /* @__PURE__ */
|
|
4272
|
+
var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4081
4273
|
if (process.env.NODE_ENV === "production") module.exports = require_react_is_production_min();
|
|
4082
4274
|
else module.exports = require_react_is_development();
|
|
4083
|
-
})
|
|
4275
|
+
}));
|
|
4084
4276
|
|
|
4085
4277
|
//#endregion
|
|
4086
4278
|
//#region ../../node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
|
|
4087
|
-
var require_hoist_non_react_statics_cjs = /* @__PURE__ */
|
|
4279
|
+
var require_hoist_non_react_statics_cjs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4088
4280
|
var reactIs = require_react_is();
|
|
4089
4281
|
/**
|
|
4090
4282
|
* Copyright 2015, Yahoo! Inc.
|
|
@@ -4163,7 +4355,7 @@ var require_hoist_non_react_statics_cjs = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
4163
4355
|
return targetComponent;
|
|
4164
4356
|
}
|
|
4165
4357
|
module.exports = hoistNonReactStatics;
|
|
4166
|
-
})
|
|
4358
|
+
}));
|
|
4167
4359
|
|
|
4168
4360
|
//#endregion
|
|
4169
4361
|
//#region ../../node_modules/.pnpm/@emotion+utils@1.4.2/node_modules/@emotion/utils/dist/emotion-utils.esm.js
|
|
@@ -4399,7 +4591,7 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
4399
4591
|
}
|
|
4400
4592
|
|
|
4401
4593
|
//#endregion
|
|
4402
|
-
//#region ../../node_modules/.pnpm/@emotion+use-insertion-effect-with-fallbacks@1.2.0_react@19.2.
|
|
4594
|
+
//#region ../../node_modules/.pnpm/@emotion+use-insertion-effect-with-fallbacks@1.2.0_react@19.2.3/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js
|
|
4403
4595
|
var isBrowser$1 = typeof document !== "undefined";
|
|
4404
4596
|
var syncFallback = function syncFallback$1(create) {
|
|
4405
4597
|
return create();
|
|
@@ -4409,7 +4601,7 @@ var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$1 ? syncFallback : use
|
|
|
4409
4601
|
var useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;
|
|
4410
4602
|
|
|
4411
4603
|
//#endregion
|
|
4412
|
-
//#region ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.2.
|
|
4604
|
+
//#region ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.2.9_react@19.2.3/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
4413
4605
|
var isDevelopment = false;
|
|
4414
4606
|
var isBrowser = typeof document !== "undefined";
|
|
4415
4607
|
var EmotionCacheContext = /* @__PURE__ */ React.createContext(typeof HTMLElement !== "undefined" ? /* @__PURE__ */ createCache({ key: "css" }) : null);
|
|
@@ -4478,7 +4670,7 @@ var Emotion$1 = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
4478
4670
|
|
|
4479
4671
|
//#endregion
|
|
4480
4672
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/extends.js
|
|
4481
|
-
var require_extends = /* @__PURE__ */
|
|
4673
|
+
var require_extends = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4482
4674
|
function _extends$1() {
|
|
4483
4675
|
return module.exports = _extends$1 = Object.assign ? Object.assign.bind() : function(n$1) {
|
|
4484
4676
|
for (var e$1 = 1; e$1 < arguments.length; e$1++) {
|
|
@@ -4489,12 +4681,12 @@ var require_extends = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@ba
|
|
|
4489
4681
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends$1.apply(null, arguments);
|
|
4490
4682
|
}
|
|
4491
4683
|
module.exports = _extends$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4492
|
-
})
|
|
4684
|
+
}));
|
|
4493
4685
|
|
|
4494
4686
|
//#endregion
|
|
4495
|
-
//#region ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.2.
|
|
4496
|
-
var import_extends =
|
|
4497
|
-
var import_hoist_non_react_statics_cjs =
|
|
4687
|
+
//#region ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.2.9_react@19.2.3/node_modules/@emotion/react/dist/emotion-react.esm.js
|
|
4688
|
+
var import_extends = require_extends();
|
|
4689
|
+
var import_hoist_non_react_statics_cjs = require_hoist_non_react_statics_cjs();
|
|
4498
4690
|
var jsx$1 = function jsx$2(type, props) {
|
|
4499
4691
|
var args = arguments;
|
|
4500
4692
|
if (props == null || !hasOwn.call(props, "css")) return React.createElement.apply(void 0, args);
|
|
@@ -4845,11 +5037,11 @@ function autoUpdate(reference, floating, update, options$1) {
|
|
|
4845
5037
|
}
|
|
4846
5038
|
|
|
4847
5039
|
//#endregion
|
|
4848
|
-
//#region ../../node_modules/.pnpm/use-isomorphic-layout-effect@1.2.1_@types+react@19.2.
|
|
5040
|
+
//#region ../../node_modules/.pnpm/use-isomorphic-layout-effect@1.2.1_@types+react@19.2.9_react@19.2.3/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
4849
5041
|
var index = typeof document !== "undefined" ? useLayoutEffect : function noop$1() {};
|
|
4850
5042
|
|
|
4851
5043
|
//#endregion
|
|
4852
|
-
//#region ../../node_modules/.pnpm/react-select@5.10.2_@types+react@19.2.
|
|
5044
|
+
//#region ../../node_modules/.pnpm/react-select@5.10.2_@types+react@19.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
4853
5045
|
var _excluded$4 = [
|
|
4854
5046
|
"className",
|
|
4855
5047
|
"clearValue",
|
|
@@ -5791,7 +5983,7 @@ var defaultComponents = function defaultComponents$1(props) {
|
|
|
5791
5983
|
|
|
5792
5984
|
//#endregion
|
|
5793
5985
|
//#region ../../node_modules/.pnpm/memoize-one@6.0.0/node_modules/memoize-one/dist/memoize-one.cjs.js
|
|
5794
|
-
var require_memoize_one_cjs = /* @__PURE__ */
|
|
5986
|
+
var require_memoize_one_cjs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5795
5987
|
var safeIsNaN = Number.isNaN || function ponyfill(value) {
|
|
5796
5988
|
return typeof value === "number" && value !== value;
|
|
5797
5989
|
};
|
|
@@ -5826,10 +6018,10 @@ var require_memoize_one_cjs = /* @__PURE__ */ __commonJS({ "../../node_modules/.
|
|
|
5826
6018
|
return memoized;
|
|
5827
6019
|
}
|
|
5828
6020
|
module.exports = memoizeOne$1;
|
|
5829
|
-
})
|
|
6021
|
+
}));
|
|
5830
6022
|
|
|
5831
6023
|
//#endregion
|
|
5832
|
-
//#region ../../node_modules/.pnpm/react-select@5.10.2_@types+react@19.2.
|
|
6024
|
+
//#region ../../node_modules/.pnpm/react-select@5.10.2_@types+react@19.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
5833
6025
|
var import_memoize_one_cjs = /* @__PURE__ */ __toESM(require_memoize_one_cjs());
|
|
5834
6026
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$2() {
|
|
5835
6027
|
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
@@ -8012,7 +8204,7 @@ Select$2.defaultProps = defaultProps;
|
|
|
8012
8204
|
|
|
8013
8205
|
//#endregion
|
|
8014
8206
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/typeof.js
|
|
8015
|
-
var require_typeof = /* @__PURE__ */
|
|
8207
|
+
var require_typeof = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8016
8208
|
function _typeof$3(o) {
|
|
8017
8209
|
"@babel/helpers - typeof";
|
|
8018
8210
|
return module.exports = _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
|
@@ -8022,11 +8214,11 @@ var require_typeof = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@bab
|
|
|
8022
8214
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof$3(o);
|
|
8023
8215
|
}
|
|
8024
8216
|
module.exports = _typeof$3, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8025
|
-
})
|
|
8217
|
+
}));
|
|
8026
8218
|
|
|
8027
8219
|
//#endregion
|
|
8028
8220
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/toPrimitive.js
|
|
8029
|
-
var require_toPrimitive = /* @__PURE__ */
|
|
8221
|
+
var require_toPrimitive = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8030
8222
|
var _typeof$2 = require_typeof()["default"];
|
|
8031
8223
|
function toPrimitive$1(t$1, r$1) {
|
|
8032
8224
|
if ("object" != _typeof$2(t$1) || !t$1) return t$1;
|
|
@@ -8039,11 +8231,11 @@ var require_toPrimitive = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
8039
8231
|
return ("string" === r$1 ? String : Number)(t$1);
|
|
8040
8232
|
}
|
|
8041
8233
|
module.exports = toPrimitive$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8042
|
-
})
|
|
8234
|
+
}));
|
|
8043
8235
|
|
|
8044
8236
|
//#endregion
|
|
8045
8237
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/toPropertyKey.js
|
|
8046
|
-
var require_toPropertyKey = /* @__PURE__ */
|
|
8238
|
+
var require_toPropertyKey = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8047
8239
|
var _typeof$1 = require_typeof()["default"];
|
|
8048
8240
|
var toPrimitive = require_toPrimitive();
|
|
8049
8241
|
function toPropertyKey$2(t$1) {
|
|
@@ -8051,11 +8243,11 @@ var require_toPropertyKey = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
|
8051
8243
|
return "symbol" == _typeof$1(i$1) ? i$1 : i$1 + "";
|
|
8052
8244
|
}
|
|
8053
8245
|
module.exports = toPropertyKey$2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8054
|
-
})
|
|
8246
|
+
}));
|
|
8055
8247
|
|
|
8056
8248
|
//#endregion
|
|
8057
8249
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/defineProperty.js
|
|
8058
|
-
var require_defineProperty = /* @__PURE__ */
|
|
8250
|
+
var require_defineProperty = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8059
8251
|
var toPropertyKey$1 = require_toPropertyKey();
|
|
8060
8252
|
function _defineProperty(e$1, r$1, t$1) {
|
|
8061
8253
|
return (r$1 = toPropertyKey$1(r$1)) in e$1 ? Object.defineProperty(e$1, r$1, {
|
|
@@ -8066,11 +8258,11 @@ var require_defineProperty = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
8066
8258
|
}) : e$1[r$1] = t$1, e$1;
|
|
8067
8259
|
}
|
|
8068
8260
|
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8069
|
-
})
|
|
8261
|
+
}));
|
|
8070
8262
|
|
|
8071
8263
|
//#endregion
|
|
8072
8264
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
8073
|
-
var require_objectSpread2 = /* @__PURE__ */
|
|
8265
|
+
var require_objectSpread2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8074
8266
|
var defineProperty = require_defineProperty();
|
|
8075
8267
|
function ownKeys(e$1, r$1) {
|
|
8076
8268
|
var t$1 = Object.keys(e$1);
|
|
@@ -8094,20 +8286,20 @@ var require_objectSpread2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
|
8094
8286
|
return e$1;
|
|
8095
8287
|
}
|
|
8096
8288
|
module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8097
|
-
})
|
|
8289
|
+
}));
|
|
8098
8290
|
|
|
8099
8291
|
//#endregion
|
|
8100
8292
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/arrayWithHoles.js
|
|
8101
|
-
var require_arrayWithHoles = /* @__PURE__ */
|
|
8293
|
+
var require_arrayWithHoles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8102
8294
|
function _arrayWithHoles(r$1) {
|
|
8103
8295
|
if (Array.isArray(r$1)) return r$1;
|
|
8104
8296
|
}
|
|
8105
8297
|
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8106
|
-
})
|
|
8298
|
+
}));
|
|
8107
8299
|
|
|
8108
8300
|
//#endregion
|
|
8109
8301
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js
|
|
8110
|
-
var require_iterableToArrayLimit = /* @__PURE__ */
|
|
8302
|
+
var require_iterableToArrayLimit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8111
8303
|
function _iterableToArrayLimit(r$1, l$1) {
|
|
8112
8304
|
var t$1 = null == r$1 ? null : "undefined" != typeof Symbol && r$1[Symbol.iterator] || r$1["@@iterator"];
|
|
8113
8305
|
if (null != t$1) {
|
|
@@ -8130,22 +8322,22 @@ var require_iterableToArrayLimit = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
8130
8322
|
}
|
|
8131
8323
|
}
|
|
8132
8324
|
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8133
|
-
})
|
|
8325
|
+
}));
|
|
8134
8326
|
|
|
8135
8327
|
//#endregion
|
|
8136
8328
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/arrayLikeToArray.js
|
|
8137
|
-
var require_arrayLikeToArray = /* @__PURE__ */
|
|
8329
|
+
var require_arrayLikeToArray = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8138
8330
|
function _arrayLikeToArray(r$1, a) {
|
|
8139
8331
|
(null == a || a > r$1.length) && (a = r$1.length);
|
|
8140
8332
|
for (var e$1 = 0, n$1 = Array(a); e$1 < a; e$1++) n$1[e$1] = r$1[e$1];
|
|
8141
8333
|
return n$1;
|
|
8142
8334
|
}
|
|
8143
8335
|
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8144
|
-
})
|
|
8336
|
+
}));
|
|
8145
8337
|
|
|
8146
8338
|
//#endregion
|
|
8147
8339
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js
|
|
8148
|
-
var require_unsupportedIterableToArray = /* @__PURE__ */
|
|
8340
|
+
var require_unsupportedIterableToArray = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8149
8341
|
var arrayLikeToArray$1 = require_arrayLikeToArray();
|
|
8150
8342
|
function _unsupportedIterableToArray(r$1, a) {
|
|
8151
8343
|
if (r$1) {
|
|
@@ -8155,20 +8347,20 @@ var require_unsupportedIterableToArray = /* @__PURE__ */ __commonJS({ "../../nod
|
|
|
8155
8347
|
}
|
|
8156
8348
|
}
|
|
8157
8349
|
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8158
|
-
})
|
|
8350
|
+
}));
|
|
8159
8351
|
|
|
8160
8352
|
//#endregion
|
|
8161
8353
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/nonIterableRest.js
|
|
8162
|
-
var require_nonIterableRest = /* @__PURE__ */
|
|
8354
|
+
var require_nonIterableRest = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8163
8355
|
function _nonIterableRest() {
|
|
8164
8356
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8165
8357
|
}
|
|
8166
8358
|
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8167
|
-
})
|
|
8359
|
+
}));
|
|
8168
8360
|
|
|
8169
8361
|
//#endregion
|
|
8170
8362
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
8171
|
-
var require_slicedToArray = /* @__PURE__ */
|
|
8363
|
+
var require_slicedToArray = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8172
8364
|
var arrayWithHoles = require_arrayWithHoles();
|
|
8173
8365
|
var iterableToArrayLimit = require_iterableToArrayLimit();
|
|
8174
8366
|
var unsupportedIterableToArray$1 = require_unsupportedIterableToArray();
|
|
@@ -8177,11 +8369,11 @@ var require_slicedToArray = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
|
8177
8369
|
return arrayWithHoles(r$1) || iterableToArrayLimit(r$1, e$1) || unsupportedIterableToArray$1(r$1, e$1) || nonIterableRest();
|
|
8178
8370
|
}
|
|
8179
8371
|
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8180
|
-
})
|
|
8372
|
+
}));
|
|
8181
8373
|
|
|
8182
8374
|
//#endregion
|
|
8183
8375
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js
|
|
8184
|
-
var require_objectWithoutPropertiesLoose = /* @__PURE__ */
|
|
8376
|
+
var require_objectWithoutPropertiesLoose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8185
8377
|
function _objectWithoutPropertiesLoose(r$1, e$1) {
|
|
8186
8378
|
if (null == r$1) return {};
|
|
8187
8379
|
var t$1 = {};
|
|
@@ -8192,11 +8384,11 @@ var require_objectWithoutPropertiesLoose = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
8192
8384
|
return t$1;
|
|
8193
8385
|
}
|
|
8194
8386
|
module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8195
|
-
})
|
|
8387
|
+
}));
|
|
8196
8388
|
|
|
8197
8389
|
//#endregion
|
|
8198
8390
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/objectWithoutProperties.js
|
|
8199
|
-
var require_objectWithoutProperties = /* @__PURE__ */
|
|
8391
|
+
var require_objectWithoutProperties = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8200
8392
|
var objectWithoutPropertiesLoose = require_objectWithoutPropertiesLoose();
|
|
8201
8393
|
function _objectWithoutProperties(e$1, t$1) {
|
|
8202
8394
|
if (null == e$1) return {};
|
|
@@ -8208,20 +8400,20 @@ var require_objectWithoutProperties = /* @__PURE__ */ __commonJS({ "../../node_m
|
|
|
8208
8400
|
return i$1;
|
|
8209
8401
|
}
|
|
8210
8402
|
module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8211
|
-
})
|
|
8403
|
+
}));
|
|
8212
8404
|
|
|
8213
8405
|
//#endregion
|
|
8214
8406
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/classCallCheck.js
|
|
8215
|
-
var require_classCallCheck = /* @__PURE__ */
|
|
8407
|
+
var require_classCallCheck = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8216
8408
|
function _classCallCheck(a, n$1) {
|
|
8217
8409
|
if (!(a instanceof n$1)) throw new TypeError("Cannot call a class as a function");
|
|
8218
8410
|
}
|
|
8219
8411
|
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8220
|
-
})
|
|
8412
|
+
}));
|
|
8221
8413
|
|
|
8222
8414
|
//#endregion
|
|
8223
8415
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/createClass.js
|
|
8224
|
-
var require_createClass = /* @__PURE__ */
|
|
8416
|
+
var require_createClass = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8225
8417
|
var toPropertyKey = require_toPropertyKey();
|
|
8226
8418
|
function _defineProperties(e$1, r$1) {
|
|
8227
8419
|
for (var t$1 = 0; t$1 < r$1.length; t$1++) {
|
|
@@ -8233,22 +8425,22 @@ var require_createClass = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
8233
8425
|
return r$1 && _defineProperties(e$1.prototype, r$1), t$1 && _defineProperties(e$1, t$1), Object.defineProperty(e$1, "prototype", { writable: !1 }), e$1;
|
|
8234
8426
|
}
|
|
8235
8427
|
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8236
|
-
})
|
|
8428
|
+
}));
|
|
8237
8429
|
|
|
8238
8430
|
//#endregion
|
|
8239
8431
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/setPrototypeOf.js
|
|
8240
|
-
var require_setPrototypeOf = /* @__PURE__ */
|
|
8432
|
+
var require_setPrototypeOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8241
8433
|
function _setPrototypeOf(t$1, e$1) {
|
|
8242
8434
|
return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t$2, e$2) {
|
|
8243
8435
|
return t$2.__proto__ = e$2, t$2;
|
|
8244
8436
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t$1, e$1);
|
|
8245
8437
|
}
|
|
8246
8438
|
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8247
|
-
})
|
|
8439
|
+
}));
|
|
8248
8440
|
|
|
8249
8441
|
//#endregion
|
|
8250
8442
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/inherits.js
|
|
8251
|
-
var require_inherits = /* @__PURE__ */
|
|
8443
|
+
var require_inherits = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8252
8444
|
var setPrototypeOf = require_setPrototypeOf();
|
|
8253
8445
|
function _inherits(t$1, e$1) {
|
|
8254
8446
|
if ("function" != typeof e$1 && null !== e$1) throw new TypeError("Super expression must either be null or a function");
|
|
@@ -8259,22 +8451,22 @@ var require_inherits = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@b
|
|
|
8259
8451
|
} }), Object.defineProperty(t$1, "prototype", { writable: !1 }), e$1 && setPrototypeOf(t$1, e$1);
|
|
8260
8452
|
}
|
|
8261
8453
|
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8262
|
-
})
|
|
8454
|
+
}));
|
|
8263
8455
|
|
|
8264
8456
|
//#endregion
|
|
8265
8457
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/getPrototypeOf.js
|
|
8266
|
-
var require_getPrototypeOf = /* @__PURE__ */
|
|
8458
|
+
var require_getPrototypeOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8267
8459
|
function _getPrototypeOf(t$1) {
|
|
8268
8460
|
return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t$2) {
|
|
8269
8461
|
return t$2.__proto__ || Object.getPrototypeOf(t$2);
|
|
8270
8462
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t$1);
|
|
8271
8463
|
}
|
|
8272
8464
|
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8273
|
-
})
|
|
8465
|
+
}));
|
|
8274
8466
|
|
|
8275
8467
|
//#endregion
|
|
8276
8468
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js
|
|
8277
|
-
var require_isNativeReflectConstruct = /* @__PURE__ */
|
|
8469
|
+
var require_isNativeReflectConstruct = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8278
8470
|
function _isNativeReflectConstruct() {
|
|
8279
8471
|
try {
|
|
8280
8472
|
var t$1 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
@@ -8284,21 +8476,21 @@ var require_isNativeReflectConstruct = /* @__PURE__ */ __commonJS({ "../../node_
|
|
|
8284
8476
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports)();
|
|
8285
8477
|
}
|
|
8286
8478
|
module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8287
|
-
})
|
|
8479
|
+
}));
|
|
8288
8480
|
|
|
8289
8481
|
//#endregion
|
|
8290
8482
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/assertThisInitialized.js
|
|
8291
|
-
var require_assertThisInitialized = /* @__PURE__ */
|
|
8483
|
+
var require_assertThisInitialized = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8292
8484
|
function _assertThisInitialized(e$1) {
|
|
8293
8485
|
if (void 0 === e$1) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
8294
8486
|
return e$1;
|
|
8295
8487
|
}
|
|
8296
8488
|
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8297
|
-
})
|
|
8489
|
+
}));
|
|
8298
8490
|
|
|
8299
8491
|
//#endregion
|
|
8300
8492
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js
|
|
8301
|
-
var require_possibleConstructorReturn = /* @__PURE__ */
|
|
8493
|
+
var require_possibleConstructorReturn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8302
8494
|
var _typeof = require_typeof()["default"];
|
|
8303
8495
|
var assertThisInitialized = require_assertThisInitialized();
|
|
8304
8496
|
function _possibleConstructorReturn(t$1, e$1) {
|
|
@@ -8307,11 +8499,11 @@ var require_possibleConstructorReturn = /* @__PURE__ */ __commonJS({ "../../node
|
|
|
8307
8499
|
return assertThisInitialized(t$1);
|
|
8308
8500
|
}
|
|
8309
8501
|
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8310
|
-
})
|
|
8502
|
+
}));
|
|
8311
8503
|
|
|
8312
8504
|
//#endregion
|
|
8313
8505
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/createSuper.js
|
|
8314
|
-
var require_createSuper = /* @__PURE__ */
|
|
8506
|
+
var require_createSuper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8315
8507
|
var getPrototypeOf = require_getPrototypeOf();
|
|
8316
8508
|
var isNativeReflectConstruct = require_isNativeReflectConstruct();
|
|
8317
8509
|
var possibleConstructorReturn = require_possibleConstructorReturn();
|
|
@@ -8327,39 +8519,39 @@ var require_createSuper = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
8327
8519
|
};
|
|
8328
8520
|
}
|
|
8329
8521
|
module.exports = _createSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8330
|
-
})
|
|
8522
|
+
}));
|
|
8331
8523
|
|
|
8332
8524
|
//#endregion
|
|
8333
8525
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js
|
|
8334
|
-
var require_arrayWithoutHoles = /* @__PURE__ */
|
|
8526
|
+
var require_arrayWithoutHoles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8335
8527
|
var arrayLikeToArray = require_arrayLikeToArray();
|
|
8336
8528
|
function _arrayWithoutHoles(r$1) {
|
|
8337
8529
|
if (Array.isArray(r$1)) return arrayLikeToArray(r$1);
|
|
8338
8530
|
}
|
|
8339
8531
|
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8340
|
-
})
|
|
8532
|
+
}));
|
|
8341
8533
|
|
|
8342
8534
|
//#endregion
|
|
8343
8535
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/iterableToArray.js
|
|
8344
|
-
var require_iterableToArray = /* @__PURE__ */
|
|
8536
|
+
var require_iterableToArray = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8345
8537
|
function _iterableToArray(r$1) {
|
|
8346
8538
|
if ("undefined" != typeof Symbol && null != r$1[Symbol.iterator] || null != r$1["@@iterator"]) return Array.from(r$1);
|
|
8347
8539
|
}
|
|
8348
8540
|
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8349
|
-
})
|
|
8541
|
+
}));
|
|
8350
8542
|
|
|
8351
8543
|
//#endregion
|
|
8352
8544
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/nonIterableSpread.js
|
|
8353
|
-
var require_nonIterableSpread = /* @__PURE__ */
|
|
8545
|
+
var require_nonIterableSpread = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8354
8546
|
function _nonIterableSpread() {
|
|
8355
8547
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8356
8548
|
}
|
|
8357
8549
|
module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8358
|
-
})
|
|
8550
|
+
}));
|
|
8359
8551
|
|
|
8360
8552
|
//#endregion
|
|
8361
8553
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/toConsumableArray.js
|
|
8362
|
-
var require_toConsumableArray = /* @__PURE__ */
|
|
8554
|
+
var require_toConsumableArray = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8363
8555
|
var arrayWithoutHoles = require_arrayWithoutHoles();
|
|
8364
8556
|
var iterableToArray = require_iterableToArray();
|
|
8365
8557
|
var unsupportedIterableToArray = require_unsupportedIterableToArray();
|
|
@@ -8368,30 +8560,30 @@ var require_toConsumableArray = /* @__PURE__ */ __commonJS({ "../../node_modules
|
|
|
8368
8560
|
return arrayWithoutHoles(r$1) || iterableToArray(r$1) || unsupportedIterableToArray(r$1) || nonIterableSpread();
|
|
8369
8561
|
}
|
|
8370
8562
|
module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8371
|
-
})
|
|
8563
|
+
}));
|
|
8372
8564
|
|
|
8373
8565
|
//#endregion
|
|
8374
8566
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.28.2/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js
|
|
8375
|
-
var require_taggedTemplateLiteral = /* @__PURE__ */
|
|
8567
|
+
var require_taggedTemplateLiteral = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
8376
8568
|
function _taggedTemplateLiteral(e$1, t$1) {
|
|
8377
8569
|
return t$1 || (t$1 = e$1.slice(0)), Object.freeze(Object.defineProperties(e$1, { raw: { value: Object.freeze(t$1) } }));
|
|
8378
8570
|
}
|
|
8379
8571
|
module.exports = _taggedTemplateLiteral, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
8380
|
-
})
|
|
8381
|
-
|
|
8382
|
-
//#endregion
|
|
8383
|
-
//#region ../../node_modules/.pnpm/react-select@5.10.2_@types+react@19.2.
|
|
8384
|
-
var import_objectSpread2 =
|
|
8385
|
-
var import_slicedToArray =
|
|
8386
|
-
var import_objectWithoutProperties =
|
|
8387
|
-
var import_classCallCheck =
|
|
8388
|
-
var import_createClass =
|
|
8389
|
-
var import_inherits =
|
|
8390
|
-
var import_createSuper =
|
|
8391
|
-
var import_toConsumableArray =
|
|
8392
|
-
var import_typeof =
|
|
8393
|
-
var import_taggedTemplateLiteral =
|
|
8394
|
-
var import_defineProperty =
|
|
8572
|
+
}));
|
|
8573
|
+
|
|
8574
|
+
//#endregion
|
|
8575
|
+
//#region ../../node_modules/.pnpm/react-select@5.10.2_@types+react@19.2.9_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-select/dist/react-select.esm.js
|
|
8576
|
+
var import_objectSpread2 = require_objectSpread2();
|
|
8577
|
+
var import_slicedToArray = require_slicedToArray();
|
|
8578
|
+
var import_objectWithoutProperties = require_objectWithoutProperties();
|
|
8579
|
+
var import_classCallCheck = require_classCallCheck();
|
|
8580
|
+
var import_createClass = require_createClass();
|
|
8581
|
+
var import_inherits = require_inherits();
|
|
8582
|
+
var import_createSuper = require_createSuper();
|
|
8583
|
+
var import_toConsumableArray = require_toConsumableArray();
|
|
8584
|
+
var import_typeof = require_typeof();
|
|
8585
|
+
var import_taggedTemplateLiteral = require_taggedTemplateLiteral();
|
|
8586
|
+
var import_defineProperty = require_defineProperty();
|
|
8395
8587
|
var StateManagedSelect$1 = /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
8396
8588
|
var baseSelectProps = useStateManager(props);
|
|
8397
8589
|
return /* @__PURE__ */ React.createElement(Select$2, _extends({ ref }, baseSelectProps));
|
|
@@ -8414,7 +8606,7 @@ const propsToBeRemoved = [
|
|
|
8414
8606
|
"isHidden",
|
|
8415
8607
|
"cx"
|
|
8416
8608
|
];
|
|
8417
|
-
const Input$1 = ({ innerRef, placeholder, hasValue
|
|
8609
|
+
const Input$1 = ({ innerRef, placeholder, hasValue, ...props }) => {
|
|
8418
8610
|
const inputProps = Object.entries(props).reduce((acc, [key, value]) => {
|
|
8419
8611
|
if (!propsToBeRemoved.includes(key)) acc[key] = value;
|
|
8420
8612
|
return acc;
|
|
@@ -8445,7 +8637,10 @@ const getClassNames = (classNames$2) => ({
|
|
|
8445
8637
|
placeholder: () => "hidden",
|
|
8446
8638
|
valueContainer: () => classNames$2.valueContainer
|
|
8447
8639
|
});
|
|
8448
|
-
|
|
8640
|
+
/**
|
|
8641
|
+
* @deprecated Use `TagField` instead. Will be removed in a future major version.
|
|
8642
|
+
*/
|
|
8643
|
+
const Multiselect = ({ disabled, readOnly = false, items, selectedItems, defaultSelectedItems, defaultValue, error, errorMessage, size: size$1, variant, placeholder, description, emptyState, onChange, onSelectionChange, width: width$1, ...rest }) => {
|
|
8449
8644
|
const classNames$2 = useClassNames({
|
|
8450
8645
|
component: "MultiSelect",
|
|
8451
8646
|
size: size$1,
|
|
@@ -8501,7 +8696,7 @@ const Multiselect = ({ disabled, readOnly = false, items, selectedItems, default
|
|
|
8501
8696
|
position: "absolute",
|
|
8502
8697
|
top: "100%",
|
|
8503
8698
|
width: "100%",
|
|
8504
|
-
zIndex:
|
|
8699
|
+
zIndex: 20
|
|
8505
8700
|
}),
|
|
8506
8701
|
valueContainer: (base) => ({ ...base }),
|
|
8507
8702
|
container: (base) => ({
|
|
@@ -8545,7 +8740,7 @@ const Multiselect = ({ disabled, readOnly = false, items, selectedItems, default
|
|
|
8545
8740
|
|
|
8546
8741
|
//#endregion
|
|
8547
8742
|
//#region src/icons/Plus.tsx
|
|
8548
|
-
const Plus = ({ size: size$1 = 24, className
|
|
8743
|
+
const Plus = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
8549
8744
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8550
8745
|
width: size$1,
|
|
8551
8746
|
height: size$1,
|
|
@@ -8562,18 +8757,18 @@ const Plus = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */ jsxs
|
|
|
8562
8757
|
|
|
8563
8758
|
//#endregion
|
|
8564
8759
|
//#region src/NumberField/StepButton.tsx
|
|
8565
|
-
const _StepButton = ({ direction, className
|
|
8566
|
-
const Icon$
|
|
8760
|
+
const _StepButton = ({ direction, className, ...props }) => {
|
|
8761
|
+
const Icon$1 = direction === "up" ? Plus : Minus;
|
|
8567
8762
|
return /* @__PURE__ */ jsx(Button, {
|
|
8568
8763
|
className: cn(["flex items-center justify-center", "cursor-pointer data-disabled:cursor-not-allowed"], className),
|
|
8569
8764
|
...props,
|
|
8570
|
-
children: /* @__PURE__ */ jsx(Icon$
|
|
8765
|
+
children: /* @__PURE__ */ jsx(Icon$1, { size: 16 })
|
|
8571
8766
|
});
|
|
8572
8767
|
};
|
|
8573
8768
|
|
|
8574
8769
|
//#endregion
|
|
8575
8770
|
//#region src/NumberField/NumberField.tsx
|
|
8576
|
-
const _NumberField = forwardRef(({ variant, size: size$1, disabled, required, readOnly, error, hideStepper
|
|
8771
|
+
const _NumberField = forwardRef(({ variant, size: size$1, disabled, required, readOnly, error, hideStepper, ...rest }, ref) => {
|
|
8577
8772
|
const classNames$2 = useClassNames({
|
|
8578
8773
|
component: "NumberField",
|
|
8579
8774
|
size: size$1,
|
|
@@ -8593,7 +8788,7 @@ const _NumberField = forwardRef(({ variant, size: size$1, disabled, required, re
|
|
|
8593
8788
|
"data-readonly": readOnly ? "true" : void 0,
|
|
8594
8789
|
"data-stepper": showStepper ? "true" : void 0,
|
|
8595
8790
|
children: /* @__PURE__ */ jsxs(Group, {
|
|
8596
|
-
className: cn("flex items-stretch", classNames$2.group),
|
|
8791
|
+
className: cn("flex w-(--field-width) max-w-full min-w-0 items-stretch", classNames$2.group),
|
|
8597
8792
|
children: [
|
|
8598
8793
|
showStepper && /* @__PURE__ */ jsx(_StepButton, {
|
|
8599
8794
|
className: classNames$2.stepper,
|
|
@@ -8632,7 +8827,7 @@ const NavigationButton = (props) => {
|
|
|
8632
8827
|
const ref = useRef(null);
|
|
8633
8828
|
const { navigationButton } = useClassNames({ component: "Pagination" });
|
|
8634
8829
|
let { buttonProps } = useButton(props, ref);
|
|
8635
|
-
let { children, isSelected, isDisabled,
|
|
8830
|
+
let { children, isSelected, isDisabled, controlLabel, position: position$1, ...rest } = props;
|
|
8636
8831
|
return /* @__PURE__ */ jsxs("button", {
|
|
8637
8832
|
ref,
|
|
8638
8833
|
...buttonProps,
|
|
@@ -8698,17 +8893,17 @@ const InnerPagination = ({ currentPage, pageSize, totalPages, pageRange, setCurr
|
|
|
8698
8893
|
const isFirstPage = currentPage === 1;
|
|
8699
8894
|
const isLastPage = currentPage === totalPages || totalPages === 0;
|
|
8700
8895
|
const isFirstRender = useRef(true);
|
|
8896
|
+
const handlePageChange = useCallback((newPage) => {
|
|
8897
|
+
setCurrentPage(newPage);
|
|
8898
|
+
if (onChange) onChange(newPage);
|
|
8899
|
+
}, [setCurrentPage, onChange]);
|
|
8701
8900
|
useEffect(() => {
|
|
8702
8901
|
if (isFirstRender.current) {
|
|
8703
8902
|
isFirstRender.current = false;
|
|
8704
8903
|
return;
|
|
8705
8904
|
}
|
|
8706
8905
|
handlePageChange(1);
|
|
8707
|
-
}, [pageSize]);
|
|
8708
|
-
const handlePageChange = (newPage) => {
|
|
8709
|
-
setCurrentPage(newPage);
|
|
8710
|
-
if (onChange) onChange(newPage);
|
|
8711
|
-
};
|
|
8906
|
+
}, [pageSize, handlePageChange]);
|
|
8712
8907
|
const { icon, container } = useClassNames({ component: "Pagination" });
|
|
8713
8908
|
const handleKeyDown = (onEnter) => (e$1) => {
|
|
8714
8909
|
if (e$1.key === "ArrowRight") {
|
|
@@ -8755,7 +8950,7 @@ const InnerPagination = ({ currentPage, pageSize, totalPages, pageRange, setCurr
|
|
|
8755
8950
|
})
|
|
8756
8951
|
] });
|
|
8757
8952
|
};
|
|
8758
|
-
const _Pagination = ({ defaultPage = 1, page, totalItems, pageSize
|
|
8953
|
+
const _Pagination = ({ defaultPage = 1, page, totalItems, pageSize, ...props }) => {
|
|
8759
8954
|
const [currentPage, setCurrentPage] = useState(page ?? defaultPage);
|
|
8760
8955
|
const totalPages = Math.ceil(totalItems / pageSize);
|
|
8761
8956
|
const pageRange = usePageRange({
|
|
@@ -8821,7 +9016,7 @@ const CollapsibleGroup = ({ children }) => {
|
|
|
8821
9016
|
children
|
|
8822
9017
|
});
|
|
8823
9018
|
};
|
|
8824
|
-
const _RadioGroup = ({ variant, size: size$1, label, error, disabled, required, readOnly, description, errorMessage, orientation = "vertical", children, width: width$1, collapseAt
|
|
9019
|
+
const _RadioGroup = ({ variant, size: size$1, label, error, disabled, required, readOnly, description, errorMessage, orientation = "vertical", children, width: width$1, collapseAt, ...rest }) => {
|
|
8825
9020
|
const classNames$2 = useClassNames({
|
|
8826
9021
|
component: "Radio",
|
|
8827
9022
|
variant,
|
|
@@ -8863,13 +9058,13 @@ const _RadioGroup = ({ variant, size: size$1, label, error, disabled, required,
|
|
|
8863
9058
|
|
|
8864
9059
|
//#endregion
|
|
8865
9060
|
//#region src/Radio/Radio.tsx
|
|
8866
|
-
const Icon = ({ checked, className
|
|
9061
|
+
const Icon = ({ checked, className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
8867
9062
|
className: cn("flex h-4 w-4 items-center justify-center rounded-full border p-1", className),
|
|
8868
9063
|
"aria-hidden": "true",
|
|
8869
9064
|
...props,
|
|
8870
9065
|
children: checked ? /* @__PURE__ */ jsx("div", { className: "size-full rounded-full bg-current" }) : null
|
|
8871
9066
|
});
|
|
8872
|
-
const _Radio = forwardRef(({ value, disabled, width: width$1, children
|
|
9067
|
+
const _Radio = forwardRef(({ value, disabled, width: width$1, children, ...props }, ref) => {
|
|
8873
9068
|
const { variant, size: size$1, width: groupWidth } = useRadioGroupContext();
|
|
8874
9069
|
const classNames$2 = useClassNames({
|
|
8875
9070
|
component: "Radio",
|
|
@@ -8895,16 +9090,16 @@ _Radio.Group = _RadioGroup;
|
|
|
8895
9090
|
|
|
8896
9091
|
//#endregion
|
|
8897
9092
|
//#region src/Scrollable/Scrollable.tsx
|
|
8898
|
-
const Scrollable = ({ children, width: width$1 = "full", height: height$1
|
|
9093
|
+
const Scrollable = ({ children, width: width$1 = "full", height: height$1, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
8899
9094
|
...props,
|
|
8900
|
-
className: cn(["sticky h-(--height) overflow-auto overscroll-
|
|
9095
|
+
className: cn(["sticky h-(--height) overflow-auto overscroll-auto", width[width$1]]),
|
|
8901
9096
|
style: createVar({ height: height$1 }),
|
|
8902
9097
|
children
|
|
8903
9098
|
});
|
|
8904
9099
|
|
|
8905
9100
|
//#endregion
|
|
8906
9101
|
//#region src/SearchField/SearchField.tsx
|
|
8907
|
-
const _SearchField = forwardRef(({ disabled, required, readOnly, error,
|
|
9102
|
+
const _SearchField = forwardRef(({ disabled, required, readOnly, error, ...rest }, ref) => {
|
|
8908
9103
|
return /* @__PURE__ */ jsx(FieldBase, {
|
|
8909
9104
|
as: SearchField,
|
|
8910
9105
|
...rest,
|
|
@@ -8921,7 +9116,7 @@ const _SearchField = forwardRef(({ disabled, required, readOnly, error, action,.
|
|
|
8921
9116
|
|
|
8922
9117
|
//#endregion
|
|
8923
9118
|
//#region src/icons/CircleAlert.tsx
|
|
8924
|
-
const CircleAlert = ({ size: size$1 = 24, className
|
|
9119
|
+
const CircleAlert = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
8925
9120
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8926
9121
|
width: size$1,
|
|
8927
9122
|
height: size$1,
|
|
@@ -8956,7 +9151,7 @@ const CircleAlert = ({ size: size$1 = 24, className,...props }) => /* @__PURE__
|
|
|
8956
9151
|
|
|
8957
9152
|
//#endregion
|
|
8958
9153
|
//#region src/icons/CircleCheck.tsx
|
|
8959
|
-
const CircleCheck = ({ size: size$1 = 24, className
|
|
9154
|
+
const CircleCheck = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
8960
9155
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8961
9156
|
width: size$1,
|
|
8962
9157
|
height: size$1,
|
|
@@ -9008,14 +9203,14 @@ const icons$1 = {
|
|
|
9008
9203
|
warning: CircleAlert,
|
|
9009
9204
|
error: TriangleAlert
|
|
9010
9205
|
};
|
|
9011
|
-
const SectionMessage = ({ variant = "info", size: size$1, children, closeButton, close, onCloseChange
|
|
9206
|
+
const SectionMessage = ({ variant = "info", size: size$1, children, closeButton, close, onCloseChange, ...props }) => {
|
|
9012
9207
|
const buttonRef = useRef(null);
|
|
9013
9208
|
const classNames$2 = useClassNames({
|
|
9014
9209
|
component: "SectionMessage",
|
|
9015
9210
|
variant,
|
|
9016
9211
|
size: size$1
|
|
9017
9212
|
});
|
|
9018
|
-
const Icon$
|
|
9213
|
+
const Icon$1 = icons$1[variant];
|
|
9019
9214
|
const [internalVisible, setInternalVisible] = useState(true);
|
|
9020
9215
|
const isCurrentlyVisible = close ?? internalVisible;
|
|
9021
9216
|
const { buttonProps } = useButton(props, buttonRef);
|
|
@@ -9033,7 +9228,7 @@ const SectionMessage = ({ variant = "info", size: size$1, children, closeButton,
|
|
|
9033
9228
|
children: [
|
|
9034
9229
|
/* @__PURE__ */ jsx("div", {
|
|
9035
9230
|
className: cn("[grid-area:icon]", classNames$2.icon),
|
|
9036
|
-
children: Icon$
|
|
9231
|
+
children: Icon$1 && /* @__PURE__ */ jsx(Icon$1, { size: "20" })
|
|
9037
9232
|
}),
|
|
9038
9233
|
closeButton && /* @__PURE__ */ jsx(CloseButton, {
|
|
9039
9234
|
...buttonProps,
|
|
@@ -9052,12 +9247,19 @@ SectionMessage.Content = SectionMessageContent;
|
|
|
9052
9247
|
|
|
9053
9248
|
//#endregion
|
|
9054
9249
|
//#region src/Select/Select.tsx
|
|
9055
|
-
const SelectBase = forwardRef(function Select$3({ disabled, required, items, variant, size: size$1, error, open, children
|
|
9250
|
+
const SelectBase = forwardRef(function Select$3({ disabled, required, items, variant, size: size$1, error, open, label, children, selectionMode, onChange, ...rest }, ref) {
|
|
9251
|
+
const isSingleSelect = !selectionMode || selectionMode === "single";
|
|
9252
|
+
const [trayOpen, setTrayOpen] = useState(false);
|
|
9056
9253
|
const props = {
|
|
9057
9254
|
isDisabled: disabled,
|
|
9058
9255
|
isInvalid: error,
|
|
9059
9256
|
isOpen: open,
|
|
9060
9257
|
isRequired: required,
|
|
9258
|
+
selectionMode,
|
|
9259
|
+
onChange: (...args) => {
|
|
9260
|
+
onChange?.(...args);
|
|
9261
|
+
if (isSingleSelect) setTrayOpen(false);
|
|
9262
|
+
},
|
|
9061
9263
|
...rest
|
|
9062
9264
|
};
|
|
9063
9265
|
const classNames$2 = useClassNames({
|
|
@@ -9065,22 +9267,45 @@ const SelectBase = forwardRef(function Select$3({ disabled, required, items, var
|
|
|
9065
9267
|
variant,
|
|
9066
9268
|
size: size$1
|
|
9067
9269
|
});
|
|
9068
|
-
|
|
9270
|
+
const isSmallScreen = useSmallScreen();
|
|
9271
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
9272
|
+
return /* @__PURE__ */ jsx(FieldBase, {
|
|
9069
9273
|
as: Select$1,
|
|
9070
9274
|
ref,
|
|
9071
9275
|
variant,
|
|
9072
9276
|
size: size$1,
|
|
9277
|
+
label,
|
|
9073
9278
|
...props,
|
|
9074
|
-
children:
|
|
9075
|
-
|
|
9076
|
-
|
|
9279
|
+
children: isSmallScreen ? /* @__PURE__ */ jsxs(Tray.Trigger, {
|
|
9280
|
+
open: trayOpen,
|
|
9281
|
+
onOpenChange: setTrayOpen,
|
|
9282
|
+
children: [/* @__PURE__ */ jsxs(IconButton, {
|
|
9283
|
+
className: cn("flex w-(--field-width) max-w-full min-w-0 items-center justify-between gap-1 overflow-hidden", classNames$2.select),
|
|
9284
|
+
children: [/* @__PURE__ */ jsx(SelectValue, { className: "truncate text-nowrap **:[[slot=description]]:hidden" }), /* @__PURE__ */ jsx(ChevronsVertical, {
|
|
9285
|
+
size: "16",
|
|
9286
|
+
className: classNames$2.icon
|
|
9287
|
+
})]
|
|
9288
|
+
}), /* @__PURE__ */ jsxs(Tray, { children: [
|
|
9289
|
+
/* @__PURE__ */ jsx(Tray.Title, { children: label }),
|
|
9290
|
+
/* @__PURE__ */ jsx(Tray.Content, { children: /* @__PURE__ */ jsx(_ListBox, {
|
|
9291
|
+
items,
|
|
9292
|
+
children
|
|
9293
|
+
}) }),
|
|
9294
|
+
/* @__PURE__ */ jsx(Tray.Actions, { children: /* @__PURE__ */ jsx(_Button, {
|
|
9295
|
+
slot: "close",
|
|
9296
|
+
children: stringFormatter.format("close")
|
|
9297
|
+
}) })
|
|
9298
|
+
] })]
|
|
9299
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Button, {
|
|
9300
|
+
className: cn("flex w-(--field-width) max-w-full min-w-0 items-center justify-between gap-1", classNames$2.select),
|
|
9301
|
+
children: [/* @__PURE__ */ jsx(SelectValue, { className: "truncate text-nowrap **:[[slot=description]]:hidden" }), /* @__PURE__ */ jsx(ChevronsVertical, {
|
|
9077
9302
|
size: "16",
|
|
9078
9303
|
className: classNames$2.icon
|
|
9079
9304
|
})]
|
|
9080
9305
|
}), /* @__PURE__ */ jsx(_Popover, { children: /* @__PURE__ */ jsx(_ListBox, {
|
|
9081
9306
|
items,
|
|
9082
9307
|
children
|
|
9083
|
-
}) })]
|
|
9308
|
+
}) })] })
|
|
9084
9309
|
});
|
|
9085
9310
|
});
|
|
9086
9311
|
const Select = Object.assign(SelectBase, {
|
|
@@ -9111,7 +9336,7 @@ const SelectionIndicator = ({ selectionMode }) => {
|
|
|
9111
9336
|
});
|
|
9112
9337
|
}
|
|
9113
9338
|
};
|
|
9114
|
-
const _SelectListItem = forwardRef(({ children, disabled
|
|
9339
|
+
const _SelectListItem = forwardRef(({ children, disabled, ...props }, ref) => {
|
|
9115
9340
|
let textValue = typeof children === "string" ? children : void 0;
|
|
9116
9341
|
const { classNames: classNames$2 } = useSelectListContext();
|
|
9117
9342
|
return /* @__PURE__ */ jsx(GridListItem, {
|
|
@@ -9129,7 +9354,7 @@ const _SelectListItem = forwardRef(({ children, disabled,...props }, ref) => {
|
|
|
9129
9354
|
|
|
9130
9355
|
//#endregion
|
|
9131
9356
|
//#region src/SelectList/SelectList.tsx
|
|
9132
|
-
const _SelectList = forwardRef(({ onChange
|
|
9357
|
+
const _SelectList = forwardRef(({ onChange, ...rest }, ref) => {
|
|
9133
9358
|
const classNames$2 = useClassNames({ component: "ListBox" });
|
|
9134
9359
|
const props = {
|
|
9135
9360
|
onSelectionChange: onChange,
|
|
@@ -9154,7 +9379,7 @@ _SelectList.Action = SelectListAction;
|
|
|
9154
9379
|
|
|
9155
9380
|
//#endregion
|
|
9156
9381
|
//#region src/Slider/Slider.tsx
|
|
9157
|
-
const _Slider = forwardRef(({ variant, size: size$1, width: width$1 = "full", disabled, label, name, thumbLabels
|
|
9382
|
+
const _Slider = forwardRef(({ variant, size: size$1, width: width$1 = "full", disabled, label, name, thumbLabels, ...rest }, ref) => {
|
|
9158
9383
|
const classNames$2 = useClassNames({
|
|
9159
9384
|
component: "Slider",
|
|
9160
9385
|
variant,
|
|
@@ -9208,11 +9433,12 @@ const Split = () => /* @__PURE__ */ jsx("div", {
|
|
|
9208
9433
|
|
|
9209
9434
|
//#endregion
|
|
9210
9435
|
//#region src/Stack/Stack.tsx
|
|
9211
|
-
const Stack = ({ children, space = 0, stretch = false, alignX, alignY, asList = false
|
|
9436
|
+
const Stack = ({ children, space = "0", stretch = false, alignX = "stretch", alignY, asList = false, ...props }) => {
|
|
9212
9437
|
const Component$1 = asList ? "ul" : "div";
|
|
9213
9438
|
const stackChildren = asList ? Children.map(children, (child) => child != null ? /* @__PURE__ */ jsx("li", { children: child }) : null) : children;
|
|
9214
9439
|
return /* @__PURE__ */ jsx(Component$1, {
|
|
9215
|
-
className: cn("flex flex-col
|
|
9440
|
+
className: cn("flex flex-col gap-y-(--space)", alignX && alignment?.vertical?.alignmentX[alignX], alignY && alignment?.vertical?.alignmentY[alignY], stretch && "size-full"),
|
|
9441
|
+
style: createSpacingVar("space", `${space}`),
|
|
9216
9442
|
...props,
|
|
9217
9443
|
children: stackChildren
|
|
9218
9444
|
});
|
|
@@ -9220,7 +9446,7 @@ const Stack = ({ children, space = 0, stretch = false, alignX, alignY, asList =
|
|
|
9220
9446
|
|
|
9221
9447
|
//#endregion
|
|
9222
9448
|
//#region src/Switch/Switch.tsx
|
|
9223
|
-
const _Switch = forwardRef(({ variant, size: size$1, width: width$1 = "full", label, selected, disabled, readOnly
|
|
9449
|
+
const _Switch = forwardRef(({ variant, size: size$1, width: width$1 = "full", label, selected, disabled, readOnly, ...rest }, ref) => {
|
|
9224
9450
|
const classNames$2 = useClassNames({
|
|
9225
9451
|
component: "Switch",
|
|
9226
9452
|
size: size$1,
|
|
@@ -9247,326 +9473,475 @@ const _Switch = forwardRef(({ variant, size: size$1, width: width$1 = "full", la
|
|
|
9247
9473
|
});
|
|
9248
9474
|
|
|
9249
9475
|
//#endregion
|
|
9250
|
-
//#region src/Table/Context.tsx
|
|
9251
|
-
const TableContext = createContext(
|
|
9252
|
-
const useTableContext = () =>
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9476
|
+
//#region src/Table/Context.tsx
|
|
9477
|
+
const TableContext = createContext(null);
|
|
9478
|
+
const useTableContext = () => {
|
|
9479
|
+
const context = useContext(TableContext);
|
|
9480
|
+
if (context === null) throw new Error("useTableContext must be used within a <Table> component");
|
|
9481
|
+
return context;
|
|
9482
|
+
};
|
|
9483
|
+
|
|
9484
|
+
//#endregion
|
|
9485
|
+
//#region src/Table/TableBody.tsx
|
|
9486
|
+
const TableBody$1 = ({ emptyState, ...props }) => {
|
|
9487
|
+
const { classNames: classNames$2 } = useTableContext();
|
|
9488
|
+
return /* @__PURE__ */ jsx(TableBody, {
|
|
9489
|
+
...props,
|
|
9490
|
+
className: cn(classNames$2.body),
|
|
9491
|
+
renderEmptyState: emptyState
|
|
9492
|
+
});
|
|
9493
|
+
};
|
|
9494
|
+
|
|
9495
|
+
//#endregion
|
|
9496
|
+
//#region src/Table/TableCellContent.tsx
|
|
9497
|
+
/**
|
|
9498
|
+
* Prevents event propagation for table cells, to make their content
|
|
9499
|
+
* selectable without interfering with row selection.
|
|
9500
|
+
*/
|
|
9501
|
+
const stopPropagationProps = {
|
|
9502
|
+
onMouseDown: (e$1) => e$1.stopPropagation(),
|
|
9503
|
+
onPointerDown: (e$1) => e$1.stopPropagation(),
|
|
9504
|
+
onTouchStart: (e$1) => e$1.stopPropagation()
|
|
9505
|
+
};
|
|
9506
|
+
const TableCellContent = ({ columnIndex, alignX, cellOverflow, children, className, allowTextSelection }) => {
|
|
9507
|
+
const { overflow: tableOverflow, allowTextSelection: tableAllowTextSelection } = useTableContext();
|
|
9508
|
+
const state = useContext(TableStateContext);
|
|
9509
|
+
const overflow = cellOverflow ?? tableOverflow;
|
|
9510
|
+
const selectable = allowTextSelection ?? tableAllowTextSelection;
|
|
9511
|
+
const columnAlign = columnIndex ? state?.collection.columns[columnIndex].props.alignX : void 0;
|
|
9512
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9513
|
+
"data-cell-content": "",
|
|
9514
|
+
className: cn(textAlign[alignX || columnAlign || "left"], overflow === "truncate" ? "truncate" : "wrap-break-word", selectable && "cursor-text select-text", className),
|
|
9515
|
+
tabIndex: selectable ? -1 : void 0,
|
|
9516
|
+
...selectable ? stopPropagationProps : {},
|
|
9517
|
+
children
|
|
9518
|
+
});
|
|
9519
|
+
};
|
|
9520
|
+
|
|
9521
|
+
//#endregion
|
|
9522
|
+
//#region src/Table/TableCell.tsx
|
|
9523
|
+
const TableCell = ({ children, alignX, overflow: cellOverflow, ...props }) => {
|
|
9524
|
+
const { classNames: classNames$2, alignY = "middle" } = useTableContext();
|
|
9525
|
+
return /* @__PURE__ */ jsx(Cell, {
|
|
9526
|
+
className: cn(classNames$2.cell, verticalAlign[alignY]),
|
|
9527
|
+
...props,
|
|
9528
|
+
children: ({ columnIndex }) => /* @__PURE__ */ jsx(TableCellContent, {
|
|
9529
|
+
columnIndex,
|
|
9530
|
+
alignX,
|
|
9531
|
+
cellOverflow,
|
|
9532
|
+
children
|
|
9533
|
+
})
|
|
9534
|
+
});
|
|
9535
|
+
};
|
|
9536
|
+
|
|
9537
|
+
//#endregion
|
|
9538
|
+
//#region src/icons/SortAscending.tsx
|
|
9539
|
+
const SortAscending = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsx(SVG, {
|
|
9540
|
+
width: size$1,
|
|
9541
|
+
height: size$1,
|
|
9542
|
+
viewBox: "0 0 24 24",
|
|
9543
|
+
fill: "none",
|
|
9544
|
+
strokeLinecap: "round",
|
|
9545
|
+
strokeLinejoin: "round",
|
|
9546
|
+
strokeWidth: 2,
|
|
9547
|
+
className: cn("flex-none shrink-0 stroke-current", className),
|
|
9548
|
+
...props,
|
|
9549
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3 8l4-4 4 4M7 4v16m4-8h4m-4 4h7m-7 4h10" })
|
|
9550
|
+
});
|
|
9551
|
+
|
|
9552
|
+
//#endregion
|
|
9553
|
+
//#region src/icons/SortDescending.tsx
|
|
9554
|
+
const SortDescending = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsx(SVG, {
|
|
9555
|
+
width: size$1,
|
|
9556
|
+
height: size$1,
|
|
9557
|
+
viewBox: "0 0 24 24",
|
|
9558
|
+
fill: "none",
|
|
9559
|
+
strokeLinecap: "round",
|
|
9560
|
+
strokeLinejoin: "round",
|
|
9561
|
+
strokeWidth: 2,
|
|
9562
|
+
className: cn("flex-none shrink-0 stroke-current", className),
|
|
9563
|
+
...props,
|
|
9564
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3 16l4 4 4-4m-4 4V4m4 0h10M11 8h7m-7 4h4" })
|
|
9565
|
+
});
|
|
9566
|
+
|
|
9567
|
+
//#endregion
|
|
9568
|
+
//#region src/Table/TableColumn.tsx
|
|
9569
|
+
const isStaticWidth = (width$1) => !`${width$1}`.endsWith("fr");
|
|
9570
|
+
const ensureWidth = (width$1, minWdith) => {
|
|
9571
|
+
if (minWdith) return minWdith;
|
|
9572
|
+
return isStaticWidth(width$1) ? width$1 : minWdith;
|
|
9573
|
+
};
|
|
9574
|
+
const TableColumn = ({ alignX = "left", width: width$1, minWidth, rowHeader, ...props }) => {
|
|
9575
|
+
const { classNames: classNames$2 } = useTableContext();
|
|
9576
|
+
return /* @__PURE__ */ jsx(Column, {
|
|
9577
|
+
className: classNames$2.column,
|
|
9578
|
+
width: width$1,
|
|
9579
|
+
minWidth: ensureWidth(width$1, minWidth),
|
|
9580
|
+
isRowHeader: rowHeader,
|
|
9581
|
+
alignX,
|
|
9582
|
+
...props,
|
|
9583
|
+
children: ({ allowsSorting, sortDirection }) => /* @__PURE__ */ jsxs("div", {
|
|
9584
|
+
className: cn("flex items-center gap-1", alignment.horizontal.alignmentX[alignX]),
|
|
9585
|
+
children: [allowsSorting && sortDirection != null && /* @__PURE__ */ jsx("span", {
|
|
9586
|
+
"aria-hidden": "true",
|
|
9587
|
+
children: sortDirection === "ascending" ? /* @__PURE__ */ jsx(SortAscending, { size: 14 }) : /* @__PURE__ */ jsx(SortDescending, { size: 14 })
|
|
9588
|
+
}), /* @__PURE__ */ jsx(Group, {
|
|
9589
|
+
className: "cursor-default outline-none",
|
|
9590
|
+
role: "presentation",
|
|
9591
|
+
tabIndex: -1,
|
|
9592
|
+
children: props.children
|
|
9593
|
+
})]
|
|
9273
9594
|
})
|
|
9274
9595
|
});
|
|
9275
|
-
return /* @__PURE__ */ jsx("tbody", {
|
|
9276
|
-
...rowGroupProps,
|
|
9277
|
-
className,
|
|
9278
|
-
"data-rac": true,
|
|
9279
|
-
children
|
|
9280
|
-
});
|
|
9281
9596
|
};
|
|
9282
9597
|
|
|
9283
9598
|
//#endregion
|
|
9284
|
-
//#region src/Table/
|
|
9285
|
-
const
|
|
9286
|
-
const
|
|
9287
|
-
const
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
...gridCellProps,
|
|
9292
|
-
onMouseDown: (e$1) => e$1.stopPropagation(),
|
|
9293
|
-
onPointerDown: (e$1) => e$1.stopPropagation()
|
|
9294
|
-
};
|
|
9295
|
-
const { focusProps, isFocusVisible } = useFocusRing();
|
|
9296
|
-
const stateProps = useStateProps({
|
|
9297
|
-
disabled,
|
|
9298
|
-
focusVisible: isFocusVisible
|
|
9599
|
+
//#region src/Table/TableDragPreview.tsx
|
|
9600
|
+
const TableDragPreview = ({ items, variant, size: size$1 }) => {
|
|
9601
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
9602
|
+
const classNames$2 = useClassNames({
|
|
9603
|
+
component: "Table",
|
|
9604
|
+
variant,
|
|
9605
|
+
size: size$1
|
|
9299
9606
|
});
|
|
9300
|
-
return /* @__PURE__ */
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
valign: alignY,
|
|
9307
|
-
"data-rac": true,
|
|
9308
|
-
children: cell.rendered
|
|
9607
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
9608
|
+
className: cn("flex transform-gpu items-center gap-2", classNames$2.dragPreview),
|
|
9609
|
+
children: [items[0]["text/plain"] ?? stringFormatter.format("items"), /* @__PURE__ */ jsx("div", {
|
|
9610
|
+
className: classNames$2.dragPreviewCounter,
|
|
9611
|
+
children: items.length
|
|
9612
|
+
})]
|
|
9309
9613
|
});
|
|
9310
9614
|
};
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
//#region src/Table/utils.ts
|
|
9314
|
-
/**
|
|
9315
|
-
* Map `react-aria` props to ours (no "is"-prefix)
|
|
9316
|
-
*/
|
|
9317
|
-
const mapCheckboxProps = ({ checkboxProps: { isIndeterminate, isSelected, isDisabled, defaultSelected,...rest } }) => {
|
|
9318
|
-
return { checkboxProps: {
|
|
9319
|
-
disabled: isDisabled,
|
|
9320
|
-
checked: isSelected,
|
|
9321
|
-
defaultChecked: defaultSelected,
|
|
9322
|
-
indeterminate: isIndeterminate,
|
|
9323
|
-
...rest
|
|
9324
|
-
} };
|
|
9615
|
+
const renderDragPreview = (items) => {
|
|
9616
|
+
if (items.length > 1) return /* @__PURE__ */ jsx(TableDragPreview, { items });
|
|
9325
9617
|
};
|
|
9326
9618
|
|
|
9327
9619
|
//#endregion
|
|
9328
|
-
//#region src/Table/
|
|
9329
|
-
const
|
|
9330
|
-
const
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
focusVisible: isFocusVisible
|
|
9339
|
-
});
|
|
9340
|
-
return /* @__PURE__ */ jsx("td", {
|
|
9341
|
-
ref,
|
|
9342
|
-
className: cn("leading-none", classNames$2?.cell),
|
|
9343
|
-
...mergeProps(gridCellProps, focusProps),
|
|
9344
|
-
...stateProps,
|
|
9345
|
-
valign: alignY,
|
|
9346
|
-
"data-rac": true,
|
|
9347
|
-
children: /* @__PURE__ */ jsx(_Checkbox, { ...checkboxProps })
|
|
9620
|
+
//#region src/Table/TableDropIndicator.tsx
|
|
9621
|
+
const TableDropIndicator = ({ size: size$1, variant, ...props }) => {
|
|
9622
|
+
const classNames$2 = useClassNames({
|
|
9623
|
+
component: "Table",
|
|
9624
|
+
variant,
|
|
9625
|
+
size: size$1
|
|
9626
|
+
});
|
|
9627
|
+
return /* @__PURE__ */ jsx(DropIndicator, {
|
|
9628
|
+
...props,
|
|
9629
|
+
className: cn("transform-gpu", classNames$2.dropIndicator)
|
|
9348
9630
|
});
|
|
9349
9631
|
};
|
|
9632
|
+
const renderDropIndicator = (target) => /* @__PURE__ */ jsx(TableDropIndicator, { target });
|
|
9350
9633
|
|
|
9351
9634
|
//#endregion
|
|
9352
|
-
//#region src/icons/
|
|
9353
|
-
const
|
|
9354
|
-
|
|
9355
|
-
height: size$1,
|
|
9356
|
-
viewBox: "0 0 24 24",
|
|
9357
|
-
className: cn("flex-none shrink-0 fill-current", className),
|
|
9358
|
-
...props,
|
|
9359
|
-
children: /* @__PURE__ */ jsx("path", { d: "M17.3962 10.0496L12.5042 14.9416C12.3731 15.0727 12.1984 15.1492 12.0128 15.1492C11.8272 15.1492 11.6524 15.0727 11.5214 14.9416L6.62934 10.0496C6.49827 9.91854 6.42188 9.7439 6.42188 9.55816C6.42188 9.17606 6.73856 8.85938 7.12078 8.85938H16.9048C17.287 8.85938 17.6037 9.17606 17.6037 9.55816C17.6037 9.7439 17.5273 9.91854 17.3962 10.0496Z" })
|
|
9360
|
-
});
|
|
9361
|
-
|
|
9362
|
-
//#endregion
|
|
9363
|
-
//#region src/icons/SortUp.tsx
|
|
9364
|
-
const SortUp = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */ jsx(SVG, {
|
|
9635
|
+
//#region src/icons/Pencil.tsx
|
|
9636
|
+
const Pencil = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
9637
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9365
9638
|
width: size$1,
|
|
9366
9639
|
height: size$1,
|
|
9367
9640
|
viewBox: "0 0 24 24",
|
|
9368
|
-
|
|
9641
|
+
fill: "none",
|
|
9642
|
+
stroke: "currentColor",
|
|
9643
|
+
strokeWidth: "2",
|
|
9644
|
+
strokeLinecap: "round",
|
|
9645
|
+
strokeLinejoin: "round",
|
|
9646
|
+
className: cn("shrink-0", className),
|
|
9369
9647
|
...props,
|
|
9370
|
-
children: /* @__PURE__ */ jsx("path", { d: "
|
|
9648
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }), /* @__PURE__ */ jsx("path", { d: "m15 5 4 4" })]
|
|
9371
9649
|
});
|
|
9372
9650
|
|
|
9373
9651
|
//#endregion
|
|
9374
|
-
//#region src/Table/
|
|
9375
|
-
const
|
|
9376
|
-
const
|
|
9377
|
-
const
|
|
9378
|
-
const
|
|
9379
|
-
const
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9652
|
+
//#region src/Table/TableEditableCell.tsx
|
|
9653
|
+
const EditableCellPopover = ({ cellRef, open, onOpenChange, className, children }) => {
|
|
9654
|
+
const popoverRef = useRef(null);
|
|
9655
|
+
const [triggerWidth, setTriggerWidth] = useState(0);
|
|
9656
|
+
const [tableWidth, setTableWidth] = useState(0);
|
|
9657
|
+
const [verticalOffset, setVerticalOffset] = useState(0);
|
|
9658
|
+
useLayoutEffect(() => {
|
|
9659
|
+
if (!open || !cellRef.current) return;
|
|
9660
|
+
const cell = cellRef.current;
|
|
9661
|
+
const rect = cell.getBoundingClientRect();
|
|
9662
|
+
const rowRect = cell.parentElement?.getBoundingClientRect();
|
|
9663
|
+
const offset$1 = (rowRect?.top ?? 0) - (rowRect?.bottom ?? 0);
|
|
9664
|
+
setTriggerWidth(rect.width);
|
|
9665
|
+
setVerticalOffset(offset$1);
|
|
9666
|
+
setTableWidth(cell.closest("[role=\"grid\"]")?.clientWidth ?? 0);
|
|
9667
|
+
}, [cellRef, open]);
|
|
9668
|
+
return /* @__PURE__ */ jsx(Popover, {
|
|
9669
|
+
ref: popoverRef,
|
|
9670
|
+
isOpen: open,
|
|
9671
|
+
onOpenChange,
|
|
9672
|
+
triggerRef: cellRef,
|
|
9673
|
+
offset: verticalOffset,
|
|
9674
|
+
placement: "bottom start",
|
|
9675
|
+
style: {
|
|
9676
|
+
minWidth: `min(${triggerWidth}px, ${tableWidth}px)`,
|
|
9677
|
+
maxWidth: tableWidth
|
|
9678
|
+
},
|
|
9679
|
+
className,
|
|
9680
|
+
children
|
|
9681
|
+
});
|
|
9682
|
+
};
|
|
9683
|
+
const TableEditableCell = ({ children, field, saving = false, onSubmit, onCancel, disabled = false, action, alignX, overflow: cellOverflow }) => {
|
|
9684
|
+
const { classNames: classNames$2, allowTextSelection: tableAllowTextSelection, alignY = "middle" } = useTableContext();
|
|
9685
|
+
const { selectionMode } = useTableOptions();
|
|
9686
|
+
const hasSelection = selectionMode !== "none";
|
|
9687
|
+
const isSmallScreen = useSmallScreen();
|
|
9688
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
9689
|
+
const [open, setOpen] = useState(false);
|
|
9690
|
+
const submittedRef = useRef(false);
|
|
9691
|
+
const cellRef = useRef(null);
|
|
9692
|
+
const formRef = useRef(null);
|
|
9693
|
+
const handleFormRef = useCallback((node$1) => {
|
|
9694
|
+
formRef.current = node$1;
|
|
9695
|
+
if (node$1) requestAnimationFrame(() => {
|
|
9696
|
+
const activeElement = getActiveElement(getOwnerDocument(node$1));
|
|
9697
|
+
if (activeElement && nodeContains(node$1, activeElement) && (activeElement instanceof HTMLInputElement || activeElement instanceof HTMLTextAreaElement) && typeof activeElement.select === "function") activeElement.select();
|
|
9698
|
+
});
|
|
9699
|
+
}, []);
|
|
9700
|
+
const handleSubmit = (e$1) => {
|
|
9701
|
+
e$1.preventDefault();
|
|
9702
|
+
submittedRef.current = true;
|
|
9703
|
+
onSubmit?.(e$1);
|
|
9704
|
+
setOpen(false);
|
|
9705
|
+
};
|
|
9706
|
+
const handleCancel = () => {
|
|
9707
|
+
submittedRef.current = true;
|
|
9708
|
+
onCancel?.();
|
|
9709
|
+
setOpen(false);
|
|
9710
|
+
};
|
|
9711
|
+
const handleOpenChange = (isOpen) => {
|
|
9712
|
+
if (!isOpen && !submittedRef.current) onCancel?.();
|
|
9713
|
+
submittedRef.current = false;
|
|
9714
|
+
setOpen(isOpen);
|
|
9715
|
+
};
|
|
9716
|
+
const renderField = () => typeof field === "function" ? field() : field;
|
|
9717
|
+
const cancelButton = /* @__PURE__ */ jsx(Button, {
|
|
9718
|
+
className: classNames$2.editCancel,
|
|
9719
|
+
onPress: handleCancel,
|
|
9720
|
+
"aria-label": isSmallScreen ? void 0 : stringFormatter.format("cancel"),
|
|
9721
|
+
children: isSmallScreen ? stringFormatter.format("cancel") : /* @__PURE__ */ jsx(X, {})
|
|
9722
|
+
});
|
|
9723
|
+
const saveButton = /* @__PURE__ */ jsx(Button, {
|
|
9724
|
+
className: classNames$2.editSave,
|
|
9725
|
+
type: "submit",
|
|
9726
|
+
isPending: saving,
|
|
9727
|
+
"aria-label": isSmallScreen ? void 0 : stringFormatter.format("save"),
|
|
9728
|
+
children: isSmallScreen ? stringFormatter.format("save") : /* @__PURE__ */ jsx(Check, {})
|
|
9729
|
+
});
|
|
9730
|
+
return /* @__PURE__ */ jsx(Cell, {
|
|
9731
|
+
ref: cellRef,
|
|
9732
|
+
className: cn(classNames$2.cell, verticalAlign[alignY]),
|
|
9733
|
+
children: ({ columnIndex }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
|
|
9734
|
+
className: "group/editable-cell flex items-center gap-1",
|
|
9735
|
+
children: [/* @__PURE__ */ jsx(TableCellContent, {
|
|
9736
|
+
columnIndex,
|
|
9737
|
+
alignX,
|
|
9738
|
+
cellOverflow,
|
|
9739
|
+
className: "min-w-0 flex-1",
|
|
9740
|
+
allowTextSelection: !hasSelection || tableAllowTextSelection,
|
|
9741
|
+
children
|
|
9742
|
+
}), !disabled && /* @__PURE__ */ jsx("div", {
|
|
9743
|
+
className: "shrink-0 opacity-0 not-[@media_((hover:_hover)_and_(pointer:_fine))]:opacity-100 [.group\\/editable-cell:has(:focus-visible)_&]:opacity-100 [[role=row]:hover_&]:opacity-100",
|
|
9744
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
9745
|
+
className: classNames$2.editTrigger,
|
|
9746
|
+
"aria-label": stringFormatter.format("edit"),
|
|
9747
|
+
onPress: () => setOpen(true),
|
|
9748
|
+
children: /* @__PURE__ */ jsx(Pencil, {})
|
|
9749
|
+
})
|
|
9750
|
+
})]
|
|
9751
|
+
}), isSmallScreen ? /* @__PURE__ */ jsx(_Dialog, {
|
|
9752
|
+
open,
|
|
9753
|
+
onOpenChange: handleOpenChange,
|
|
9754
|
+
children: /* @__PURE__ */ jsxs(_Form, {
|
|
9755
|
+
unstyled: true,
|
|
9756
|
+
ref: handleFormRef,
|
|
9757
|
+
action,
|
|
9758
|
+
onSubmit: handleSubmit,
|
|
9759
|
+
children: [
|
|
9760
|
+
/* @__PURE__ */ jsx(_Dialog.Title, { children: stringFormatter.format("editCell") }),
|
|
9761
|
+
/* @__PURE__ */ jsx(_Dialog.Content, { children: /* @__PURE__ */ jsx(FocusScope, {
|
|
9762
|
+
autoFocus: true,
|
|
9763
|
+
restoreFocus: true,
|
|
9764
|
+
children: renderField()
|
|
9765
|
+
}) }),
|
|
9766
|
+
/* @__PURE__ */ jsxs(_Dialog.Actions, { children: [cancelButton, saveButton] })
|
|
9767
|
+
]
|
|
9768
|
+
})
|
|
9769
|
+
}) : /* @__PURE__ */ jsx(EditableCellPopover, {
|
|
9770
|
+
cellRef,
|
|
9771
|
+
open,
|
|
9772
|
+
onOpenChange: handleOpenChange,
|
|
9773
|
+
className: classNames$2.editablePopover,
|
|
9774
|
+
children: /* @__PURE__ */ jsx(_Form, {
|
|
9775
|
+
unstyled: true,
|
|
9776
|
+
ref: handleFormRef,
|
|
9777
|
+
action,
|
|
9778
|
+
onSubmit: handleSubmit,
|
|
9779
|
+
children: /* @__PURE__ */ jsxs(FocusScope, {
|
|
9780
|
+
autoFocus: true,
|
|
9781
|
+
children: [
|
|
9782
|
+
renderField(),
|
|
9783
|
+
cancelButton,
|
|
9784
|
+
saveButton
|
|
9785
|
+
]
|
|
9786
|
+
})
|
|
9787
|
+
})
|
|
9788
|
+
})] })
|
|
9397
9789
|
});
|
|
9398
9790
|
};
|
|
9399
9791
|
|
|
9400
9792
|
//#endregion
|
|
9401
9793
|
//#region src/Table/TableHeader.tsx
|
|
9402
|
-
const TableHeader$1 = ({
|
|
9403
|
-
const {
|
|
9794
|
+
const TableHeader$1 = ({ sticky, columns, children, ...props }) => {
|
|
9795
|
+
const { selectionBehavior, selectionMode, allowsDragging } = useTableOptions();
|
|
9404
9796
|
const { classNames: classNames$2 } = useTableContext();
|
|
9405
|
-
return /* @__PURE__ */
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9797
|
+
return /* @__PURE__ */ jsxs(TableHeader, {
|
|
9798
|
+
className: cn(classNames$2.head, sticky && "sticky top-0 z-1"),
|
|
9799
|
+
...props,
|
|
9800
|
+
children: [
|
|
9801
|
+
allowsDragging && /* @__PURE__ */ jsx(Column, {
|
|
9802
|
+
className: classNames$2.column,
|
|
9803
|
+
minWidth: 24,
|
|
9804
|
+
width: 24
|
|
9805
|
+
}),
|
|
9806
|
+
selectionBehavior === "toggle" && /* @__PURE__ */ jsx(Column, {
|
|
9807
|
+
minWidth: 36,
|
|
9808
|
+
width: 36,
|
|
9809
|
+
className: classNames$2.column,
|
|
9810
|
+
children: selectionMode === "multiple" && /* @__PURE__ */ jsx(_Checkbox, { slot: "selection" })
|
|
9811
|
+
}),
|
|
9812
|
+
/* @__PURE__ */ jsx(Collection, {
|
|
9813
|
+
items: columns,
|
|
9814
|
+
children
|
|
9815
|
+
})
|
|
9816
|
+
]
|
|
9410
9817
|
});
|
|
9411
9818
|
};
|
|
9412
9819
|
|
|
9413
9820
|
//#endregion
|
|
9414
|
-
//#region src/
|
|
9415
|
-
const
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9821
|
+
//#region src/icons/GripVertical.tsx
|
|
9822
|
+
const GripVertical = ({ size: size$1 = 24, className, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
9823
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9824
|
+
width: size$1,
|
|
9825
|
+
height: size$1,
|
|
9826
|
+
fill: "none",
|
|
9827
|
+
stroke: "currentColor",
|
|
9828
|
+
strokeLinecap: "round",
|
|
9829
|
+
strokeLinejoin: "round",
|
|
9830
|
+
strokeWidth: 2,
|
|
9831
|
+
viewBox: "0 0 24 24",
|
|
9832
|
+
className: cn("shrink-0", className),
|
|
9833
|
+
...props,
|
|
9834
|
+
children: [
|
|
9835
|
+
/* @__PURE__ */ jsx("circle", {
|
|
9836
|
+
cx: 9,
|
|
9837
|
+
cy: 12,
|
|
9838
|
+
r: 1
|
|
9839
|
+
}),
|
|
9840
|
+
/* @__PURE__ */ jsx("circle", {
|
|
9841
|
+
cx: 9,
|
|
9842
|
+
cy: 5,
|
|
9843
|
+
r: 1
|
|
9844
|
+
}),
|
|
9845
|
+
/* @__PURE__ */ jsx("circle", {
|
|
9846
|
+
cx: 9,
|
|
9847
|
+
cy: 19,
|
|
9848
|
+
r: 1
|
|
9849
|
+
}),
|
|
9850
|
+
/* @__PURE__ */ jsx("circle", {
|
|
9851
|
+
cx: 15,
|
|
9852
|
+
cy: 12,
|
|
9853
|
+
r: 1
|
|
9854
|
+
}),
|
|
9855
|
+
/* @__PURE__ */ jsx("circle", {
|
|
9856
|
+
cx: 15,
|
|
9857
|
+
cy: 5,
|
|
9858
|
+
r: 1
|
|
9859
|
+
}),
|
|
9860
|
+
/* @__PURE__ */ jsx("circle", {
|
|
9861
|
+
cx: 15,
|
|
9862
|
+
cy: 19,
|
|
9863
|
+
r: 1
|
|
9864
|
+
})
|
|
9865
|
+
]
|
|
9866
|
+
});
|
|
9427
9867
|
|
|
9428
9868
|
//#endregion
|
|
9429
9869
|
//#region src/Table/TableRow.tsx
|
|
9430
|
-
const TableRow = ({ children,
|
|
9431
|
-
|
|
9432
|
-
const
|
|
9433
|
-
const { variant, size: size$1 } = row.props;
|
|
9870
|
+
const TableRow = ({ id, columns, children, variant: variantProp, size: sizeProp, ...otherProps }) => {
|
|
9871
|
+
let { selectionBehavior, allowsDragging } = useTableOptions();
|
|
9872
|
+
const context = useTableContext();
|
|
9434
9873
|
const classNames$2 = useClassNames({
|
|
9435
9874
|
component: "Table",
|
|
9436
|
-
variant:
|
|
9437
|
-
size:
|
|
9438
|
-
});
|
|
9439
|
-
const { rowProps, isPressed } = useTableRow({ node: row }, state, ref);
|
|
9440
|
-
const disabled = state.disabledKeys.has(row.key);
|
|
9441
|
-
const selected = state.selectionManager.isSelected(row.key);
|
|
9442
|
-
const { focusProps, isFocusVisible } = useFocusRing();
|
|
9443
|
-
const { hoverProps, isHovered } = useHover({ isDisabled: disabled || !interactive });
|
|
9444
|
-
const stateProps = useStateProps({
|
|
9445
|
-
disabled,
|
|
9446
|
-
selected,
|
|
9447
|
-
hover: isHovered,
|
|
9448
|
-
focusVisible: isFocusVisible,
|
|
9449
|
-
active: isPressed
|
|
9450
|
-
});
|
|
9451
|
-
return /* @__PURE__ */ jsx("tr", {
|
|
9452
|
-
ref,
|
|
9453
|
-
className: cn([!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"], classNames$2?.row),
|
|
9454
|
-
...mergeProps(rowProps, focusProps, hoverProps),
|
|
9455
|
-
...stateProps,
|
|
9456
|
-
"data-rac": true,
|
|
9457
|
-
children
|
|
9875
|
+
variant: variantProp ?? context.variant,
|
|
9876
|
+
size: sizeProp ?? context.size
|
|
9458
9877
|
});
|
|
9459
|
-
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9476
|
-
|
|
9477
|
-
|
|
9478
|
-
...stateProps,
|
|
9479
|
-
align,
|
|
9480
|
-
"data-rac": true,
|
|
9481
|
-
children: /* @__PURE__ */ jsx(_Checkbox, { ...checkboxProps })
|
|
9878
|
+
return /* @__PURE__ */ jsxs(Row, {
|
|
9879
|
+
id,
|
|
9880
|
+
className: cn("group/row", classNames$2.row),
|
|
9881
|
+
...otherProps,
|
|
9882
|
+
children: [
|
|
9883
|
+
allowsDragging && /* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsx(Button, {
|
|
9884
|
+
slot: "drag",
|
|
9885
|
+
className: cn("grid size-full place-items-center", classNames$2.dragHandle),
|
|
9886
|
+
children: /* @__PURE__ */ jsx(GripVertical, {})
|
|
9887
|
+
}) }),
|
|
9888
|
+
selectionBehavior === "toggle" && /* @__PURE__ */ jsx(Cell, {
|
|
9889
|
+
className: classNames$2.cell,
|
|
9890
|
+
children: /* @__PURE__ */ jsx(_Checkbox, { slot: "selection" })
|
|
9891
|
+
}),
|
|
9892
|
+
/* @__PURE__ */ jsx(Collection, {
|
|
9893
|
+
items: columns,
|
|
9894
|
+
children
|
|
9895
|
+
})
|
|
9896
|
+
]
|
|
9482
9897
|
});
|
|
9483
9898
|
};
|
|
9484
9899
|
|
|
9485
9900
|
//#endregion
|
|
9486
9901
|
//#region src/Table/Table.tsx
|
|
9487
|
-
const
|
|
9488
|
-
const interactive = selectionMode !== "none";
|
|
9489
|
-
const tableRef = useRef(null);
|
|
9490
|
-
const state = useTableState({
|
|
9491
|
-
...props,
|
|
9492
|
-
selectionMode,
|
|
9493
|
-
showSelectionCheckboxes: selectionMode === "multiple" && props.selectionBehavior !== "replace"
|
|
9494
|
-
});
|
|
9495
|
-
/**
|
|
9496
|
-
* Behavior is a bit flacky with the table when using a keyboard
|
|
9497
|
-
* so we test here for undefined here to be save.
|
|
9498
|
-
*/
|
|
9499
|
-
if (disableKeyboardNavigation !== void 0) state.isKeyboardNavigationDisabled = disableKeyboardNavigation;
|
|
9500
|
-
const { gridProps } = useTable(props, state, tableRef);
|
|
9902
|
+
const _Table = ({ variant, size: size$1, overflow = "wrap", allowTextSelection = false, alignY = "middle", ...props }) => {
|
|
9501
9903
|
const classNames$2 = useClassNames({
|
|
9502
9904
|
component: "Table",
|
|
9503
9905
|
variant,
|
|
9504
9906
|
size: size$1
|
|
9505
9907
|
});
|
|
9506
|
-
const
|
|
9908
|
+
const ctx = useMemo(() => ({
|
|
9909
|
+
classNames: classNames$2,
|
|
9910
|
+
variant,
|
|
9911
|
+
size: size$1,
|
|
9912
|
+
overflow,
|
|
9913
|
+
allowTextSelection,
|
|
9914
|
+
alignY
|
|
9915
|
+
}), [
|
|
9916
|
+
classNames$2,
|
|
9917
|
+
variant,
|
|
9918
|
+
size$1,
|
|
9919
|
+
overflow,
|
|
9920
|
+
allowTextSelection,
|
|
9921
|
+
alignY
|
|
9922
|
+
]);
|
|
9507
9923
|
return /* @__PURE__ */ jsx(TableContext.Provider, {
|
|
9508
|
-
value:
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
ref: tableRef,
|
|
9517
|
-
"data-rac": true,
|
|
9518
|
-
className: cn(
|
|
9519
|
-
"group/table border-collapse",
|
|
9520
|
-
/**
|
|
9521
|
-
* Prevents wide tables from causing overlays to become scrollable on
|
|
9522
|
-
* small screens, ensuring overlays remain fixed as intended.
|
|
9523
|
-
*/
|
|
9524
|
-
"max-[600px]:[[aria-hidden=\"true\"]_&]:overflow-hidden",
|
|
9525
|
-
stretch ? "table w-full" : "block",
|
|
9526
|
-
classNames$2.table
|
|
9527
|
-
),
|
|
9528
|
-
...gridProps,
|
|
9529
|
-
children: [/* @__PURE__ */ jsx(TableHeader$1, {
|
|
9530
|
-
stickyHeader,
|
|
9531
|
-
children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx(TableHeaderRow, {
|
|
9532
|
-
item: headerRow,
|
|
9533
|
-
className: classNames$2.headerRow,
|
|
9534
|
-
children: [...collection.getChildren(headerRow.key)].map((column$1) => column$1.props?.isSelectionCell ? /* @__PURE__ */ jsx(TableSelectAllCell, {
|
|
9535
|
-
width: column$1.props?.width,
|
|
9536
|
-
column: column$1,
|
|
9537
|
-
align: column$1.props?.align
|
|
9538
|
-
}, column$1.key) : /* @__PURE__ */ jsx(TableColumnHeader, {
|
|
9539
|
-
width: column$1.props?.width,
|
|
9540
|
-
column: column$1,
|
|
9541
|
-
align: column$1.props?.align
|
|
9542
|
-
}, column$1.key))
|
|
9543
|
-
}, headerRow.key))
|
|
9544
|
-
}), /* @__PURE__ */ jsx(TableBody$1, {
|
|
9545
|
-
className: classNames$2.body,
|
|
9546
|
-
emptyState,
|
|
9547
|
-
children: [...collection.rows.map((row) => row.type === "item" && /* @__PURE__ */ jsx(TableRow, {
|
|
9548
|
-
row,
|
|
9549
|
-
children: [...collection.getChildren(row.key)].map((cell, index$1) => {
|
|
9550
|
-
const currentColumn = collection.columns[index$1];
|
|
9551
|
-
return cell.props?.isSelectionCell ? /* @__PURE__ */ jsx(TableCheckboxCell, {
|
|
9552
|
-
cell,
|
|
9553
|
-
alignY
|
|
9554
|
-
}, cell.key) : /* @__PURE__ */ jsx(TableCell, {
|
|
9555
|
-
align: currentColumn.props?.align,
|
|
9556
|
-
alignY,
|
|
9557
|
-
cell
|
|
9558
|
-
}, cell.key);
|
|
9559
|
-
})
|
|
9560
|
-
}, row.key))]
|
|
9561
|
-
})]
|
|
9924
|
+
value: ctx,
|
|
9925
|
+
children: /* @__PURE__ */ jsx(ResizableTableContainer, {
|
|
9926
|
+
className: "w-full",
|
|
9927
|
+
children: /* @__PURE__ */ jsx(Table$1, {
|
|
9928
|
+
className: cn("group/table", classNames$2.table),
|
|
9929
|
+
selectionBehavior: "toggle",
|
|
9930
|
+
...props
|
|
9931
|
+
})
|
|
9562
9932
|
})
|
|
9563
9933
|
});
|
|
9564
9934
|
};
|
|
9565
|
-
Table
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9935
|
+
const Table = Object.assign(_Table, {
|
|
9936
|
+
Header: TableHeader$1,
|
|
9937
|
+
Column: TableColumn,
|
|
9938
|
+
Body: TableBody$1,
|
|
9939
|
+
Row: TableRow,
|
|
9940
|
+
Cell: TableCell,
|
|
9941
|
+
EditableCell: TableEditableCell,
|
|
9942
|
+
renderDropIndicator,
|
|
9943
|
+
renderDragPreview
|
|
9944
|
+
});
|
|
9570
9945
|
|
|
9571
9946
|
//#endregion
|
|
9572
9947
|
//#region src/Tabs/Context.ts
|
|
@@ -9586,11 +9961,11 @@ const _Tab = (props) => {
|
|
|
9586
9961
|
|
|
9587
9962
|
//#endregion
|
|
9588
9963
|
//#region src/Tabs/TabList.tsx
|
|
9589
|
-
const _TabList = (
|
|
9964
|
+
const _TabList = (props) => {
|
|
9590
9965
|
const { classNames: classNames$2 } = useTabContext();
|
|
9591
9966
|
return /* @__PURE__ */ jsx(TabList, {
|
|
9592
9967
|
...props,
|
|
9593
|
-
className: cn("flex",
|
|
9968
|
+
className: cn("flex", classNames$2.tabsList),
|
|
9594
9969
|
children: props.children
|
|
9595
9970
|
});
|
|
9596
9971
|
};
|
|
@@ -9608,7 +9983,7 @@ const _TabPanel = (props) => {
|
|
|
9608
9983
|
|
|
9609
9984
|
//#endregion
|
|
9610
9985
|
//#region src/Tabs/Tabs.tsx
|
|
9611
|
-
const _Tabs = ({ disabled, variant, size: size$1 = "medium"
|
|
9986
|
+
const _Tabs = ({ disabled, variant, size: size$1 = "medium", ...rest }) => {
|
|
9612
9987
|
const props = {
|
|
9613
9988
|
isDisabled: disabled,
|
|
9614
9989
|
...rest
|
|
@@ -9665,7 +10040,7 @@ const TagGroupRemoveAll = ({ className, onRemove }) => {
|
|
|
9665
10040
|
|
|
9666
10041
|
//#endregion
|
|
9667
10042
|
//#region src/TagGroup/TagGroup.tsx
|
|
9668
|
-
const _TagGroup = ({ items, children, emptyState, variant, size: size$1, name, removeAll
|
|
10043
|
+
const _TagGroup = ({ items, children, emptyState, variant, size: size$1, name, removeAll, ...rest }) => {
|
|
9669
10044
|
const classNames$2 = useClassNames({
|
|
9670
10045
|
component: "Tag",
|
|
9671
10046
|
variant,
|
|
@@ -9691,7 +10066,7 @@ const _TagGroup = ({ items, children, emptyState, variant, size: size$1, name, r
|
|
|
9691
10066
|
|
|
9692
10067
|
//#endregion
|
|
9693
10068
|
//#region src/TagGroup/Tag.tsx
|
|
9694
|
-
const _Tag = ({ variant, size: size$1, children, disabled
|
|
10069
|
+
const _Tag = ({ variant, size: size$1, children, disabled, ...rest }) => {
|
|
9695
10070
|
let textValue = typeof children === "string" ? children : void 0;
|
|
9696
10071
|
const classNames$2 = useClassNames({
|
|
9697
10072
|
component: "Tag",
|
|
@@ -9712,31 +10087,140 @@ const _Tag = ({ variant, size: size$1, children, disabled,...rest }) => {
|
|
|
9712
10087
|
_Tag.Group = _TagGroup;
|
|
9713
10088
|
|
|
9714
10089
|
//#endregion
|
|
9715
|
-
//#region src/
|
|
9716
|
-
const
|
|
10090
|
+
//#region src/TagField/TagField.tsx
|
|
10091
|
+
const TagDisplay = ({ placeholder, classNames: classNames$2, disabled }) => {
|
|
10092
|
+
const state = useContext(SelectStateContext);
|
|
10093
|
+
if (!state) return null;
|
|
10094
|
+
const selectedKeys = [...state.selectionManager.selectedKeys];
|
|
10095
|
+
if (selectedKeys.length === 0) return /* @__PURE__ */ jsx("span", { children: placeholder });
|
|
10096
|
+
const selectedItems = [];
|
|
10097
|
+
for (const key of selectedKeys) {
|
|
10098
|
+
const item = state.collection.getItem(key);
|
|
10099
|
+
if (item) selectedItems.push({
|
|
10100
|
+
id: key,
|
|
10101
|
+
textValue: item.textValue
|
|
10102
|
+
});
|
|
10103
|
+
}
|
|
10104
|
+
return /* @__PURE__ */ jsx(TagGroup, {
|
|
10105
|
+
"aria-label": "Selected items",
|
|
10106
|
+
className: classNames$2.tagGroup,
|
|
10107
|
+
onRemove: disabled ? void 0 : (keys) => {
|
|
10108
|
+
const currentKeys = new Set(state.selectionManager.selectedKeys);
|
|
10109
|
+
for (const key of keys) currentKeys.delete(key);
|
|
10110
|
+
state.selectionManager.setSelectedKeys(currentKeys);
|
|
10111
|
+
},
|
|
10112
|
+
children: /* @__PURE__ */ jsx(TagList, {
|
|
10113
|
+
items: selectedItems,
|
|
10114
|
+
className: classNames$2.listItems,
|
|
10115
|
+
children: (item) => /* @__PURE__ */ jsx(_Tag, {
|
|
10116
|
+
id: item.id,
|
|
10117
|
+
disabled,
|
|
10118
|
+
children: item.textValue
|
|
10119
|
+
})
|
|
10120
|
+
})
|
|
10121
|
+
});
|
|
10122
|
+
};
|
|
10123
|
+
const TagFieldDropdown = ({ items, children, placeholder, emptyState }) => {
|
|
10124
|
+
const { contains } = useFilter({ sensitivity: "base" });
|
|
10125
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
10126
|
+
return /* @__PURE__ */ jsxs(Autocomplete, {
|
|
10127
|
+
filter: contains,
|
|
10128
|
+
children: [/* @__PURE__ */ jsx(SearchField, {
|
|
10129
|
+
"aria-label": "Search",
|
|
10130
|
+
autoFocus: true,
|
|
10131
|
+
children: /* @__PURE__ */ jsx(SearchInput, { placeholder })
|
|
10132
|
+
}), /* @__PURE__ */ jsx(_ListBox, {
|
|
10133
|
+
items,
|
|
10134
|
+
renderEmptyState: () => emptyState ?? /* @__PURE__ */ jsx("div", {
|
|
10135
|
+
className: "flex items-center",
|
|
10136
|
+
children: stringFormatter.format("noResultsFound")
|
|
10137
|
+
}),
|
|
10138
|
+
children
|
|
10139
|
+
})]
|
|
10140
|
+
});
|
|
10141
|
+
};
|
|
10142
|
+
const _TagField = forwardRef(function TagField$1({ disabled, required, items, variant, size: size$1, error, open, children, placeholder, emptyState, ...rest }, ref) {
|
|
10143
|
+
const triggerRef = useRef(null);
|
|
10144
|
+
const [triggerWidth, setTriggerWidth] = useState(0);
|
|
10145
|
+
const isSmallScreen = useSmallScreen();
|
|
10146
|
+
useLayoutEffect(() => {
|
|
10147
|
+
const el = triggerRef.current;
|
|
10148
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
10149
|
+
const observer = new ResizeObserver(() => {
|
|
10150
|
+
setTriggerWidth(el.offsetWidth);
|
|
10151
|
+
});
|
|
10152
|
+
observer.observe(el);
|
|
10153
|
+
return () => observer.disconnect();
|
|
10154
|
+
}, []);
|
|
10155
|
+
const props = {
|
|
10156
|
+
selectionMode: "multiple",
|
|
10157
|
+
isDisabled: disabled,
|
|
10158
|
+
isInvalid: error,
|
|
10159
|
+
isOpen: open,
|
|
10160
|
+
isRequired: required,
|
|
10161
|
+
...rest
|
|
10162
|
+
};
|
|
9717
10163
|
const classNames$2 = useClassNames({
|
|
9718
|
-
component: "
|
|
10164
|
+
component: "TagField",
|
|
9719
10165
|
variant,
|
|
9720
10166
|
size: size$1
|
|
9721
10167
|
});
|
|
9722
|
-
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
return /* @__PURE__ */ jsx(Component$1, {
|
|
10168
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
10169
|
+
return /* @__PURE__ */ jsxs(FieldBase, {
|
|
10170
|
+
as: Select$1,
|
|
10171
|
+
ref,
|
|
10172
|
+
variant,
|
|
10173
|
+
size: size$1,
|
|
9729
10174
|
...props,
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
10175
|
+
children: [/* @__PURE__ */ jsxs(Group, {
|
|
10176
|
+
ref: triggerRef,
|
|
10177
|
+
className: cn("w-(--field-width) max-w-full min-w-0", classNames$2.trigger),
|
|
10178
|
+
children: [/* @__PURE__ */ jsx(TagDisplay, {
|
|
10179
|
+
placeholder,
|
|
10180
|
+
classNames: classNames$2,
|
|
10181
|
+
disabled
|
|
10182
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
10183
|
+
className: classNames$2.button,
|
|
10184
|
+
children: /* @__PURE__ */ jsx(ChevronsVertical, {})
|
|
10185
|
+
})]
|
|
10186
|
+
}), isSmallScreen ? /* @__PURE__ */ jsxs(Tray, { children: [
|
|
10187
|
+
/* @__PURE__ */ jsx(Tray.Title, { children: rest.label }),
|
|
10188
|
+
/* @__PURE__ */ jsx(Tray.Content, {
|
|
10189
|
+
className: "flex flex-col gap-2",
|
|
10190
|
+
children: /* @__PURE__ */ jsx(TagFieldDropdown, {
|
|
10191
|
+
items,
|
|
10192
|
+
placeholder,
|
|
10193
|
+
emptyState,
|
|
10194
|
+
children
|
|
10195
|
+
})
|
|
10196
|
+
}),
|
|
10197
|
+
/* @__PURE__ */ jsx(Tray.Actions, { children: /* @__PURE__ */ jsx(_Button, {
|
|
10198
|
+
slot: "close",
|
|
10199
|
+
children: stringFormatter.format("close")
|
|
10200
|
+
}) })
|
|
10201
|
+
] }) : /* @__PURE__ */ jsx(_Popover, {
|
|
10202
|
+
triggerRef,
|
|
10203
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
10204
|
+
className: classNames$2.container,
|
|
10205
|
+
style: createVar({ "tagfield-trigger-width": triggerWidth ? `${triggerWidth}px` : void 0 }),
|
|
10206
|
+
children: /* @__PURE__ */ jsx(TagFieldDropdown, {
|
|
10207
|
+
items,
|
|
10208
|
+
placeholder,
|
|
10209
|
+
emptyState,
|
|
10210
|
+
children
|
|
10211
|
+
})
|
|
10212
|
+
})
|
|
10213
|
+
})]
|
|
9734
10214
|
});
|
|
9735
|
-
};
|
|
10215
|
+
});
|
|
10216
|
+
const TagField = Object.assign(_TagField, {
|
|
10217
|
+
Option: _ListBox.Item,
|
|
10218
|
+
Section: _ListBox.Section
|
|
10219
|
+
});
|
|
9736
10220
|
|
|
9737
10221
|
//#endregion
|
|
9738
10222
|
//#region src/TextArea/TextArea.tsx
|
|
9739
|
-
const _TextArea = forwardRef(({ variant, size: size$1, required, disabled, readOnly, error, rows
|
|
10223
|
+
const _TextArea = forwardRef(({ variant, size: size$1, required, disabled, readOnly, error, rows, ...rest }, ref) => {
|
|
9740
10224
|
const classNames$2 = useClassNames({
|
|
9741
10225
|
component: "TextArea",
|
|
9742
10226
|
variant,
|
|
@@ -9752,7 +10236,7 @@ const _TextArea = forwardRef(({ variant, size: size$1, required, disabled, readO
|
|
|
9752
10236
|
variant,
|
|
9753
10237
|
size: size$1,
|
|
9754
10238
|
children: /* @__PURE__ */ jsx(TextArea, {
|
|
9755
|
-
className: classNames$2,
|
|
10239
|
+
className: cn(classNames$2, "w-(--field-width) max-w-full min-w-0"),
|
|
9756
10240
|
ref,
|
|
9757
10241
|
rows
|
|
9758
10242
|
})
|
|
@@ -9761,7 +10245,7 @@ const _TextArea = forwardRef(({ variant, size: size$1, required, disabled, readO
|
|
|
9761
10245
|
|
|
9762
10246
|
//#endregion
|
|
9763
10247
|
//#region src/TextField/TextField.tsx
|
|
9764
|
-
const _TextField = forwardRef(({ required, disabled, readOnly, error
|
|
10248
|
+
const _TextField = forwardRef(({ required, disabled, readOnly, error, ...rest }, ref) => {
|
|
9765
10249
|
return /* @__PURE__ */ jsx(FieldBase, {
|
|
9766
10250
|
as: TextField,
|
|
9767
10251
|
isDisabled: disabled,
|
|
@@ -9775,7 +10259,7 @@ const _TextField = forwardRef(({ required, disabled, readOnly, error,...rest },
|
|
|
9775
10259
|
|
|
9776
10260
|
//#endregion
|
|
9777
10261
|
//#region src/Tiles/Tiles.tsx
|
|
9778
|
-
const Tiles = ({ space = 0, stretch = false, equalHeight = false, tilesWidth = "250px", children
|
|
10262
|
+
const Tiles = ({ space = 0, stretch = false, equalHeight = false, tilesWidth = "250px", children, ...props }) => {
|
|
9779
10263
|
let column$1 = `min(${tilesWidth}, 100%)`;
|
|
9780
10264
|
/**
|
|
9781
10265
|
* Adding `minmax` with `1fr` will make the tiles distribute the
|
|
@@ -9785,18 +10269,21 @@ const Tiles = ({ space = 0, stretch = false, equalHeight = false, tilesWidth = "
|
|
|
9785
10269
|
if (stretch) column$1 = `minmax(${column$1}, 1fr)`;
|
|
9786
10270
|
return /* @__PURE__ */ jsx("div", {
|
|
9787
10271
|
...props,
|
|
9788
|
-
className: cn("grid
|
|
9789
|
-
style:
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
10272
|
+
className: cn("grid gap-(--space)", "grid-cols-[repeat(auto-fit,var(--column))]", equalHeight && "auto-rows-[1fr]"),
|
|
10273
|
+
style: {
|
|
10274
|
+
...createVar({
|
|
10275
|
+
column: column$1,
|
|
10276
|
+
tilesWidth
|
|
10277
|
+
}),
|
|
10278
|
+
...createSpacingVar("space", `${space}`)
|
|
10279
|
+
},
|
|
9793
10280
|
children
|
|
9794
10281
|
});
|
|
9795
10282
|
};
|
|
9796
10283
|
|
|
9797
10284
|
//#endregion
|
|
9798
10285
|
//#region src/TimeField/TimeField.tsx
|
|
9799
|
-
const _TimeField = forwardRef(({ required, disabled, readOnly, error, variant, size: size$1, width: width$1 = "full"
|
|
10286
|
+
const _TimeField = forwardRef(({ required, disabled, readOnly, error, variant, size: size$1, width: width$1 = "full", ...rest }, ref) => {
|
|
9800
10287
|
const classNames$2 = useClassNames({
|
|
9801
10288
|
component: "DateField",
|
|
9802
10289
|
variant,
|
|
@@ -9813,11 +10300,14 @@ const _TimeField = forwardRef(({ required, disabled, readOnly, error, variant, s
|
|
|
9813
10300
|
isRequired: required,
|
|
9814
10301
|
...rest,
|
|
9815
10302
|
ref,
|
|
9816
|
-
children: /* @__PURE__ */ jsx(
|
|
9817
|
-
className: classNames$2.field,
|
|
9818
|
-
children:
|
|
9819
|
-
className: classNames$2.
|
|
9820
|
-
segment
|
|
10303
|
+
children: /* @__PURE__ */ jsx(Group, {
|
|
10304
|
+
className: cn("w-(--field-width) max-w-full min-w-0", classNames$2.field),
|
|
10305
|
+
children: /* @__PURE__ */ jsx(DateInput, {
|
|
10306
|
+
className: cn("flex flex-1 items-center", classNames$2.input),
|
|
10307
|
+
children: (segment) => /* @__PURE__ */ jsx(DateSegment, {
|
|
10308
|
+
className: classNames$2.segment,
|
|
10309
|
+
segment
|
|
10310
|
+
})
|
|
9821
10311
|
})
|
|
9822
10312
|
})
|
|
9823
10313
|
});
|
|
@@ -9836,7 +10326,7 @@ const Toast = ({ toast }) => {
|
|
|
9836
10326
|
component: "Toast",
|
|
9837
10327
|
variant: toast.content.variant
|
|
9838
10328
|
});
|
|
9839
|
-
const Icon$
|
|
10329
|
+
const Icon$1 = toast.content.variant ? icons[toast.content.variant] : null;
|
|
9840
10330
|
return /* @__PURE__ */ jsxs(UNSTABLE_Toast, {
|
|
9841
10331
|
toast,
|
|
9842
10332
|
className: classNames$2.toast,
|
|
@@ -9844,11 +10334,11 @@ const Toast = ({ toast }) => {
|
|
|
9844
10334
|
children: [/* @__PURE__ */ jsxs(UNSTABLE_ToastContent, {
|
|
9845
10335
|
className: classNames$2.content,
|
|
9846
10336
|
children: [
|
|
9847
|
-
Icon$
|
|
10337
|
+
Icon$1 && /* @__PURE__ */ jsx("div", {
|
|
9848
10338
|
className: classNames$2.icon,
|
|
9849
10339
|
slot: "icon",
|
|
9850
10340
|
"data-testid": "toast-icon",
|
|
9851
|
-
children: /* @__PURE__ */ jsx(Icon$
|
|
10341
|
+
children: /* @__PURE__ */ jsx(Icon$1, { size: "20" })
|
|
9852
10342
|
}),
|
|
9853
10343
|
/* @__PURE__ */ jsx(Text, {
|
|
9854
10344
|
slot: "title",
|
|
@@ -9877,15 +10367,18 @@ const Toast = ({ toast }) => {
|
|
|
9877
10367
|
//#endregion
|
|
9878
10368
|
//#region src/Toast/ToastProvider.tsx
|
|
9879
10369
|
const queue = new UNSTABLE_ToastQueue({ wrapUpdate(fn) {
|
|
9880
|
-
if ("startViewTransition" in document)
|
|
9881
|
-
|
|
9882
|
-
|
|
9883
|
-
|
|
10370
|
+
if ("startViewTransition" in document) {
|
|
10371
|
+
const transition = document.startViewTransition(() => {
|
|
10372
|
+
flushSync(fn);
|
|
10373
|
+
});
|
|
10374
|
+
transition.ready.catch(() => {});
|
|
10375
|
+
transition.finished.catch(() => {});
|
|
10376
|
+
} else fn();
|
|
9884
10377
|
} });
|
|
9885
10378
|
const ToastProvider = ({ position: position$1 = "bottom-right" }) => {
|
|
9886
10379
|
return /* @__PURE__ */ jsx(UNSTABLE_ToastRegion, {
|
|
9887
10380
|
queue,
|
|
9888
|
-
className: `${useClassNames({ component: "Toast" })[position$1]} z-
|
|
10381
|
+
className: `${useClassNames({ component: "Toast" })[position$1]} z-80 gap-2`,
|
|
9889
10382
|
children: ({ toast }) => /* @__PURE__ */ jsx(Toast, { toast })
|
|
9890
10383
|
});
|
|
9891
10384
|
};
|
|
@@ -9926,7 +10419,7 @@ const TooltipArrow = () => {
|
|
|
9926
10419
|
|
|
9927
10420
|
//#endregion
|
|
9928
10421
|
//#region src/Tooltip/TooltipTrigger.tsx
|
|
9929
|
-
const _TooltipTrigger = ({ delay = 1e3, children, disabled, open
|
|
10422
|
+
const _TooltipTrigger = ({ delay = 1e3, children, disabled, open, ...rest }) => {
|
|
9930
10423
|
return /* @__PURE__ */ jsx(TooltipTrigger, {
|
|
9931
10424
|
...rest,
|
|
9932
10425
|
isDisabled: disabled,
|
|
@@ -9938,7 +10431,7 @@ const _TooltipTrigger = ({ delay = 1e3, children, disabled, open,...rest }) => {
|
|
|
9938
10431
|
|
|
9939
10432
|
//#endregion
|
|
9940
10433
|
//#region src/Tooltip/Tooltip.tsx
|
|
9941
|
-
const _Tooltip = ({ children, variant, size: size$1, open
|
|
10434
|
+
const _Tooltip = ({ children, variant, size: size$1, open, ...rest }) => {
|
|
9942
10435
|
const props = {
|
|
9943
10436
|
...rest,
|
|
9944
10437
|
isOpen: open
|
|
@@ -9950,7 +10443,7 @@ const _Tooltip = ({ children, variant, size: size$1, open,...rest }) => {
|
|
|
9950
10443
|
});
|
|
9951
10444
|
return /* @__PURE__ */ jsxs(Tooltip, {
|
|
9952
10445
|
...props,
|
|
9953
|
-
className: cn("group/tooltip", classNames$2.container),
|
|
10446
|
+
className: cn("group/tooltip z-30", classNames$2.container),
|
|
9954
10447
|
children: [/* @__PURE__ */ jsx(OverlayArrow, {
|
|
9955
10448
|
className: classNames$2.arrow,
|
|
9956
10449
|
children: /* @__PURE__ */ jsx(TooltipArrow, {})
|
|
@@ -10107,7 +10600,7 @@ const XLoaderSvg = ({ className }) => {
|
|
|
10107
10600
|
]
|
|
10108
10601
|
});
|
|
10109
10602
|
};
|
|
10110
|
-
const BaseLoader = ({ variant, size: size$1, children, "aria-label": ariaLabel, loaderType = "circle"
|
|
10603
|
+
const BaseLoader = ({ variant, size: size$1, children, "aria-label": ariaLabel, loaderType = "circle", ...props }) => {
|
|
10111
10604
|
const stringFormatter = useLocalizedStringFormatter(intlMessages, "marigold");
|
|
10112
10605
|
const className = useClassNames({
|
|
10113
10606
|
component: "Loader",
|
|
@@ -10160,7 +10653,7 @@ const LoaderSection = (props) => {
|
|
|
10160
10653
|
children: /* @__PURE__ */ jsx(BaseLoader, { ...props })
|
|
10161
10654
|
});
|
|
10162
10655
|
};
|
|
10163
|
-
const Loader = ({ mode, variant
|
|
10656
|
+
const Loader = ({ mode, variant, ...props }) => mode === "fullscreen" ? /* @__PURE__ */ jsx(LoaderFullScreen, {
|
|
10164
10657
|
variant: variant ?? "inverted",
|
|
10165
10658
|
...props
|
|
10166
10659
|
}) : mode === "section" ? /* @__PURE__ */ jsx(LoaderSection, {
|
|
@@ -10171,6 +10664,50 @@ const Loader = ({ mode, variant,...props }) => mode === "fullscreen" ? /* @__PUR
|
|
|
10171
10664
|
...props
|
|
10172
10665
|
});
|
|
10173
10666
|
|
|
10667
|
+
//#endregion
|
|
10668
|
+
//#region src/ToggleButton/Context.tsx
|
|
10669
|
+
const ToggleButtonContext = createContext({});
|
|
10670
|
+
|
|
10671
|
+
//#endregion
|
|
10672
|
+
//#region src/ToggleButton/ToggleButtonGroup.tsx
|
|
10673
|
+
const _ToggleButtonGroup = ({ children, disabled, variant, size: size$1, ...props }) => {
|
|
10674
|
+
const classNames$2 = useClassNames({
|
|
10675
|
+
component: "ToggleButton",
|
|
10676
|
+
variant,
|
|
10677
|
+
size: size$1
|
|
10678
|
+
});
|
|
10679
|
+
return /* @__PURE__ */ jsx(ToggleButtonContext.Provider, {
|
|
10680
|
+
value: {
|
|
10681
|
+
variant,
|
|
10682
|
+
size: size$1
|
|
10683
|
+
},
|
|
10684
|
+
children: /* @__PURE__ */ jsx(ToggleButtonGroup, {
|
|
10685
|
+
className: classNames$2.group,
|
|
10686
|
+
isDisabled: disabled,
|
|
10687
|
+
...props,
|
|
10688
|
+
children
|
|
10689
|
+
})
|
|
10690
|
+
});
|
|
10691
|
+
};
|
|
10692
|
+
|
|
10693
|
+
//#endregion
|
|
10694
|
+
//#region src/ToggleButton/ToggleButton.tsx
|
|
10695
|
+
const _ToggleButton = ({ children, selected, disabled, variant, size: size$1, ...props }) => {
|
|
10696
|
+
const context = useContext(ToggleButtonContext);
|
|
10697
|
+
return /* @__PURE__ */ jsx(ToggleButton, {
|
|
10698
|
+
isSelected: selected,
|
|
10699
|
+
isDisabled: disabled,
|
|
10700
|
+
className: useClassNames({
|
|
10701
|
+
component: "ToggleButton",
|
|
10702
|
+
variant: variant ?? context.variant,
|
|
10703
|
+
size: size$1 ?? context.size
|
|
10704
|
+
}).button,
|
|
10705
|
+
...props,
|
|
10706
|
+
children
|
|
10707
|
+
});
|
|
10708
|
+
};
|
|
10709
|
+
_ToggleButton.Group = _ToggleButtonGroup;
|
|
10710
|
+
|
|
10174
10711
|
//#endregion
|
|
10175
10712
|
//#region src/utils/form.utils.ts
|
|
10176
10713
|
/**
|
|
@@ -10188,4 +10725,4 @@ const parseFormData = (e$1) => {
|
|
|
10188
10725
|
};
|
|
10189
10726
|
|
|
10190
10727
|
//#endregion
|
|
10191
|
-
export { Accordion, AccordionItem, ActionMenu, Aside, Aspect, _Autocomplete as Autocomplete, Badge, _Breadcrumbs as Breadcrumbs, Breakout, _Button as Button, _Calendar as Calendar, Card, Center, _Checkbox as Checkbox, _CheckboxGroup as CheckboxGroup, CloseButton, Collapsible, Columns, _ComboBox as ComboBox, ConfirmationContext, ConfirmationDialog, ConfirmationProvider, Container, _ContextualHelp as ContextualHelp, _DateField as DateField, DateFormat, _DatePicker as DatePicker, _Dialog as Dialog, _Divider as Divider, Drawer, FieldBase, FileField, _Form as Form, Grid, _Headline as Headline, HelpText, I18nProvider, IconButton, Inline, _Input as Input, Inset, _Label as Label, _Link as Link, _LinkButton as LinkButton, List, _ListBox as ListBox, _ListBoxItem as ListBoxItem, Loader, MarigoldProvider, _Menu as Menu, _Modal as Modal, Multiselect, NonModal, _NumberField as NumberField, NumericFormat, OverlayContainerProvider, _Pagination as Pagination, _Popover as Popover, ProgressCircle, ProgressCircleSvg, _Radio as Radio, _RadioGroup as RadioGroup, RouterProvider, Scrollable, _SearchField as SearchField, SearchInput, SectionMessage, Select, _SelectList as SelectList, _SelectListItem as SelectListItem, _Slider as Slider, Split, Stack, _Switch as Switch, Table, _Tabs as Tabs, _Tag as Tag, _TagGroup as TagGroup, _Text as Text, _TextArea as TextArea, _TextField as TextField, ThemeProvider, Tiles, _TimeField as TimeField, Toast, ToastProvider, _Tooltip as Tooltip, Underlay, VisuallyHidden, parseFormData, useAsyncList, useConfirmation, useListData, useTheme, useToast };
|
|
10728
|
+
export { Accordion, AccordionItem, ActionBar, ActionButton, ActionMenu, Aside, Aspect, _Autocomplete as Autocomplete, Badge, _Breadcrumbs as Breadcrumbs, Breakout, _Button as Button, _Calendar as Calendar, Card, Center, _Checkbox as Checkbox, _CheckboxGroup as CheckboxGroup, CloseButton, Collapsible, Columns, _ComboBox as ComboBox, ConfirmationContext, ConfirmationDialog, ConfirmationProvider, Container, _ContextualHelp as ContextualHelp, _DateField as DateField, DateFormat, _DatePicker as DatePicker, _Dialog as Dialog, _Divider as Divider, Drawer, EmptyState, FieldBase, FileField, _Form as Form, Grid, _Headline as Headline, HelpText, I18nProvider, IconButton, Inline, _Input as Input, Inset, _Label as Label, _Link as Link, _LinkButton as LinkButton, List, _ListBox as ListBox, _ListBoxItem as ListBoxItem, Loader, MarigoldProvider, _Menu as Menu, _Modal as Modal, Multiselect, NonModal, _NumberField as NumberField, NumericFormat, OverlayContainerProvider, _Pagination as Pagination, _Popover as Popover, ProgressCircle, ProgressCircleSvg, _Radio as Radio, _RadioGroup as RadioGroup, RouterProvider, Scrollable, _SearchField as SearchField, SearchInput, SectionMessage, Select, _SelectList as SelectList, _SelectListItem as SelectListItem, _Slider as Slider, Split, Stack, _Switch as Switch, Table, _Tabs as Tabs, _Tag as Tag, TagField, _TagGroup as TagGroup, _Text as Text, _TextArea as TextArea, _TextField as TextField, ThemeProvider, Tiles, _TimeField as TimeField, Toast, ToastProvider, _ToggleButton as ToggleButton, _ToggleButtonGroup as ToggleButtonGroup, _Tooltip as Tooltip, Tray, Underlay, VisuallyHidden, parseFormData, useAsyncList, useConfirmation, useDragAndDrop, useListData, useTheme, useToast };
|