@marigold/components 12.0.1 → 12.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +445 -419
- package/dist/index.mjs +267 -240
- package/package.json +25 -25
package/dist/index.mjs
CHANGED
|
@@ -206,7 +206,7 @@ var require_react_is_development = __commonJS({
|
|
|
206
206
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
207
207
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
208
208
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
209
|
-
var
|
|
209
|
+
var Fragment14 = REACT_FRAGMENT_TYPE;
|
|
210
210
|
var Lazy = REACT_LAZY_TYPE;
|
|
211
211
|
var Memo = REACT_MEMO_TYPE;
|
|
212
212
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -265,7 +265,7 @@ var require_react_is_development = __commonJS({
|
|
|
265
265
|
exports.ContextProvider = ContextProvider;
|
|
266
266
|
exports.Element = Element2;
|
|
267
267
|
exports.ForwardRef = ForwardRef;
|
|
268
|
-
exports.Fragment =
|
|
268
|
+
exports.Fragment = Fragment14;
|
|
269
269
|
exports.Lazy = Lazy;
|
|
270
270
|
exports.Memo = Memo;
|
|
271
271
|
exports.Portal = Portal;
|
|
@@ -2870,7 +2870,7 @@ var _DateField = forwardRef19(
|
|
|
2870
2870
|
// src/Calendar/Calendar.tsx
|
|
2871
2871
|
import { useState } from "react";
|
|
2872
2872
|
import { Calendar } from "react-aria-components";
|
|
2873
|
-
import { cn as
|
|
2873
|
+
import { cn as cn44, useClassNames as useClassNames39 } from "@marigold/system";
|
|
2874
2874
|
|
|
2875
2875
|
// src/Calendar/CalendarGrid.tsx
|
|
2876
2876
|
import {
|
|
@@ -2928,9 +2928,14 @@ var _CalendarGrid = () => {
|
|
|
2928
2928
|
};
|
|
2929
2929
|
|
|
2930
2930
|
// src/Calendar/CalendarListBox.tsx
|
|
2931
|
-
import { useContext as
|
|
2931
|
+
import { useContext as useContext14 } from "react";
|
|
2932
2932
|
import { CalendarStateContext as CalendarStateContext2 } from "react-aria-components";
|
|
2933
|
-
import { cn as cn40
|
|
2933
|
+
import { cn as cn40 } from "@marigold/system";
|
|
2934
|
+
|
|
2935
|
+
// src/Calendar/Context.tsx
|
|
2936
|
+
import { createContext as createContext8, useContext as useContext13 } from "react";
|
|
2937
|
+
var CalendarContext = createContext8({});
|
|
2938
|
+
var useCalendarContext = () => useContext13(CalendarContext);
|
|
2934
2939
|
|
|
2935
2940
|
// src/Calendar/useFormattedMonths.tsx
|
|
2936
2941
|
import { useDateFormatter as useDateFormatter2 } from "@react-aria/i18n";
|
|
@@ -2955,16 +2960,16 @@ function CalendarListBox({
|
|
|
2955
2960
|
isDisabled,
|
|
2956
2961
|
setSelectedDropdown
|
|
2957
2962
|
}) {
|
|
2958
|
-
const state =
|
|
2963
|
+
const state = useContext14(CalendarStateContext2);
|
|
2959
2964
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
2960
2965
|
const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
2961
|
-
const {
|
|
2966
|
+
const { classNames: classNames3 } = useCalendarContext();
|
|
2962
2967
|
return /* @__PURE__ */ jsxs22(
|
|
2963
2968
|
"button",
|
|
2964
2969
|
{
|
|
2965
2970
|
disabled: isDisabled,
|
|
2966
2971
|
onClick: () => setSelectedDropdown(type),
|
|
2967
|
-
className: cn40(buttonStyles,
|
|
2972
|
+
className: cn40(buttonStyles, classNames3.select),
|
|
2968
2973
|
"data-testid": type,
|
|
2969
2974
|
children: [
|
|
2970
2975
|
type === "month" ? months[state.focusedDate.month - 1].substring(0, 3) : state.focusedDate.year,
|
|
@@ -2975,10 +2980,10 @@ function CalendarListBox({
|
|
|
2975
2980
|
}
|
|
2976
2981
|
|
|
2977
2982
|
// src/Calendar/MonthControls.tsx
|
|
2978
|
-
import { cn as cn41, useClassNames as
|
|
2983
|
+
import { cn as cn41, useClassNames as useClassNames38 } from "@marigold/system";
|
|
2979
2984
|
import { jsx as jsx68, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2980
2985
|
function MonthControls() {
|
|
2981
|
-
const classNames3 =
|
|
2986
|
+
const classNames3 = useClassNames38({ component: "Calendar" });
|
|
2982
2987
|
return /* @__PURE__ */ jsxs23(
|
|
2983
2988
|
"div",
|
|
2984
2989
|
{
|
|
@@ -3012,33 +3017,40 @@ function MonthControls() {
|
|
|
3012
3017
|
var MonthControls_default = MonthControls;
|
|
3013
3018
|
|
|
3014
3019
|
// src/Calendar/MonthListBox.tsx
|
|
3015
|
-
import { useContext as
|
|
3020
|
+
import { useContext as useContext15 } from "react";
|
|
3016
3021
|
import { CalendarStateContext as CalendarStateContext3 } from "react-aria-components";
|
|
3022
|
+
import { Button as Button6 } from "react-aria-components";
|
|
3023
|
+
import { cn as cn42 } from "@marigold/system";
|
|
3017
3024
|
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
3018
3025
|
var MonthListBox = ({ setSelectedDropdown }) => {
|
|
3019
|
-
const state =
|
|
3026
|
+
const state = useContext15(CalendarStateContext3);
|
|
3020
3027
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
3021
3028
|
let onChange2 = (index2) => {
|
|
3022
3029
|
let value = Number(index2) + 1;
|
|
3023
3030
|
let date = state.focusedDate.set({ month: value });
|
|
3024
3031
|
state.setFocusedDate(date);
|
|
3025
3032
|
};
|
|
3033
|
+
const { classNames: classNames3 } = useCalendarContext();
|
|
3026
3034
|
return /* @__PURE__ */ jsx69(
|
|
3027
3035
|
"ul",
|
|
3028
3036
|
{
|
|
3029
3037
|
"data-testid": "monthOptions",
|
|
3030
|
-
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10
|
|
3038
|
+
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 p-2",
|
|
3031
3039
|
children: months.map((month, index2) => {
|
|
3040
|
+
const isSelected = index2 === state.focusedDate.month - 1;
|
|
3032
3041
|
return /* @__PURE__ */ jsx69("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx69(
|
|
3033
|
-
|
|
3042
|
+
Button6,
|
|
3034
3043
|
{
|
|
3035
3044
|
slot: "previous",
|
|
3036
|
-
variant: index2 === state.focusedDate.month - 1 ? "secondary" : "text",
|
|
3037
|
-
size: "small",
|
|
3038
3045
|
onPress: () => {
|
|
3039
3046
|
onChange2(index2);
|
|
3040
3047
|
setSelectedDropdown(void 0);
|
|
3041
3048
|
},
|
|
3049
|
+
"aria-current": isSelected,
|
|
3050
|
+
className: cn42(
|
|
3051
|
+
classNames3.calendarListboxButton,
|
|
3052
|
+
"inline-flex items-center justify-center gap-[0.5ch]"
|
|
3053
|
+
),
|
|
3042
3054
|
children: month.substring(0, 3)
|
|
3043
3055
|
},
|
|
3044
3056
|
index2 + 1
|
|
@@ -3051,15 +3063,17 @@ var MonthListBox_default = MonthListBox;
|
|
|
3051
3063
|
|
|
3052
3064
|
// src/Calendar/YearListBox.tsx
|
|
3053
3065
|
import {
|
|
3054
|
-
useContext as
|
|
3066
|
+
useContext as useContext16,
|
|
3055
3067
|
useEffect,
|
|
3056
3068
|
useRef as useRef2
|
|
3057
3069
|
} from "react";
|
|
3058
|
-
import { CalendarStateContext as CalendarStateContext4 } from "react-aria-components";
|
|
3070
|
+
import { Button as Button7, CalendarStateContext as CalendarStateContext4 } from "react-aria-components";
|
|
3059
3071
|
import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
|
|
3072
|
+
import { cn as cn43 } from "@marigold/system";
|
|
3060
3073
|
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
3061
3074
|
var YearListBox = ({ setSelectedDropdown }) => {
|
|
3062
|
-
const state =
|
|
3075
|
+
const state = useContext16(CalendarStateContext4);
|
|
3076
|
+
const { classNames: classNames3 } = useCalendarContext();
|
|
3063
3077
|
const years = [];
|
|
3064
3078
|
let formatter = useDateFormatter3({
|
|
3065
3079
|
year: "numeric",
|
|
@@ -3093,24 +3107,26 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
3093
3107
|
"data-testid": "yearOptions",
|
|
3094
3108
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
3095
3109
|
children: years.map((year, index2) => {
|
|
3096
|
-
const
|
|
3110
|
+
const isSelected = +year.formatted === state.focusedDate.year;
|
|
3097
3111
|
return /* @__PURE__ */ jsx70("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx70(
|
|
3098
3112
|
"div",
|
|
3099
3113
|
{
|
|
3100
|
-
ref:
|
|
3101
|
-
|
|
3114
|
+
ref: isSelected ? activeButtonRef : null,
|
|
3115
|
+
className: "flex size-full justify-center",
|
|
3102
3116
|
children: /* @__PURE__ */ jsx70(
|
|
3103
|
-
|
|
3117
|
+
Button7,
|
|
3104
3118
|
{
|
|
3105
3119
|
slot: "previous",
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3120
|
+
className: cn43(
|
|
3121
|
+
classNames3.calendarListboxButton,
|
|
3122
|
+
"inline-flex items-center justify-center gap-[0.5ch]"
|
|
3123
|
+
),
|
|
3109
3124
|
onPress: () => {
|
|
3110
3125
|
onChange2(index2);
|
|
3111
3126
|
setSelectedDropdown(void 0);
|
|
3112
3127
|
},
|
|
3113
3128
|
"data-value": year.formatted,
|
|
3129
|
+
"aria-current": isSelected,
|
|
3114
3130
|
children: year.formatted
|
|
3115
3131
|
},
|
|
3116
3132
|
index2
|
|
@@ -3124,7 +3140,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
3124
3140
|
var YearListBox_default = YearListBox;
|
|
3125
3141
|
|
|
3126
3142
|
// src/Calendar/Calendar.tsx
|
|
3127
|
-
import {
|
|
3143
|
+
import { jsx as jsx71, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3128
3144
|
var _Calendar = ({
|
|
3129
3145
|
disabled,
|
|
3130
3146
|
readOnly,
|
|
@@ -3139,52 +3155,64 @@ var _Calendar = ({
|
|
|
3139
3155
|
isDateUnavailable: dateUnavailable,
|
|
3140
3156
|
...rest
|
|
3141
3157
|
};
|
|
3142
|
-
const classNames3 =
|
|
3158
|
+
const classNames3 = useClassNames39({ component: "Calendar", size: size2, variant });
|
|
3143
3159
|
const [selectedDropdown, setSelectedDropdown] = useState();
|
|
3144
3160
|
const ViewMap = {
|
|
3145
3161
|
month: /* @__PURE__ */ jsx71(MonthListBox_default, { setSelectedDropdown }),
|
|
3146
3162
|
year: /* @__PURE__ */ jsx71(YearListBox_default, { setSelectedDropdown })
|
|
3147
3163
|
};
|
|
3148
|
-
return /* @__PURE__ */ jsx71(
|
|
3164
|
+
return /* @__PURE__ */ jsx71(CalendarContext.Provider, { value: { classNames: classNames3 }, children: /* @__PURE__ */ jsxs24(
|
|
3149
3165
|
Calendar,
|
|
3150
3166
|
{
|
|
3151
|
-
className:
|
|
3152
|
-
"flex min-h-[350px] w-fit flex-col rounded-xs p-4",
|
|
3167
|
+
className: cn44(
|
|
3168
|
+
"relative flex min-h-[350px] w-fit flex-col rounded-xs p-4",
|
|
3153
3169
|
classNames3.calendar
|
|
3154
3170
|
),
|
|
3155
3171
|
...props,
|
|
3156
|
-
children:
|
|
3157
|
-
/* @__PURE__ */
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
isDisabled: props.isDisabled,
|
|
3164
|
-
setSelectedDropdown
|
|
3165
|
-
}
|
|
3172
|
+
children: [
|
|
3173
|
+
/* @__PURE__ */ jsx71(
|
|
3174
|
+
"div",
|
|
3175
|
+
{
|
|
3176
|
+
className: cn44(
|
|
3177
|
+
"pointer-events-none absolute top-1/2 left-0 w-full -translate-y-1/2 opacity-0",
|
|
3178
|
+
selectedDropdown && "pointer-events-auto opacity-100"
|
|
3166
3179
|
),
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
+
children: ViewMap[selectedDropdown]
|
|
3181
|
+
}
|
|
3182
|
+
),
|
|
3183
|
+
/* @__PURE__ */ jsxs24(
|
|
3184
|
+
"div",
|
|
3185
|
+
{
|
|
3186
|
+
className: cn44(
|
|
3187
|
+
"flex flex-col",
|
|
3188
|
+
selectedDropdown && "pointer-events-none opacity-0"
|
|
3189
|
+
),
|
|
3190
|
+
children: [
|
|
3191
|
+
/* @__PURE__ */ jsxs24("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
3192
|
+
/* @__PURE__ */ jsx71("div", { className: "flex w-fit gap-4", children: ["month", "year"].map((dateType) => /* @__PURE__ */ jsx71(
|
|
3193
|
+
CalendarListBox,
|
|
3194
|
+
{
|
|
3195
|
+
type: dateType,
|
|
3196
|
+
isDisabled: props.isDisabled,
|
|
3197
|
+
setSelectedDropdown
|
|
3198
|
+
},
|
|
3199
|
+
dateType
|
|
3200
|
+
)) }),
|
|
3201
|
+
/* @__PURE__ */ jsx71(MonthControls_default, {})
|
|
3202
|
+
] }),
|
|
3203
|
+
/* @__PURE__ */ jsx71(_CalendarGrid, {})
|
|
3204
|
+
]
|
|
3205
|
+
}
|
|
3206
|
+
)
|
|
3207
|
+
]
|
|
3180
3208
|
}
|
|
3181
|
-
);
|
|
3209
|
+
) });
|
|
3182
3210
|
};
|
|
3183
3211
|
|
|
3184
3212
|
// src/DatePicker/DatePicker.tsx
|
|
3185
3213
|
import React6 from "react";
|
|
3186
3214
|
import { DatePicker, Dialog as Dialog3 } from "react-aria-components";
|
|
3187
|
-
import { useClassNames as
|
|
3215
|
+
import { useClassNames as useClassNames40 } from "@marigold/system";
|
|
3188
3216
|
import { jsx as jsx72, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3189
3217
|
var _DatePicker = React6.forwardRef(
|
|
3190
3218
|
({
|
|
@@ -3209,7 +3237,7 @@ var _DatePicker = React6.forwardRef(
|
|
|
3209
3237
|
granularity,
|
|
3210
3238
|
...rest
|
|
3211
3239
|
};
|
|
3212
|
-
const classNames3 =
|
|
3240
|
+
const classNames3 = useClassNames40({
|
|
3213
3241
|
component: "DatePicker",
|
|
3214
3242
|
size: size2,
|
|
3215
3243
|
variant
|
|
@@ -3248,7 +3276,7 @@ var _DatePicker = React6.forwardRef(
|
|
|
3248
3276
|
|
|
3249
3277
|
// src/Inset/Inset.tsx
|
|
3250
3278
|
import {
|
|
3251
|
-
cn as
|
|
3279
|
+
cn as cn45,
|
|
3252
3280
|
paddingSpace as paddingSpace2,
|
|
3253
3281
|
paddingSpaceX as paddingSpaceX2,
|
|
3254
3282
|
paddingSpaceY as paddingSpaceY2
|
|
@@ -3257,7 +3285,7 @@ import { jsx as jsx73 } from "react/jsx-runtime";
|
|
|
3257
3285
|
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx73(
|
|
3258
3286
|
"div",
|
|
3259
3287
|
{
|
|
3260
|
-
className:
|
|
3288
|
+
className: cn45(
|
|
3261
3289
|
space && paddingSpace2[space],
|
|
3262
3290
|
!space && spaceX && paddingSpaceX2[spaceX],
|
|
3263
3291
|
!space && spaceY && paddingSpaceY2[spaceY]
|
|
@@ -3269,11 +3297,11 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx73(
|
|
|
3269
3297
|
// src/Link/Link.tsx
|
|
3270
3298
|
import { forwardRef as forwardRef20 } from "react";
|
|
3271
3299
|
import { Link } from "react-aria-components";
|
|
3272
|
-
import { useClassNames as
|
|
3300
|
+
import { useClassNames as useClassNames41 } from "@marigold/system";
|
|
3273
3301
|
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
3274
3302
|
var _Link = forwardRef20(
|
|
3275
3303
|
({ variant, size: size2, disabled, children, ...props }, ref) => {
|
|
3276
|
-
const classNames3 =
|
|
3304
|
+
const classNames3 = useClassNames41({
|
|
3277
3305
|
component: "Link",
|
|
3278
3306
|
variant,
|
|
3279
3307
|
size: size2
|
|
@@ -3283,12 +3311,12 @@ var _Link = forwardRef20(
|
|
|
3283
3311
|
);
|
|
3284
3312
|
|
|
3285
3313
|
// src/List/List.tsx
|
|
3286
|
-
import { useClassNames as
|
|
3314
|
+
import { useClassNames as useClassNames42 } from "@marigold/system";
|
|
3287
3315
|
|
|
3288
3316
|
// src/List/Context.ts
|
|
3289
|
-
import { createContext as
|
|
3290
|
-
var ListContext =
|
|
3291
|
-
var useListContext = () =>
|
|
3317
|
+
import { createContext as createContext9, useContext as useContext17 } from "react";
|
|
3318
|
+
var ListContext = createContext9({});
|
|
3319
|
+
var useListContext = () => useContext17(ListContext);
|
|
3292
3320
|
|
|
3293
3321
|
// src/List/ListItem.tsx
|
|
3294
3322
|
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
@@ -3307,30 +3335,30 @@ var List = ({
|
|
|
3307
3335
|
...props
|
|
3308
3336
|
}) => {
|
|
3309
3337
|
const Component2 = as;
|
|
3310
|
-
const classNames3 =
|
|
3338
|
+
const classNames3 = useClassNames42({ component: "List", variant, size: size2 });
|
|
3311
3339
|
return /* @__PURE__ */ jsx76(Component2, { ...props, className: classNames3[as], children: /* @__PURE__ */ jsx76(ListContext.Provider, { value: { classNames: classNames3.item }, children }) });
|
|
3312
3340
|
};
|
|
3313
3341
|
List.Item = ListItem;
|
|
3314
3342
|
|
|
3315
3343
|
// src/Menu/Menu.tsx
|
|
3316
|
-
import { Button as
|
|
3317
|
-
import { useClassNames as
|
|
3344
|
+
import { Button as Button8, Menu, MenuTrigger } from "react-aria-components";
|
|
3345
|
+
import { useClassNames as useClassNames45 } from "@marigold/system";
|
|
3318
3346
|
|
|
3319
3347
|
// src/Menu/MenuItem.tsx
|
|
3320
3348
|
import { MenuItem } from "react-aria-components";
|
|
3321
|
-
import { useClassNames as
|
|
3349
|
+
import { useClassNames as useClassNames43 } from "@marigold/system";
|
|
3322
3350
|
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
3323
3351
|
var _MenuItem = ({ children, ...props }) => {
|
|
3324
|
-
const classNames3 =
|
|
3352
|
+
const classNames3 = useClassNames43({ component: "Menu" });
|
|
3325
3353
|
return /* @__PURE__ */ jsx77(MenuItem, { ...props, className: classNames3.item, children });
|
|
3326
3354
|
};
|
|
3327
3355
|
|
|
3328
3356
|
// src/Menu/MenuSection.tsx
|
|
3329
3357
|
import { MenuSection } from "react-aria-components";
|
|
3330
|
-
import { useClassNames as
|
|
3358
|
+
import { useClassNames as useClassNames44 } from "@marigold/system";
|
|
3331
3359
|
import { jsx as jsx78, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3332
3360
|
var _MenuSection = ({ children, title, ...props }) => {
|
|
3333
|
-
const className =
|
|
3361
|
+
const className = useClassNames44({ component: "Menu" });
|
|
3334
3362
|
return /* @__PURE__ */ jsxs26(MenuSection, { ...props, children: [
|
|
3335
3363
|
/* @__PURE__ */ jsx78(_Header, { className: className.section, children: title }),
|
|
3336
3364
|
children
|
|
@@ -3350,10 +3378,10 @@ var _Menu = ({
|
|
|
3350
3378
|
"aria-label": ariaLabel,
|
|
3351
3379
|
...props
|
|
3352
3380
|
}) => {
|
|
3353
|
-
const classNames3 =
|
|
3381
|
+
const classNames3 = useClassNames45({ component: "Menu", variant, size: size2 });
|
|
3354
3382
|
return /* @__PURE__ */ jsxs27(MenuTrigger, { ...props, children: [
|
|
3355
3383
|
/* @__PURE__ */ jsx79(
|
|
3356
|
-
|
|
3384
|
+
Button8,
|
|
3357
3385
|
{
|
|
3358
3386
|
className: classNames3.button,
|
|
3359
3387
|
"aria-label": ariaLabel,
|
|
@@ -3368,8 +3396,8 @@ _Menu.Item = _MenuItem;
|
|
|
3368
3396
|
_Menu.Section = _MenuSection;
|
|
3369
3397
|
|
|
3370
3398
|
// src/Menu/ActionMenu.tsx
|
|
3371
|
-
import { Button as
|
|
3372
|
-
import { SVG as SVG8, useClassNames as
|
|
3399
|
+
import { Button as Button9, Menu as Menu2, MenuTrigger as MenuTrigger2 } from "react-aria-components";
|
|
3400
|
+
import { SVG as SVG8, useClassNames as useClassNames46 } from "@marigold/system";
|
|
3373
3401
|
import { jsx as jsx80, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3374
3402
|
var ActionMenu = ({
|
|
3375
3403
|
variant,
|
|
@@ -3377,9 +3405,9 @@ var ActionMenu = ({
|
|
|
3377
3405
|
disabled,
|
|
3378
3406
|
...props
|
|
3379
3407
|
}) => {
|
|
3380
|
-
const classNames3 =
|
|
3408
|
+
const classNames3 = useClassNames46({ component: "Menu", variant, size: size2 });
|
|
3381
3409
|
return /* @__PURE__ */ jsxs28(MenuTrigger2, { children: [
|
|
3382
|
-
/* @__PURE__ */ jsx80(
|
|
3410
|
+
/* @__PURE__ */ jsx80(Button9, { className: classNames3.button, isDisabled: disabled, children: /* @__PURE__ */ jsx80(SVG8, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx80("path", { d: "M12.0117 7.47656C13.2557 7.47656 14.2734 6.45879 14.2734 5.21484C14.2734 3.9709 13.2557 2.95312 12.0117 2.95312C10.7678 2.95312 9.75 3.9709 9.75 5.21484C9.75 6.45879 10.7678 7.47656 12.0117 7.47656ZM12.0117 9.73828C10.7678 9.73828 9.75 10.7561 9.75 12C9.75 13.2439 10.7678 14.2617 12.0117 14.2617C13.2557 14.2617 14.2734 13.2439 14.2734 12C14.2734 10.7561 13.2557 9.73828 12.0117 9.73828ZM12.0117 16.5234C10.7678 16.5234 9.75 17.5412 9.75 18.7852C9.75 20.0291 10.7678 21.0469 12.0117 21.0469C13.2557 21.0469 14.2734 20.0291 14.2734 18.7852C14.2734 17.5412 13.2557 16.5234 12.0117 16.5234Z" }) }) }),
|
|
3383
3411
|
/* @__PURE__ */ jsx80(_Popover, { children: /* @__PURE__ */ jsx80(Menu2, { ...props, className: classNames3.container, children: props.children }) })
|
|
3384
3412
|
] });
|
|
3385
3413
|
};
|
|
@@ -3387,29 +3415,29 @@ var ActionMenu = ({
|
|
|
3387
3415
|
// src/SectionMessage/SectionMessage.tsx
|
|
3388
3416
|
import { useRef as useRef3, useState as useState2 } from "react";
|
|
3389
3417
|
import { useButton } from "@react-aria/button";
|
|
3390
|
-
import { cn as
|
|
3418
|
+
import { cn as cn48, useClassNames as useClassNames47 } from "@marigold/system";
|
|
3391
3419
|
|
|
3392
3420
|
// src/SectionMessage/Context.tsx
|
|
3393
|
-
import { createContext as
|
|
3394
|
-
var SectionMessageContext =
|
|
3395
|
-
var useSectionMessageContext = () =>
|
|
3421
|
+
import { createContext as createContext10, useContext as useContext18 } from "react";
|
|
3422
|
+
var SectionMessageContext = createContext10({});
|
|
3423
|
+
var useSectionMessageContext = () => useContext18(SectionMessageContext);
|
|
3396
3424
|
|
|
3397
3425
|
// src/SectionMessage/SectionMessageContent.tsx
|
|
3398
|
-
import { cn as
|
|
3426
|
+
import { cn as cn46 } from "@marigold/system";
|
|
3399
3427
|
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3400
3428
|
var SectionMessageContent = ({
|
|
3401
3429
|
children
|
|
3402
3430
|
}) => {
|
|
3403
3431
|
const { classNames: classNames3 } = useSectionMessageContext();
|
|
3404
|
-
return /* @__PURE__ */ jsx81("div", { className:
|
|
3432
|
+
return /* @__PURE__ */ jsx81("div", { className: cn46("[grid-area:content]", classNames3.content), children });
|
|
3405
3433
|
};
|
|
3406
3434
|
|
|
3407
3435
|
// src/SectionMessage/SectionMessageTitle.tsx
|
|
3408
|
-
import { cn as
|
|
3436
|
+
import { cn as cn47 } from "@marigold/system";
|
|
3409
3437
|
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
3410
3438
|
var SectionMessageTitle = ({ children }) => {
|
|
3411
3439
|
const { classNames: classNames3 } = useSectionMessageContext();
|
|
3412
|
-
return /* @__PURE__ */ jsx82("div", { className:
|
|
3440
|
+
return /* @__PURE__ */ jsx82("div", { className: cn47("[grid-area:title]", classNames3.title), children });
|
|
3413
3441
|
};
|
|
3414
3442
|
|
|
3415
3443
|
// src/SectionMessage/SectionMessage.tsx
|
|
@@ -3490,7 +3518,7 @@ var SectionMessage = ({
|
|
|
3490
3518
|
...props
|
|
3491
3519
|
}) => {
|
|
3492
3520
|
const buttonRef = useRef3(null);
|
|
3493
|
-
const classNames3 =
|
|
3521
|
+
const classNames3 = useClassNames47({
|
|
3494
3522
|
component: "SectionMessage",
|
|
3495
3523
|
variant,
|
|
3496
3524
|
size: size2
|
|
@@ -3511,16 +3539,16 @@ var SectionMessage = ({
|
|
|
3511
3539
|
{
|
|
3512
3540
|
role: variant === "error" ? "alert" : void 0,
|
|
3513
3541
|
...props,
|
|
3514
|
-
className:
|
|
3542
|
+
className: cn48("grid auto-rows-min", classNames3.container),
|
|
3515
3543
|
children: [
|
|
3516
|
-
/* @__PURE__ */ jsx83("div", { className:
|
|
3544
|
+
/* @__PURE__ */ jsx83("div", { className: cn48("[grid-area:icon]", classNames3.icon), children: Icon4 && /* @__PURE__ */ jsx83(Icon4, {}) }),
|
|
3517
3545
|
closeButton && /* @__PURE__ */ jsx83(
|
|
3518
3546
|
CloseButton,
|
|
3519
3547
|
{
|
|
3520
3548
|
...buttonProps,
|
|
3521
3549
|
ref: buttonRef,
|
|
3522
3550
|
"aria-label": "close",
|
|
3523
|
-
className:
|
|
3551
|
+
className: cn48("[grid-area:close]", classNames3.close),
|
|
3524
3552
|
onPress: handleClose
|
|
3525
3553
|
}
|
|
3526
3554
|
),
|
|
@@ -3534,7 +3562,7 @@ SectionMessage.Content = SectionMessageContent;
|
|
|
3534
3562
|
|
|
3535
3563
|
// src/Multiselect/Multiselect.tsx
|
|
3536
3564
|
import {
|
|
3537
|
-
Button as
|
|
3565
|
+
Button as Button10,
|
|
3538
3566
|
ButtonContext,
|
|
3539
3567
|
FieldErrorContext as FieldErrorContext2,
|
|
3540
3568
|
InputContext,
|
|
@@ -3679,7 +3707,7 @@ function _objectWithoutProperties(e, t) {
|
|
|
3679
3707
|
return i;
|
|
3680
3708
|
}
|
|
3681
3709
|
|
|
3682
|
-
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.
|
|
3710
|
+
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.5_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
3683
3711
|
import { useState as useState3, useCallback } from "react";
|
|
3684
3712
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
3685
3713
|
function useStateManager(_ref3) {
|
|
@@ -3737,7 +3765,7 @@ function _extends() {
|
|
|
3737
3765
|
}, _extends.apply(null, arguments);
|
|
3738
3766
|
}
|
|
3739
3767
|
|
|
3740
|
-
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.
|
|
3768
|
+
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.5_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/react-select.esm.js
|
|
3741
3769
|
import * as React11 from "react";
|
|
3742
3770
|
import { forwardRef as forwardRef23, useMemo as useMemo5 } from "react";
|
|
3743
3771
|
|
|
@@ -3845,13 +3873,13 @@ function _toConsumableArray(r) {
|
|
|
3845
3873
|
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
3846
3874
|
}
|
|
3847
3875
|
|
|
3848
|
-
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.
|
|
3876
|
+
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.5_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/Select-aab027f3.esm.js
|
|
3849
3877
|
import * as React10 from "react";
|
|
3850
|
-
import { useMemo as useMemo4, Fragment as
|
|
3878
|
+
import { useMemo as useMemo4, Fragment as Fragment8, useRef as useRef6, useCallback as useCallback3, useEffect as useEffect3, Component } from "react";
|
|
3851
3879
|
|
|
3852
|
-
// ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.1.
|
|
3880
|
+
// ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.1.5_react@19.1.0/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
3853
3881
|
import * as React8 from "react";
|
|
3854
|
-
import { useContext as
|
|
3882
|
+
import { useContext as useContext20, forwardRef as forwardRef22 } from "react";
|
|
3855
3883
|
|
|
3856
3884
|
// ../../node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
3857
3885
|
var isDevelopment = false;
|
|
@@ -5023,7 +5051,7 @@ var syncFallback = function syncFallback2(create) {
|
|
|
5023
5051
|
var useInsertionEffect2 = React7["useInsertionEffect"] ? React7["useInsertionEffect"] : false;
|
|
5024
5052
|
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser3 ? syncFallback : useInsertionEffect2 || syncFallback;
|
|
5025
5053
|
|
|
5026
|
-
// ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.1.
|
|
5054
|
+
// ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.1.5_react@19.1.0/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
5027
5055
|
var isDevelopment3 = false;
|
|
5028
5056
|
var isBrowser4 = typeof document !== "undefined";
|
|
5029
5057
|
var EmotionCacheContext = /* @__PURE__ */ React8.createContext(
|
|
@@ -5040,14 +5068,14 @@ var EmotionCacheContext = /* @__PURE__ */ React8.createContext(
|
|
|
5040
5068
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
5041
5069
|
var withEmotionCache = function withEmotionCache2(func) {
|
|
5042
5070
|
return /* @__PURE__ */ forwardRef22(function(props, ref) {
|
|
5043
|
-
var cache =
|
|
5071
|
+
var cache = useContext20(EmotionCacheContext);
|
|
5044
5072
|
return func(props, cache, ref);
|
|
5045
5073
|
});
|
|
5046
5074
|
};
|
|
5047
5075
|
if (!isBrowser4) {
|
|
5048
5076
|
withEmotionCache = function withEmotionCache3(func) {
|
|
5049
5077
|
return function(props) {
|
|
5050
|
-
var cache =
|
|
5078
|
+
var cache = useContext20(EmotionCacheContext);
|
|
5051
5079
|
if (cache === null) {
|
|
5052
5080
|
cache = createCache({
|
|
5053
5081
|
key: "css"
|
|
@@ -5127,7 +5155,7 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
|
5127
5155
|
});
|
|
5128
5156
|
var Emotion$1 = Emotion;
|
|
5129
5157
|
|
|
5130
|
-
// ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.1.
|
|
5158
|
+
// ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.1.5_react@19.1.0/node_modules/@emotion/react/dist/emotion-react.esm.js
|
|
5131
5159
|
import * as React9 from "react";
|
|
5132
5160
|
var import_extends2 = __toESM(require_extends());
|
|
5133
5161
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
@@ -5178,8 +5206,8 @@ function _taggedTemplateLiteral(e, t) {
|
|
|
5178
5206
|
}));
|
|
5179
5207
|
}
|
|
5180
5208
|
|
|
5181
|
-
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.
|
|
5182
|
-
import { useContext as
|
|
5209
|
+
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.5_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
5210
|
+
import { useContext as useContext22, useRef as useRef5, useState as useState4, useMemo as useMemo3, useCallback as useCallback2, createContext as createContext12 } from "react";
|
|
5183
5211
|
import { createPortal } from "react-dom";
|
|
5184
5212
|
|
|
5185
5213
|
// ../../node_modules/.pnpm/@floating-ui+utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
@@ -5579,12 +5607,12 @@ function autoUpdate(reference, floating, update, options2) {
|
|
|
5579
5607
|
};
|
|
5580
5608
|
}
|
|
5581
5609
|
|
|
5582
|
-
// ../../node_modules/.pnpm/use-isomorphic-layout-effect@1.2.0_@types+react@19.1.
|
|
5610
|
+
// ../../node_modules/.pnpm/use-isomorphic-layout-effect@1.2.0_@types+react@19.1.5_react@19.1.0/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
5583
5611
|
import { useLayoutEffect as useLayoutEffect2, useEffect as useEffect2 } from "react";
|
|
5584
5612
|
var isClient = typeof document !== "undefined";
|
|
5585
5613
|
var index = isClient ? useLayoutEffect2 : useEffect2;
|
|
5586
5614
|
|
|
5587
|
-
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.
|
|
5615
|
+
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.5_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
5588
5616
|
var _excluded$4 = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
|
|
5589
5617
|
var noop = function noop2() {
|
|
5590
5618
|
};
|
|
@@ -5916,10 +5944,10 @@ var menuCSS = function menuCSS2(_ref23, unstyled) {
|
|
|
5916
5944
|
marginTop: spacing2.menuGutter
|
|
5917
5945
|
});
|
|
5918
5946
|
};
|
|
5919
|
-
var PortalPlacementContext = /* @__PURE__ */
|
|
5947
|
+
var PortalPlacementContext = /* @__PURE__ */ createContext12(null);
|
|
5920
5948
|
var MenuPlacer = function MenuPlacer2(props) {
|
|
5921
5949
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
5922
|
-
var _ref3 =
|
|
5950
|
+
var _ref3 = useContext22(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
5923
5951
|
var ref = useRef5(null);
|
|
5924
5952
|
var _useState = useState4(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
5925
5953
|
var _useState3 = useState4(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
@@ -6658,7 +6686,7 @@ function memoizeOne(resultFn, isEqual2) {
|
|
|
6658
6686
|
return memoized;
|
|
6659
6687
|
}
|
|
6660
6688
|
|
|
6661
|
-
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.
|
|
6689
|
+
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.5_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/Select-aab027f3.esm.js
|
|
6662
6690
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$2() {
|
|
6663
6691
|
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).";
|
|
6664
6692
|
}
|
|
@@ -6807,7 +6835,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
6807
6835
|
}
|
|
6808
6836
|
return guidanceMsg;
|
|
6809
6837
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
6810
|
-
var ScreenReaderText = jsx84(
|
|
6838
|
+
var ScreenReaderText = jsx84(Fragment8, null, jsx84("span", {
|
|
6811
6839
|
id: "aria-selection"
|
|
6812
6840
|
}, ariaSelected), jsx84("span", {
|
|
6813
6841
|
id: "aria-focused"
|
|
@@ -6816,7 +6844,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
6816
6844
|
}, ariaResults), jsx84("span", {
|
|
6817
6845
|
id: "aria-guidance"
|
|
6818
6846
|
}, ariaGuidance));
|
|
6819
|
-
return jsx84(
|
|
6847
|
+
return jsx84(Fragment8, null, jsx84(A11yText$1, {
|
|
6820
6848
|
id
|
|
6821
6849
|
}, isInitialFocus && ScreenReaderText), jsx84(A11yText$1, {
|
|
6822
6850
|
"aria-live": ariaLive,
|
|
@@ -7373,7 +7401,7 @@ function ScrollManager(_ref3) {
|
|
|
7373
7401
|
setScrollCaptureTarget(element);
|
|
7374
7402
|
setScrollLockTarget(element);
|
|
7375
7403
|
};
|
|
7376
|
-
return jsx84(
|
|
7404
|
+
return jsx84(Fragment8, null, lockEnabled && jsx84("div", {
|
|
7377
7405
|
onClick: blurSelectInput,
|
|
7378
7406
|
css: _ref2$1
|
|
7379
7407
|
}), children(targetRef));
|
|
@@ -8954,7 +8982,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
8954
8982
|
}(Component);
|
|
8955
8983
|
Select.defaultProps = defaultProps;
|
|
8956
8984
|
|
|
8957
|
-
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.
|
|
8985
|
+
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.5_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/react-select.esm.js
|
|
8958
8986
|
var import_objectSpread24 = __toESM(require_objectSpread2());
|
|
8959
8987
|
var import_slicedToArray3 = __toESM(require_slicedToArray());
|
|
8960
8988
|
var import_objectWithoutProperties4 = __toESM(require_objectWithoutProperties());
|
|
@@ -8975,7 +9003,7 @@ var StateManagedSelect = /* @__PURE__ */ forwardRef23(function(props, ref) {
|
|
|
8975
9003
|
});
|
|
8976
9004
|
var StateManagedSelect$1 = StateManagedSelect;
|
|
8977
9005
|
|
|
8978
|
-
// ../../node_modules/.pnpm/@react-aria+label@3.7.
|
|
9006
|
+
// ../../node_modules/.pnpm/@react-aria+label@3.7.18_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/label/dist/useLabel.mjs
|
|
8979
9007
|
import { useId as $83Elw$useId, useLabels as $83Elw$useLabels } from "@react-aria/utils";
|
|
8980
9008
|
function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
8981
9009
|
let { id, label, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, labelElementType = "label" } = props;
|
|
@@ -9000,7 +9028,7 @@ function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
|
9000
9028
|
};
|
|
9001
9029
|
}
|
|
9002
9030
|
|
|
9003
|
-
// ../../node_modules/.pnpm/@react-aria+label@3.7.
|
|
9031
|
+
// ../../node_modules/.pnpm/@react-aria+label@3.7.18_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/label/dist/useField.mjs
|
|
9004
9032
|
import { useSlotId as $2kC82$useSlotId, mergeProps as $2kC82$mergeProps } from "@react-aria/utils";
|
|
9005
9033
|
function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
|
|
9006
9034
|
let { description, errorMessage, isInvalid, validationState } = props;
|
|
@@ -9039,7 +9067,7 @@ function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
|
|
|
9039
9067
|
|
|
9040
9068
|
// src/Multiselect/Multiselect.tsx
|
|
9041
9069
|
import { useId } from "@react-aria/utils";
|
|
9042
|
-
import { cn as
|
|
9070
|
+
import { cn as cn49, useClassNames as useClassNames48 } from "@marigold/system";
|
|
9043
9071
|
import { jsx as jsx86, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9044
9072
|
var propsToBeRemoved = [
|
|
9045
9073
|
"clearValue",
|
|
@@ -9077,20 +9105,20 @@ var Input4 = ({ innerRef, placeholder, hasValue, ...props }) => {
|
|
|
9077
9105
|
);
|
|
9078
9106
|
};
|
|
9079
9107
|
var MultiValueRemove2 = ({ innerProps }) => {
|
|
9080
|
-
return /* @__PURE__ */ jsx86(
|
|
9108
|
+
return /* @__PURE__ */ jsx86(Button10, { slot: "remove", ...innerProps, children: /* @__PURE__ */ jsx86("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx86("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
9081
9109
|
};
|
|
9082
9110
|
var getClassNames = (classNames3) => ({
|
|
9083
|
-
control: () =>
|
|
9111
|
+
control: () => cn49(
|
|
9084
9112
|
"relative flex items-center box-border flex-wrap justify-between",
|
|
9085
9113
|
classNames3.container
|
|
9086
9114
|
),
|
|
9087
9115
|
container: () => "pointer-events-auto",
|
|
9088
9116
|
indicatorSeparator: () => "hidden",
|
|
9089
|
-
menu: () =>
|
|
9090
|
-
menuList: () =>
|
|
9091
|
-
multiValue: () =>
|
|
9117
|
+
menu: () => cn49("b", classNames3.listContainer),
|
|
9118
|
+
menuList: () => cn49("overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh] p-0", classNames3.list),
|
|
9119
|
+
multiValue: () => cn49(classNames3.tag, "m-0 "),
|
|
9092
9120
|
multiValueLabel: () => "p-0",
|
|
9093
|
-
option: ({ isFocused }) =>
|
|
9121
|
+
option: ({ isFocused }) => cn49(classNames3.option, { isFocused }),
|
|
9094
9122
|
placeholder: () => "hidden",
|
|
9095
9123
|
valueContainer: () => classNames3.valueContainer
|
|
9096
9124
|
});
|
|
@@ -9111,7 +9139,7 @@ var Multiselect = ({
|
|
|
9111
9139
|
onSelectionChange,
|
|
9112
9140
|
...rest
|
|
9113
9141
|
}) => {
|
|
9114
|
-
const classNames3 =
|
|
9142
|
+
const classNames3 = useClassNames48({
|
|
9115
9143
|
component: "MultiSelect",
|
|
9116
9144
|
size: size2,
|
|
9117
9145
|
variant
|
|
@@ -9155,14 +9183,14 @@ var Multiselect = ({
|
|
|
9155
9183
|
// react-select doesn't handle readonly so we had to do it manually here
|
|
9156
9184
|
// keep to the button disabled in read only to prevent menu from opening
|
|
9157
9185
|
isDisabled: disabled || readOnly,
|
|
9158
|
-
className:
|
|
9186
|
+
className: cn49("flex items-center", classNames3.closeButton)
|
|
9159
9187
|
}
|
|
9160
9188
|
]
|
|
9161
9189
|
],
|
|
9162
9190
|
children: /* @__PURE__ */ jsxs30(
|
|
9163
9191
|
"div",
|
|
9164
9192
|
{
|
|
9165
|
-
className:
|
|
9193
|
+
className: cn49(classNames3.field, "group/field"),
|
|
9166
9194
|
"data-required": props.required,
|
|
9167
9195
|
"data-invalid": error,
|
|
9168
9196
|
"data-readonly": readOnly,
|
|
@@ -9227,11 +9255,11 @@ var Multiselect = ({
|
|
|
9227
9255
|
// src/NumberField/NumberField.tsx
|
|
9228
9256
|
import { forwardRef as forwardRef24 } from "react";
|
|
9229
9257
|
import { Group as Group4, Input as Input5, NumberField } from "react-aria-components";
|
|
9230
|
-
import { cn as
|
|
9258
|
+
import { cn as cn51, useClassNames as useClassNames49 } from "@marigold/system";
|
|
9231
9259
|
|
|
9232
9260
|
// src/NumberField/StepButton.tsx
|
|
9233
|
-
import { Button as
|
|
9234
|
-
import { cn as
|
|
9261
|
+
import { Button as Button11 } from "react-aria-components";
|
|
9262
|
+
import { cn as cn50 } from "@marigold/system";
|
|
9235
9263
|
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
9236
9264
|
var Plus = () => /* @__PURE__ */ jsx87("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx87(
|
|
9237
9265
|
"path",
|
|
@@ -9252,9 +9280,9 @@ var Minus = () => /* @__PURE__ */ jsx87("svg", { width: 16, height: 16, viewBox:
|
|
|
9252
9280
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
9253
9281
|
const Icon4 = direction === "up" ? Plus : Minus;
|
|
9254
9282
|
return /* @__PURE__ */ jsx87(
|
|
9255
|
-
|
|
9283
|
+
Button11,
|
|
9256
9284
|
{
|
|
9257
|
-
className:
|
|
9285
|
+
className: cn50(
|
|
9258
9286
|
[
|
|
9259
9287
|
"flex items-center justify-center",
|
|
9260
9288
|
"cursor-pointer data-disabled:cursor-not-allowed"
|
|
@@ -9280,7 +9308,7 @@ var _NumberField = forwardRef24(
|
|
|
9280
9308
|
hideStepper,
|
|
9281
9309
|
...rest
|
|
9282
9310
|
}, ref) => {
|
|
9283
|
-
const classNames3 =
|
|
9311
|
+
const classNames3 = useClassNames49({
|
|
9284
9312
|
component: "NumberField",
|
|
9285
9313
|
size: size2,
|
|
9286
9314
|
variant
|
|
@@ -9300,7 +9328,7 @@ var _NumberField = forwardRef24(
|
|
|
9300
9328
|
...props,
|
|
9301
9329
|
"data-readonly": readOnly ? "true" : void 0,
|
|
9302
9330
|
"data-stepper": showStepper ? "true" : void 0,
|
|
9303
|
-
children: /* @__PURE__ */ jsxs31(Group4, { className:
|
|
9331
|
+
children: /* @__PURE__ */ jsxs31(Group4, { className: cn51("flex items-stretch", classNames3.group), children: [
|
|
9304
9332
|
showStepper && /* @__PURE__ */ jsx88(
|
|
9305
9333
|
_StepButton,
|
|
9306
9334
|
{
|
|
@@ -9313,7 +9341,7 @@ var _NumberField = forwardRef24(
|
|
|
9313
9341
|
Input5,
|
|
9314
9342
|
{
|
|
9315
9343
|
ref,
|
|
9316
|
-
className:
|
|
9344
|
+
className: cn51("h-full flex-1 outline-none", classNames3.input)
|
|
9317
9345
|
}
|
|
9318
9346
|
),
|
|
9319
9347
|
showStepper && /* @__PURE__ */ jsx88(
|
|
@@ -9333,7 +9361,7 @@ var _NumberField = forwardRef24(
|
|
|
9333
9361
|
// src/Pagination/Pagination.tsx
|
|
9334
9362
|
import { useEffect as useEffect4, useRef as useRef9, useState as useState5 } from "react";
|
|
9335
9363
|
import { FocusScope as FocusScope2, useFocusManager } from "@react-aria/focus";
|
|
9336
|
-
import { useClassNames as
|
|
9364
|
+
import { useClassNames as useClassNames52 } from "@marigold/system";
|
|
9337
9365
|
|
|
9338
9366
|
// src/Pagination/Ellipsis.tsx
|
|
9339
9367
|
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
@@ -9351,11 +9379,11 @@ var Ellipsis = () => {
|
|
|
9351
9379
|
// src/Pagination/NavigationButton.tsx
|
|
9352
9380
|
import { useRef as useRef7 } from "react";
|
|
9353
9381
|
import { useButton as useButton2 } from "@react-aria/button";
|
|
9354
|
-
import { cn as
|
|
9382
|
+
import { cn as cn52, useClassNames as useClassNames50 } from "@marigold/system";
|
|
9355
9383
|
import { jsxs as jsxs32 } from "react/jsx-runtime";
|
|
9356
9384
|
var NavigationButton = (props) => {
|
|
9357
9385
|
const ref = useRef7(null);
|
|
9358
|
-
const classNames3 =
|
|
9386
|
+
const classNames3 = useClassNames50({
|
|
9359
9387
|
component: "Pagination"
|
|
9360
9388
|
});
|
|
9361
9389
|
let { buttonProps } = useButton2(props, ref);
|
|
@@ -9375,7 +9403,7 @@ var NavigationButton = (props) => {
|
|
|
9375
9403
|
...buttonProps,
|
|
9376
9404
|
...rest,
|
|
9377
9405
|
disabled: isDisabled,
|
|
9378
|
-
className:
|
|
9406
|
+
className: cn52(classNames3.navigationButton, controlLabel && "w-24 px-2"),
|
|
9379
9407
|
"data-selected": isSelected,
|
|
9380
9408
|
children: [
|
|
9381
9409
|
position2 === "left" && children,
|
|
@@ -9389,11 +9417,11 @@ var NavigationButton = (props) => {
|
|
|
9389
9417
|
// src/Pagination/PageButton.tsx
|
|
9390
9418
|
import { useRef as useRef8 } from "react";
|
|
9391
9419
|
import { useButton as useButton3 } from "@react-aria/button";
|
|
9392
|
-
import { useClassNames as
|
|
9420
|
+
import { useClassNames as useClassNames51 } from "@marigold/system";
|
|
9393
9421
|
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
9394
9422
|
var PageButton = (props) => {
|
|
9395
9423
|
const ref = useRef8(null);
|
|
9396
|
-
const classNames3 =
|
|
9424
|
+
const classNames3 = useClassNames51({
|
|
9397
9425
|
component: "Pagination"
|
|
9398
9426
|
});
|
|
9399
9427
|
let { buttonProps } = useButton3(props, ref);
|
|
@@ -9445,7 +9473,7 @@ var usePageRange = ({ currentPage, totalPages }) => {
|
|
|
9445
9473
|
};
|
|
9446
9474
|
|
|
9447
9475
|
// src/Pagination/Pagination.tsx
|
|
9448
|
-
import { Fragment as
|
|
9476
|
+
import { Fragment as Fragment9, jsx as jsx91, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
9449
9477
|
var InnerPagination = ({
|
|
9450
9478
|
currentPage,
|
|
9451
9479
|
pageSize,
|
|
@@ -9472,7 +9500,7 @@ var InnerPagination = ({
|
|
|
9472
9500
|
onChange2(newPage);
|
|
9473
9501
|
}
|
|
9474
9502
|
};
|
|
9475
|
-
const classNames3 =
|
|
9503
|
+
const classNames3 = useClassNames52({ component: "Pagination" });
|
|
9476
9504
|
const handleKeyDown = (onEnter) => (e) => {
|
|
9477
9505
|
if (e.key === "ArrowRight") {
|
|
9478
9506
|
e.preventDefault();
|
|
@@ -9485,7 +9513,7 @@ var InnerPagination = ({
|
|
|
9485
9513
|
onEnter();
|
|
9486
9514
|
}
|
|
9487
9515
|
};
|
|
9488
|
-
return /* @__PURE__ */ jsxs33(
|
|
9516
|
+
return /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
9489
9517
|
/* @__PURE__ */ jsx91(
|
|
9490
9518
|
NavigationButton,
|
|
9491
9519
|
{
|
|
@@ -9559,18 +9587,18 @@ import {
|
|
|
9559
9587
|
forwardRef as forwardRef25
|
|
9560
9588
|
} from "react";
|
|
9561
9589
|
import { Radio } from "react-aria-components";
|
|
9562
|
-
import { cn as
|
|
9590
|
+
import { cn as cn54, useClassNames as useClassNames54 } from "@marigold/system";
|
|
9563
9591
|
|
|
9564
9592
|
// src/Radio/Context.ts
|
|
9565
|
-
import { createContext as
|
|
9566
|
-
var RadioGroupContext =
|
|
9593
|
+
import { createContext as createContext13, useContext as useContext23 } from "react";
|
|
9594
|
+
var RadioGroupContext = createContext13(
|
|
9567
9595
|
null
|
|
9568
9596
|
);
|
|
9569
|
-
var useRadioGroupContext = () =>
|
|
9597
|
+
var useRadioGroupContext = () => useContext23(RadioGroupContext);
|
|
9570
9598
|
|
|
9571
9599
|
// src/Radio/RadioGroup.tsx
|
|
9572
9600
|
import { RadioGroup } from "react-aria-components";
|
|
9573
|
-
import { cn as
|
|
9601
|
+
import { cn as cn53, useClassNames as useClassNames53 } from "@marigold/system";
|
|
9574
9602
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
9575
9603
|
var _RadioGroup = ({
|
|
9576
9604
|
variant,
|
|
@@ -9587,7 +9615,7 @@ var _RadioGroup = ({
|
|
|
9587
9615
|
width,
|
|
9588
9616
|
...rest
|
|
9589
9617
|
}) => {
|
|
9590
|
-
const classNames3 =
|
|
9618
|
+
const classNames3 = useClassNames53({ component: "Radio", variant, size: size2 });
|
|
9591
9619
|
const props = {
|
|
9592
9620
|
isDisabled: disabled,
|
|
9593
9621
|
isReadOnly: readOnly,
|
|
@@ -9612,7 +9640,7 @@ var _RadioGroup = ({
|
|
|
9612
9640
|
role: "presentation",
|
|
9613
9641
|
"data-testid": "group",
|
|
9614
9642
|
"data-orientation": orientation,
|
|
9615
|
-
className:
|
|
9643
|
+
className: cn53(
|
|
9616
9644
|
classNames3.group,
|
|
9617
9645
|
"flex items-start",
|
|
9618
9646
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
@@ -9625,12 +9653,12 @@ var _RadioGroup = ({
|
|
|
9625
9653
|
};
|
|
9626
9654
|
|
|
9627
9655
|
// src/Radio/Radio.tsx
|
|
9628
|
-
import { Fragment as
|
|
9656
|
+
import { Fragment as Fragment10, jsx as jsx93, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
9629
9657
|
var Dot = () => /* @__PURE__ */ jsx93("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx93("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
9630
9658
|
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx93(
|
|
9631
9659
|
"div",
|
|
9632
9660
|
{
|
|
9633
|
-
className:
|
|
9661
|
+
className: cn54(
|
|
9634
9662
|
"bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
|
|
9635
9663
|
className
|
|
9636
9664
|
),
|
|
@@ -9642,7 +9670,7 @@ var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx93(
|
|
|
9642
9670
|
var _Radio = forwardRef25(
|
|
9643
9671
|
({ value, disabled, width, children, ...props }, ref) => {
|
|
9644
9672
|
const { variant, size: size2, width: groupWidth } = useRadioGroupContext();
|
|
9645
|
-
const classNames3 =
|
|
9673
|
+
const classNames3 = useClassNames54({
|
|
9646
9674
|
component: "Radio",
|
|
9647
9675
|
variant: variant || props.variant,
|
|
9648
9676
|
size: size2 || props.size
|
|
@@ -9651,7 +9679,7 @@ var _Radio = forwardRef25(
|
|
|
9651
9679
|
Radio,
|
|
9652
9680
|
{
|
|
9653
9681
|
ref,
|
|
9654
|
-
className:
|
|
9682
|
+
className: cn54(
|
|
9655
9683
|
"group/radio",
|
|
9656
9684
|
"relative flex items-center gap-[1ch]",
|
|
9657
9685
|
width || groupWidth || "w-full",
|
|
@@ -9660,12 +9688,12 @@ var _Radio = forwardRef25(
|
|
|
9660
9688
|
value,
|
|
9661
9689
|
isDisabled: disabled,
|
|
9662
9690
|
...props,
|
|
9663
|
-
children: ({ isSelected }) => /* @__PURE__ */ jsxs34(
|
|
9691
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs34(Fragment10, { children: [
|
|
9664
9692
|
/* @__PURE__ */ jsx93(
|
|
9665
9693
|
Icon3,
|
|
9666
9694
|
{
|
|
9667
9695
|
checked: isSelected,
|
|
9668
|
-
className:
|
|
9696
|
+
className: cn54(
|
|
9669
9697
|
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
9670
9698
|
classNames3.radio
|
|
9671
9699
|
)
|
|
@@ -9705,7 +9733,7 @@ var _SearchField = forwardRef26(
|
|
|
9705
9733
|
// src/Select/Select.tsx
|
|
9706
9734
|
import { forwardRef as forwardRef27 } from "react";
|
|
9707
9735
|
import { Select as Select2, SelectValue } from "react-aria-components";
|
|
9708
|
-
import { cn as
|
|
9736
|
+
import { cn as cn55, useClassNames as useClassNames55 } from "@marigold/system";
|
|
9709
9737
|
import { jsx as jsx95, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
9710
9738
|
var _Select = forwardRef27(
|
|
9711
9739
|
({
|
|
@@ -9727,18 +9755,18 @@ var _Select = forwardRef27(
|
|
|
9727
9755
|
onSelectionChange: onChange2,
|
|
9728
9756
|
...rest
|
|
9729
9757
|
};
|
|
9730
|
-
const classNames3 =
|
|
9758
|
+
const classNames3 = useClassNames55({ component: "Select", variant, size: size2 });
|
|
9731
9759
|
return /* @__PURE__ */ jsxs35(FieldBase, { as: Select2, ref, variant, size: size2, ...props, children: [
|
|
9732
9760
|
/* @__PURE__ */ jsxs35(
|
|
9733
9761
|
IconButton,
|
|
9734
9762
|
{
|
|
9735
|
-
className:
|
|
9763
|
+
className: cn55(
|
|
9736
9764
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
9737
9765
|
classNames3.select
|
|
9738
9766
|
),
|
|
9739
9767
|
children: [
|
|
9740
9768
|
/* @__PURE__ */ jsx95(SelectValue, { className: "[&>[slot=description]]:hidden" }),
|
|
9741
|
-
/* @__PURE__ */ jsx95(ChevronDown, { className:
|
|
9769
|
+
/* @__PURE__ */ jsx95(ChevronDown, { className: cn55("size-4", classNames3.icon) })
|
|
9742
9770
|
]
|
|
9743
9771
|
}
|
|
9744
9772
|
),
|
|
@@ -9754,20 +9782,20 @@ import {
|
|
|
9754
9782
|
forwardRef as forwardRef29
|
|
9755
9783
|
} from "react";
|
|
9756
9784
|
import { GridList as SelectList } from "react-aria-components";
|
|
9757
|
-
import { cn as
|
|
9785
|
+
import { cn as cn57, useClassNames as useClassNames56 } from "@marigold/system";
|
|
9758
9786
|
|
|
9759
9787
|
// src/SelectList/Context.ts
|
|
9760
|
-
import { createContext as
|
|
9761
|
-
var SelectListContext =
|
|
9788
|
+
import { createContext as createContext14, useContext as useContext24 } from "react";
|
|
9789
|
+
var SelectListContext = createContext14(
|
|
9762
9790
|
{}
|
|
9763
9791
|
);
|
|
9764
|
-
var useSelectListContext = () =>
|
|
9792
|
+
var useSelectListContext = () => useContext24(SelectListContext);
|
|
9765
9793
|
|
|
9766
9794
|
// src/SelectList/SelectListItem.tsx
|
|
9767
9795
|
import { forwardRef as forwardRef28 } from "react";
|
|
9768
9796
|
import { GridListItem as SelectListItem } from "react-aria-components";
|
|
9769
|
-
import { cn as
|
|
9770
|
-
import { Fragment as
|
|
9797
|
+
import { cn as cn56 } from "@marigold/system";
|
|
9798
|
+
import { Fragment as Fragment11, jsx as jsx96, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
9771
9799
|
var CheckMark3 = ({ className }) => /* @__PURE__ */ jsx96("svg", { width: "12px", height: "10px", viewBox: "0 0 12 10", className, children: /* @__PURE__ */ jsx96(
|
|
9772
9800
|
"path",
|
|
9773
9801
|
{
|
|
@@ -9795,9 +9823,9 @@ var _SelectListItem = forwardRef28(
|
|
|
9795
9823
|
{
|
|
9796
9824
|
textValue,
|
|
9797
9825
|
...props,
|
|
9798
|
-
className:
|
|
9826
|
+
className: cn56("group-[layout=grid]/list:flex-row", classNames3 == null ? void 0 : classNames3.item),
|
|
9799
9827
|
ref,
|
|
9800
|
-
children: ({ selectionMode }) => /* @__PURE__ */ jsxs36(
|
|
9828
|
+
children: ({ selectionMode }) => /* @__PURE__ */ jsxs36(Fragment11, { children: [
|
|
9801
9829
|
/* @__PURE__ */ jsx96(SelectionIndicator, { selectionMode }),
|
|
9802
9830
|
children
|
|
9803
9831
|
] })
|
|
@@ -9810,7 +9838,7 @@ var _SelectListItem = forwardRef28(
|
|
|
9810
9838
|
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
9811
9839
|
var _SelectList = forwardRef29(
|
|
9812
9840
|
({ onChange: onChange2, ...rest }, ref) => {
|
|
9813
|
-
const classNames3 =
|
|
9841
|
+
const classNames3 = useClassNames56({ component: "ListBox" });
|
|
9814
9842
|
const props = {
|
|
9815
9843
|
onSelectionChange: onChange2,
|
|
9816
9844
|
...rest
|
|
@@ -9821,7 +9849,7 @@ var _SelectList = forwardRef29(
|
|
|
9821
9849
|
...props,
|
|
9822
9850
|
layout: "grid",
|
|
9823
9851
|
ref,
|
|
9824
|
-
className:
|
|
9852
|
+
className: cn57(
|
|
9825
9853
|
"group/list overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh]",
|
|
9826
9854
|
classNames3.list
|
|
9827
9855
|
),
|
|
@@ -9833,7 +9861,7 @@ var _SelectList = forwardRef29(
|
|
|
9833
9861
|
_SelectList.Item = _SelectListItem;
|
|
9834
9862
|
|
|
9835
9863
|
// src/Scrollable/Scrollable.tsx
|
|
9836
|
-
import { cn as
|
|
9864
|
+
import { cn as cn58, createVar as createVar8, width as twWidth2 } from "@marigold/system";
|
|
9837
9865
|
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
9838
9866
|
var Scrollable = ({
|
|
9839
9867
|
children,
|
|
@@ -9844,7 +9872,7 @@ var Scrollable = ({
|
|
|
9844
9872
|
"div",
|
|
9845
9873
|
{
|
|
9846
9874
|
...props,
|
|
9847
|
-
className:
|
|
9875
|
+
className: cn58(["sticky h-(--height) overflow-auto", twWidth2[width]]),
|
|
9848
9876
|
style: createVar8({ height }),
|
|
9849
9877
|
children
|
|
9850
9878
|
}
|
|
@@ -9859,11 +9887,11 @@ import {
|
|
|
9859
9887
|
SliderTrack
|
|
9860
9888
|
} from "react-aria-components";
|
|
9861
9889
|
import {
|
|
9862
|
-
cn as
|
|
9890
|
+
cn as cn59,
|
|
9863
9891
|
width as twWidth3,
|
|
9864
|
-
useClassNames as
|
|
9892
|
+
useClassNames as useClassNames57
|
|
9865
9893
|
} from "@marigold/system";
|
|
9866
|
-
import { Fragment as
|
|
9894
|
+
import { Fragment as Fragment12, jsx as jsx99, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
9867
9895
|
var _Slider = forwardRef30(
|
|
9868
9896
|
({
|
|
9869
9897
|
thumbLabels,
|
|
@@ -9874,7 +9902,7 @@ var _Slider = forwardRef30(
|
|
|
9874
9902
|
label,
|
|
9875
9903
|
...rest
|
|
9876
9904
|
}, ref) => {
|
|
9877
|
-
const classNames3 =
|
|
9905
|
+
const classNames3 = useClassNames57({
|
|
9878
9906
|
component: "Slider",
|
|
9879
9907
|
variant,
|
|
9880
9908
|
size: size2
|
|
@@ -9887,7 +9915,7 @@ var _Slider = forwardRef30(
|
|
|
9887
9915
|
FieldBase,
|
|
9888
9916
|
{
|
|
9889
9917
|
as: Slider,
|
|
9890
|
-
className:
|
|
9918
|
+
className: cn59(
|
|
9891
9919
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
9892
9920
|
classNames3.container,
|
|
9893
9921
|
twWidth3[width]
|
|
@@ -9896,16 +9924,16 @@ var _Slider = forwardRef30(
|
|
|
9896
9924
|
...props,
|
|
9897
9925
|
children: [
|
|
9898
9926
|
label && /* @__PURE__ */ jsx99(_Label, { children: label }),
|
|
9899
|
-
/* @__PURE__ */ jsx99(SliderOutput, { className:
|
|
9927
|
+
/* @__PURE__ */ jsx99(SliderOutput, { className: cn59("flex justify-end", classNames3.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
9900
9928
|
/* @__PURE__ */ jsx99(
|
|
9901
9929
|
SliderTrack,
|
|
9902
9930
|
{
|
|
9903
|
-
className:
|
|
9904
|
-
children: ({ state }) => /* @__PURE__ */ jsxs37(
|
|
9931
|
+
className: cn59("relative col-span-2 h-2 w-full", classNames3.track),
|
|
9932
|
+
children: ({ state }) => /* @__PURE__ */ jsxs37(Fragment12, { children: [
|
|
9905
9933
|
/* @__PURE__ */ jsx99(
|
|
9906
9934
|
"div",
|
|
9907
9935
|
{
|
|
9908
|
-
className:
|
|
9936
|
+
className: cn59(
|
|
9909
9937
|
"absolute top-[50%] h-2 w-full translate-y-[-50%]",
|
|
9910
9938
|
classNames3.track
|
|
9911
9939
|
)
|
|
@@ -9914,7 +9942,7 @@ var _Slider = forwardRef30(
|
|
|
9914
9942
|
/* @__PURE__ */ jsx99(
|
|
9915
9943
|
"div",
|
|
9916
9944
|
{
|
|
9917
|
-
className:
|
|
9945
|
+
className: cn59(
|
|
9918
9946
|
"absolute top-[50%] h-2 translate-y-[-50%]",
|
|
9919
9947
|
classNames3.selectedTrack
|
|
9920
9948
|
),
|
|
@@ -9927,7 +9955,7 @@ var _Slider = forwardRef30(
|
|
|
9927
9955
|
state.values.map((_, i) => /* @__PURE__ */ jsx99(
|
|
9928
9956
|
SliderThumb,
|
|
9929
9957
|
{
|
|
9930
|
-
className:
|
|
9958
|
+
className: cn59("top-1/2 cursor-pointer", classNames3.thumb),
|
|
9931
9959
|
index: i,
|
|
9932
9960
|
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i],
|
|
9933
9961
|
name: thumbLabels == null ? void 0 : thumbLabels[i]
|
|
@@ -9948,7 +9976,7 @@ import { jsx as jsx100 } from "react/jsx-runtime";
|
|
|
9948
9976
|
var Split = () => /* @__PURE__ */ jsx100("div", { role: "separator", className: "grow" });
|
|
9949
9977
|
|
|
9950
9978
|
// src/Stack/Stack.tsx
|
|
9951
|
-
import { alignment as alignment2, cn as
|
|
9979
|
+
import { alignment as alignment2, cn as cn60, gapSpace as gapSpace8 } from "@marigold/system";
|
|
9952
9980
|
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
9953
9981
|
var Stack = ({
|
|
9954
9982
|
children,
|
|
@@ -9962,7 +9990,7 @@ var Stack = ({
|
|
|
9962
9990
|
return /* @__PURE__ */ jsx101(
|
|
9963
9991
|
"div",
|
|
9964
9992
|
{
|
|
9965
|
-
className:
|
|
9993
|
+
className: cn60(
|
|
9966
9994
|
"flex flex-col",
|
|
9967
9995
|
gapSpace8[space],
|
|
9968
9996
|
alignX && ((_b = (_a = alignment2) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -9979,9 +10007,9 @@ var Stack = ({
|
|
|
9979
10007
|
import { forwardRef as forwardRef31 } from "react";
|
|
9980
10008
|
import { Switch } from "react-aria-components";
|
|
9981
10009
|
import {
|
|
9982
|
-
cn as
|
|
10010
|
+
cn as cn61,
|
|
9983
10011
|
width as twWidth4,
|
|
9984
|
-
useClassNames as
|
|
10012
|
+
useClassNames as useClassNames58
|
|
9985
10013
|
} from "@marigold/system";
|
|
9986
10014
|
import { jsx as jsx102, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
9987
10015
|
var _Switch = forwardRef31(
|
|
@@ -9995,7 +10023,7 @@ var _Switch = forwardRef31(
|
|
|
9995
10023
|
readOnly,
|
|
9996
10024
|
...rest
|
|
9997
10025
|
}, ref) => {
|
|
9998
|
-
const classNames3 =
|
|
10026
|
+
const classNames3 = useClassNames58({ component: "Switch", size: size2, variant });
|
|
9999
10027
|
const props = {
|
|
10000
10028
|
isDisabled: disabled,
|
|
10001
10029
|
isReadOnly: readOnly,
|
|
@@ -10007,7 +10035,7 @@ var _Switch = forwardRef31(
|
|
|
10007
10035
|
{
|
|
10008
10036
|
...props,
|
|
10009
10037
|
ref,
|
|
10010
|
-
className:
|
|
10038
|
+
className: cn61(
|
|
10011
10039
|
twWidth4[width],
|
|
10012
10040
|
"group/switch",
|
|
10013
10041
|
"flex items-center gap-[1ch]",
|
|
@@ -10033,12 +10061,12 @@ import {
|
|
|
10033
10061
|
Row,
|
|
10034
10062
|
useTableState
|
|
10035
10063
|
} from "@react-stately/table";
|
|
10036
|
-
import { cn as
|
|
10064
|
+
import { cn as cn68, useClassNames as useClassNames60 } from "@marigold/system";
|
|
10037
10065
|
|
|
10038
10066
|
// src/Table/Context.tsx
|
|
10039
|
-
import { createContext as
|
|
10040
|
-
var TableContext =
|
|
10041
|
-
var useTableContext = () =>
|
|
10067
|
+
import { createContext as createContext15, useContext as useContext25 } from "react";
|
|
10068
|
+
var TableContext = createContext15({});
|
|
10069
|
+
var useTableContext = () => useContext25(TableContext);
|
|
10042
10070
|
|
|
10043
10071
|
// src/Table/TableBody.tsx
|
|
10044
10072
|
import { useTableRowGroup } from "@react-aria/table";
|
|
@@ -10069,7 +10097,7 @@ import { useRef as useRef10 } from "react";
|
|
|
10069
10097
|
import { useFocusRing } from "@react-aria/focus";
|
|
10070
10098
|
import { useTableCell } from "@react-aria/table";
|
|
10071
10099
|
import { mergeProps as mergeProps2 } from "@react-aria/utils";
|
|
10072
|
-
import { cn as
|
|
10100
|
+
import { cn as cn62, useStateProps } from "@marigold/system";
|
|
10073
10101
|
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
10074
10102
|
var TableCell = ({ cell, align = "left" }) => {
|
|
10075
10103
|
const ref = useRef10(null);
|
|
@@ -10097,7 +10125,7 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
10097
10125
|
"td",
|
|
10098
10126
|
{
|
|
10099
10127
|
ref,
|
|
10100
|
-
className:
|
|
10128
|
+
className: cn62(classNames3 == null ? void 0 : classNames3.cell),
|
|
10101
10129
|
...mergeProps2(cellProps, focusProps),
|
|
10102
10130
|
...stateProps,
|
|
10103
10131
|
align,
|
|
@@ -10111,7 +10139,7 @@ import { useRef as useRef11 } from "react";
|
|
|
10111
10139
|
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
10112
10140
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
10113
10141
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
10114
|
-
import { cn as
|
|
10142
|
+
import { cn as cn63, useStateProps as useStateProps2 } from "@marigold/system";
|
|
10115
10143
|
|
|
10116
10144
|
// src/Table/utils.ts
|
|
10117
10145
|
var mapCheckboxProps = ({
|
|
@@ -10155,7 +10183,7 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
10155
10183
|
"td",
|
|
10156
10184
|
{
|
|
10157
10185
|
ref,
|
|
10158
|
-
className:
|
|
10186
|
+
className: cn63("text-center align-middle leading-none", classNames3 == null ? void 0 : classNames3.cell),
|
|
10159
10187
|
...mergeProps3(gridCellProps, focusProps),
|
|
10160
10188
|
...stateProps,
|
|
10161
10189
|
children: /* @__PURE__ */ jsx105(_Checkbox, { ...checkboxProps })
|
|
@@ -10169,7 +10197,7 @@ import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
|
10169
10197
|
import { useHover } from "@react-aria/interactions";
|
|
10170
10198
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
10171
10199
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
10172
|
-
import { cn as
|
|
10200
|
+
import { cn as cn64, width as twWidth5, useStateProps as useStateProps3 } from "@marigold/system";
|
|
10173
10201
|
import { jsx as jsx106, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
10174
10202
|
var TableColumnHeader = ({
|
|
10175
10203
|
column: column2,
|
|
@@ -10197,7 +10225,7 @@ var TableColumnHeader = ({
|
|
|
10197
10225
|
{
|
|
10198
10226
|
colSpan: column2.colspan,
|
|
10199
10227
|
ref,
|
|
10200
|
-
className:
|
|
10228
|
+
className: cn64("cursor-default", twWidth5[width], classNames3 == null ? void 0 : classNames3.header),
|
|
10201
10229
|
...mergeProps4(columnHeaderProps, hoverProps, focusProps),
|
|
10202
10230
|
...stateProps,
|
|
10203
10231
|
align,
|
|
@@ -10211,7 +10239,7 @@ var TableColumnHeader = ({
|
|
|
10211
10239
|
|
|
10212
10240
|
// src/Table/TableHeader.tsx
|
|
10213
10241
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
10214
|
-
import { cn as
|
|
10242
|
+
import { cn as cn65 } from "@marigold/system";
|
|
10215
10243
|
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
10216
10244
|
var TableHeader = ({ stickyHeader, children }) => {
|
|
10217
10245
|
const { rowGroupProps } = useTableRowGroup2();
|
|
@@ -10220,7 +10248,7 @@ var TableHeader = ({ stickyHeader, children }) => {
|
|
|
10220
10248
|
"thead",
|
|
10221
10249
|
{
|
|
10222
10250
|
...rowGroupProps,
|
|
10223
|
-
className:
|
|
10251
|
+
className: cn65(
|
|
10224
10252
|
classNames3 == null ? void 0 : classNames3.thead,
|
|
10225
10253
|
// for sticky header &th needs to be sticky for b2b and core theme
|
|
10226
10254
|
// for rui sticky is applied to thead
|
|
@@ -10252,13 +10280,13 @@ import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
|
|
|
10252
10280
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
10253
10281
|
import { useTableRow } from "@react-aria/table";
|
|
10254
10282
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
10255
|
-
import { cn as
|
|
10283
|
+
import { cn as cn66, useClassNames as useClassNames59, useStateProps as useStateProps4 } from "@marigold/system";
|
|
10256
10284
|
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
10257
10285
|
var TableRow = ({ children, row }) => {
|
|
10258
10286
|
const ref = useRef14(null);
|
|
10259
10287
|
const { interactive, state, ...ctx } = useTableContext();
|
|
10260
10288
|
const { variant, size: size2 } = row.props;
|
|
10261
|
-
const classNames3 =
|
|
10289
|
+
const classNames3 = useClassNames59({
|
|
10262
10290
|
component: "Table",
|
|
10263
10291
|
variant: variant || ctx.variant,
|
|
10264
10292
|
size: size2 || ctx.size
|
|
@@ -10287,7 +10315,7 @@ var TableRow = ({ children, row }) => {
|
|
|
10287
10315
|
"tr",
|
|
10288
10316
|
{
|
|
10289
10317
|
ref,
|
|
10290
|
-
className:
|
|
10318
|
+
className: cn66(
|
|
10291
10319
|
[
|
|
10292
10320
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
10293
10321
|
],
|
|
@@ -10310,7 +10338,7 @@ import {
|
|
|
10310
10338
|
} from "@react-aria/table";
|
|
10311
10339
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
10312
10340
|
import {
|
|
10313
|
-
cn as
|
|
10341
|
+
cn as cn67,
|
|
10314
10342
|
width as twWidth6,
|
|
10315
10343
|
useStateProps as useStateProps5
|
|
10316
10344
|
} from "@marigold/system";
|
|
@@ -10340,7 +10368,7 @@ var TableSelectAllCell = ({
|
|
|
10340
10368
|
"th",
|
|
10341
10369
|
{
|
|
10342
10370
|
ref,
|
|
10343
|
-
className:
|
|
10371
|
+
className: cn67(twWidth6[width], ["leading-none"], classNames3 == null ? void 0 : classNames3.header),
|
|
10344
10372
|
...mergeProps6(columnHeaderProps, hoverProps, focusProps),
|
|
10345
10373
|
...stateProps,
|
|
10346
10374
|
align,
|
|
@@ -10373,7 +10401,7 @@ var Table = ({
|
|
|
10373
10401
|
state.isKeyboardNavigationDisabled = disableKeyboardNavigation;
|
|
10374
10402
|
}
|
|
10375
10403
|
const { gridProps } = useTable(props, state, tableRef);
|
|
10376
|
-
const classNames3 =
|
|
10404
|
+
const classNames3 = useClassNames60({
|
|
10377
10405
|
component: "Table",
|
|
10378
10406
|
variant,
|
|
10379
10407
|
size: size2
|
|
@@ -10387,7 +10415,7 @@ var Table = ({
|
|
|
10387
10415
|
"table",
|
|
10388
10416
|
{
|
|
10389
10417
|
ref: tableRef,
|
|
10390
|
-
className:
|
|
10418
|
+
className: cn68(
|
|
10391
10419
|
"group/table",
|
|
10392
10420
|
"border-collapse",
|
|
10393
10421
|
stretch ? "table w-full" : "block",
|
|
@@ -10456,14 +10484,14 @@ Table.Row = Row;
|
|
|
10456
10484
|
// src/Text/Text.tsx
|
|
10457
10485
|
import { Text as Text2 } from "react-aria-components";
|
|
10458
10486
|
import {
|
|
10459
|
-
cn as
|
|
10487
|
+
cn as cn69,
|
|
10460
10488
|
cursorStyle,
|
|
10461
10489
|
ensureCssVar as ensureCssVar2,
|
|
10462
10490
|
fontWeight,
|
|
10463
10491
|
textAlign as textAlign2,
|
|
10464
10492
|
textSize,
|
|
10465
10493
|
textStyle,
|
|
10466
|
-
useClassNames as
|
|
10494
|
+
useClassNames as useClassNames61
|
|
10467
10495
|
} from "@marigold/system";
|
|
10468
10496
|
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
10469
10497
|
var _Text = ({
|
|
@@ -10479,7 +10507,7 @@ var _Text = ({
|
|
|
10479
10507
|
as = "div",
|
|
10480
10508
|
...props
|
|
10481
10509
|
}) => {
|
|
10482
|
-
const classNames3 =
|
|
10510
|
+
const classNames3 = useClassNames61({
|
|
10483
10511
|
component: "Text",
|
|
10484
10512
|
variant,
|
|
10485
10513
|
size: size2
|
|
@@ -10491,7 +10519,7 @@ var _Text = ({
|
|
|
10491
10519
|
{
|
|
10492
10520
|
...props,
|
|
10493
10521
|
...elementType,
|
|
10494
|
-
className:
|
|
10522
|
+
className: cn69(
|
|
10495
10523
|
"max-w-(--maxTextWidth)",
|
|
10496
10524
|
// possibly set by a <Container>
|
|
10497
10525
|
classNames3,
|
|
@@ -10510,7 +10538,7 @@ var _Text = ({
|
|
|
10510
10538
|
// src/TextArea/TextArea.tsx
|
|
10511
10539
|
import { forwardRef as forwardRef32 } from "react";
|
|
10512
10540
|
import { TextArea, TextField } from "react-aria-components";
|
|
10513
|
-
import { useClassNames as
|
|
10541
|
+
import { useClassNames as useClassNames62 } from "@marigold/system";
|
|
10514
10542
|
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
10515
10543
|
var _TextArea = forwardRef32(
|
|
10516
10544
|
({
|
|
@@ -10523,7 +10551,7 @@ var _TextArea = forwardRef32(
|
|
|
10523
10551
|
rows,
|
|
10524
10552
|
...rest
|
|
10525
10553
|
}, ref) => {
|
|
10526
|
-
const classNames3 =
|
|
10554
|
+
const classNames3 = useClassNames62({ component: "TextArea", variant, size: size2 });
|
|
10527
10555
|
const props = {
|
|
10528
10556
|
isDisabled: disabled,
|
|
10529
10557
|
isReadOnly: readOnly,
|
|
@@ -10553,7 +10581,7 @@ var _TextField = forwardRef33(
|
|
|
10553
10581
|
);
|
|
10554
10582
|
|
|
10555
10583
|
// src/Tiles/Tiles.tsx
|
|
10556
|
-
import { cn as
|
|
10584
|
+
import { cn as cn70, createVar as createVar9, gapSpace as gapSpace9 } from "@marigold/system";
|
|
10557
10585
|
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
10558
10586
|
var Tiles = ({
|
|
10559
10587
|
space = 0,
|
|
@@ -10571,7 +10599,7 @@ var Tiles = ({
|
|
|
10571
10599
|
"div",
|
|
10572
10600
|
{
|
|
10573
10601
|
...props,
|
|
10574
|
-
className:
|
|
10602
|
+
className: cn70(
|
|
10575
10603
|
"grid",
|
|
10576
10604
|
gapSpace9[space],
|
|
10577
10605
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
@@ -10585,7 +10613,7 @@ var Tiles = ({
|
|
|
10585
10613
|
|
|
10586
10614
|
// src/Tooltip/Tooltip.tsx
|
|
10587
10615
|
import { OverlayArrow, Tooltip } from "react-aria-components";
|
|
10588
|
-
import { cn as
|
|
10616
|
+
import { cn as cn71, useClassNames as useClassNames63 } from "@marigold/system";
|
|
10589
10617
|
|
|
10590
10618
|
// src/Tooltip/TooltipTrigger.tsx
|
|
10591
10619
|
import { TooltipTrigger } from "react-aria-components";
|
|
@@ -10613,13 +10641,13 @@ var _Tooltip = ({ children, variant, size: size2, open, ...rest }) => {
|
|
|
10613
10641
|
...rest,
|
|
10614
10642
|
isOpen: open
|
|
10615
10643
|
};
|
|
10616
|
-
const classNames3 =
|
|
10644
|
+
const classNames3 = useClassNames63({ component: "Tooltip", variant, size: size2 });
|
|
10617
10645
|
const portal = usePortalContainer();
|
|
10618
10646
|
return /* @__PURE__ */ jsxs41(
|
|
10619
10647
|
Tooltip,
|
|
10620
10648
|
{
|
|
10621
10649
|
...props,
|
|
10622
|
-
className:
|
|
10650
|
+
className: cn71("group/tooltip", classNames3.container),
|
|
10623
10651
|
UNSTABLE_portalContainer: portal,
|
|
10624
10652
|
children: [
|
|
10625
10653
|
/* @__PURE__ */ jsx117(OverlayArrow, { className: classNames3.arrow, children: /* @__PURE__ */ jsx117("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx117("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
@@ -10632,19 +10660,19 @@ _Tooltip.Trigger = _TooltipTrigger;
|
|
|
10632
10660
|
|
|
10633
10661
|
// src/TagGroup/Tag.tsx
|
|
10634
10662
|
import { Tag } from "react-aria-components";
|
|
10635
|
-
import { cn as
|
|
10663
|
+
import { cn as cn72, useClassNames as useClassNames65 } from "@marigold/system";
|
|
10636
10664
|
|
|
10637
10665
|
// src/TagGroup/TagGroup.tsx
|
|
10638
10666
|
import { TagGroup, TagList } from "react-aria-components";
|
|
10639
|
-
import { useClassNames as
|
|
10667
|
+
import { useClassNames as useClassNames64 } from "@marigold/system";
|
|
10640
10668
|
|
|
10641
10669
|
// src/TagGroup/TagGroupHiddenInput.tsx
|
|
10642
|
-
import { useContext as
|
|
10670
|
+
import { useContext as useContext26 } from "react";
|
|
10643
10671
|
import { ListStateContext } from "react-aria-components";
|
|
10644
10672
|
import { jsx as jsx118 } from "react/jsx-runtime";
|
|
10645
10673
|
var TagGroupHiddenInput = ({ name }) => {
|
|
10646
10674
|
var _a;
|
|
10647
|
-
const state =
|
|
10675
|
+
const state = useContext26(ListStateContext);
|
|
10648
10676
|
const selectedKeys = Array.from((_a = state == null ? void 0 : state.selectionManager.selectedKeys) != null ? _a : []);
|
|
10649
10677
|
if (!selectedKeys.length) return null;
|
|
10650
10678
|
return /* @__PURE__ */ jsx118("div", { hidden: true, "aria-hidden": "true", children: selectedKeys.map((key) => /* @__PURE__ */ jsx118(
|
|
@@ -10672,7 +10700,7 @@ var _TagGroup = ({
|
|
|
10672
10700
|
name,
|
|
10673
10701
|
...rest
|
|
10674
10702
|
}) => {
|
|
10675
|
-
const classNames3 =
|
|
10703
|
+
const classNames3 = useClassNames64({ component: "Tag", variant, size: size2 });
|
|
10676
10704
|
return /* @__PURE__ */ jsxs42(FieldBase, { as: TagGroup, ...rest, children: [
|
|
10677
10705
|
/* @__PURE__ */ jsx119(
|
|
10678
10706
|
TagList,
|
|
@@ -10688,10 +10716,10 @@ var _TagGroup = ({
|
|
|
10688
10716
|
};
|
|
10689
10717
|
|
|
10690
10718
|
// src/TagGroup/Tag.tsx
|
|
10691
|
-
import { Fragment as
|
|
10719
|
+
import { Fragment as Fragment13, jsx as jsx120, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
10692
10720
|
var _Tag = ({ variant, size: size2, children, disabled, ...rest }) => {
|
|
10693
10721
|
let textValue = typeof children === "string" ? children : void 0;
|
|
10694
|
-
const classNames3 =
|
|
10722
|
+
const classNames3 = useClassNames65({ component: "Tag", variant, size: size2 });
|
|
10695
10723
|
const props = {
|
|
10696
10724
|
isDisabled: disabled,
|
|
10697
10725
|
...rest
|
|
@@ -10701,8 +10729,8 @@ var _Tag = ({ variant, size: size2, children, disabled, ...rest }) => {
|
|
|
10701
10729
|
{
|
|
10702
10730
|
textValue,
|
|
10703
10731
|
...props,
|
|
10704
|
-
className:
|
|
10705
|
-
children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs43(
|
|
10732
|
+
className: cn72("data-selection-mode:cursor-pointer", classNames3.tag),
|
|
10733
|
+
children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs43(Fragment13, { children: [
|
|
10706
10734
|
children,
|
|
10707
10735
|
allowsRemoving && /* @__PURE__ */ jsx120(CloseButton, { className: classNames3.closeButton, slot: "remove" })
|
|
10708
10736
|
] })
|
|
@@ -10717,12 +10745,12 @@ import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
|
10717
10745
|
// src/XLoader/XLoader.tsx
|
|
10718
10746
|
import { Dialog as Dialog4, Modal as Modal2 } from "react-aria-components";
|
|
10719
10747
|
import { useId as useId2 } from "@react-aria/utils";
|
|
10720
|
-
import { useClassNames as
|
|
10748
|
+
import { useClassNames as useClassNames67 } from "@marigold/system";
|
|
10721
10749
|
|
|
10722
10750
|
// src/XLoader/BaseLoader.tsx
|
|
10723
10751
|
import { Label as Label2, ProgressBar as ProgressBar2 } from "react-aria-components";
|
|
10724
10752
|
import { useLocalizedStringFormatter as useLocalizedStringFormatter2 } from "@react-aria/i18n";
|
|
10725
|
-
import { useClassNames as
|
|
10753
|
+
import { useClassNames as useClassNames66 } from "@marigold/system";
|
|
10726
10754
|
|
|
10727
10755
|
// src/intl/messages.ts
|
|
10728
10756
|
var intlMessages2 = {
|
|
@@ -10744,7 +10772,7 @@ var BaseLoader = ({
|
|
|
10744
10772
|
...props
|
|
10745
10773
|
}) => {
|
|
10746
10774
|
const stringFormatter = useLocalizedStringFormatter2(intlMessages2, "marigold");
|
|
10747
|
-
const className =
|
|
10775
|
+
const className = useClassNames66({ component: "XLoader", variant, size: size2 });
|
|
10748
10776
|
return /* @__PURE__ */ jsxs44(
|
|
10749
10777
|
ProgressBar2,
|
|
10750
10778
|
{
|
|
@@ -10976,7 +11004,7 @@ var LoaderFullScreen = (props) => {
|
|
|
10976
11004
|
return /* @__PURE__ */ jsx122(Underlay, { defaultOpen: true, keyboardDismissable: true, variant: "modal", children: /* @__PURE__ */ jsx122(Modal2, { className: "grid h-(--visual-viewport-height) cursor-progress place-items-center", children: /* @__PURE__ */ jsx122(Dialog4, { className: "outline-0", "aria-labelledby": id, children: /* @__PURE__ */ jsx122(BaseLoader, { id, ...props }) }) }) });
|
|
10977
11005
|
};
|
|
10978
11006
|
var LoaderSection = (props) => {
|
|
10979
|
-
const className =
|
|
11007
|
+
const className = useClassNames67({
|
|
10980
11008
|
component: "Underlay",
|
|
10981
11009
|
variant: "modal",
|
|
10982
11010
|
className: "flex size-full items-center justify-center"
|
|
@@ -10987,16 +11015,16 @@ var XLoader = ({ mode, variant, ...props }) => mode === "fullscreen" ? /* @__PUR
|
|
|
10987
11015
|
|
|
10988
11016
|
// src/Tabs/Tabs.tsx
|
|
10989
11017
|
import { Tabs } from "react-aria-components";
|
|
10990
|
-
import { useClassNames as
|
|
11018
|
+
import { useClassNames as useClassNames68 } from "@marigold/system";
|
|
10991
11019
|
|
|
10992
11020
|
// src/Tabs/Context.ts
|
|
10993
|
-
import { createContext as
|
|
10994
|
-
var TabContext =
|
|
10995
|
-
var useTabContext = () =>
|
|
11021
|
+
import { createContext as createContext16, useContext as useContext27 } from "react";
|
|
11022
|
+
var TabContext = createContext16({});
|
|
11023
|
+
var useTabContext = () => useContext27(TabContext);
|
|
10996
11024
|
|
|
10997
11025
|
// src/Tabs/Tab.tsx
|
|
10998
11026
|
import { Tab } from "react-aria-components";
|
|
10999
|
-
import { cn as
|
|
11027
|
+
import { cn as cn73 } from "@marigold/system";
|
|
11000
11028
|
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
11001
11029
|
var _Tab = (props) => {
|
|
11002
11030
|
const { classNames: classNames3 } = useTabContext();
|
|
@@ -11004,7 +11032,7 @@ var _Tab = (props) => {
|
|
|
11004
11032
|
Tab,
|
|
11005
11033
|
{
|
|
11006
11034
|
...props,
|
|
11007
|
-
className:
|
|
11035
|
+
className: cn73(
|
|
11008
11036
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
11009
11037
|
classNames3.tab
|
|
11010
11038
|
),
|
|
@@ -11015,7 +11043,7 @@ var _Tab = (props) => {
|
|
|
11015
11043
|
|
|
11016
11044
|
// src/Tabs/TabList.tsx
|
|
11017
11045
|
import { TabList } from "react-aria-components";
|
|
11018
|
-
import { cn as
|
|
11046
|
+
import { cn as cn74, gapSpace as gapSpace10 } from "@marigold/system";
|
|
11019
11047
|
import { jsx as jsx124 } from "react/jsx-runtime";
|
|
11020
11048
|
var _TabList = ({ space = 2, ...props }) => {
|
|
11021
11049
|
const { classNames: classNames3 } = useTabContext();
|
|
@@ -11023,7 +11051,7 @@ var _TabList = ({ space = 2, ...props }) => {
|
|
|
11023
11051
|
TabList,
|
|
11024
11052
|
{
|
|
11025
11053
|
...props,
|
|
11026
|
-
className:
|
|
11054
|
+
className: cn74("flex", gapSpace10[space], classNames3.tabsList),
|
|
11027
11055
|
children: props.children
|
|
11028
11056
|
}
|
|
11029
11057
|
);
|
|
@@ -11044,7 +11072,7 @@ var _Tabs = ({ disabled, variant, size: size2 = "medium", ...rest }) => {
|
|
|
11044
11072
|
isDisabled: disabled,
|
|
11045
11073
|
...rest
|
|
11046
11074
|
};
|
|
11047
|
-
const classNames3 =
|
|
11075
|
+
const classNames3 = useClassNames68({
|
|
11048
11076
|
component: "Tabs",
|
|
11049
11077
|
size: size2,
|
|
11050
11078
|
variant
|
|
@@ -11132,7 +11160,6 @@ export {
|
|
|
11132
11160
|
Underlay,
|
|
11133
11161
|
VisuallyHidden,
|
|
11134
11162
|
XLoader,
|
|
11135
|
-
_Calendar,
|
|
11136
11163
|
gridColsAlign,
|
|
11137
11164
|
gridColumn,
|
|
11138
11165
|
useAsyncList,
|