@marigold/components 6.4.0 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +27 -21
- package/dist/index.d.ts +27 -21
- package/dist/index.js +437 -374
- package/dist/index.mjs +383 -324
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -224,6 +224,7 @@ var Accordion = ({ children, ...props }) => {
|
|
|
224
224
|
state,
|
|
225
225
|
ref
|
|
226
226
|
);
|
|
227
|
+
delete accordionProps.onKeyDownCapture;
|
|
227
228
|
return /* @__PURE__ */ jsx4("div", { ...accordionProps, ref, children: [...state.collection].map((item) => /* @__PURE__ */ jsx4(
|
|
228
229
|
AccordionItem,
|
|
229
230
|
{
|
|
@@ -2921,17 +2922,10 @@ function MarigoldProvider({
|
|
|
2921
2922
|
|
|
2922
2923
|
// src/Radio/Radio.tsx
|
|
2923
2924
|
import {
|
|
2924
|
-
forwardRef as
|
|
2925
|
+
forwardRef as forwardRef14
|
|
2925
2926
|
} from "react";
|
|
2926
|
-
import {
|
|
2927
|
-
import {
|
|
2928
|
-
import { useRadio } from "@react-aria/radio";
|
|
2929
|
-
import { mergeProps as mergeProps14, useObjectRef as useObjectRef7 } from "@react-aria/utils";
|
|
2930
|
-
import {
|
|
2931
|
-
cn as cn34,
|
|
2932
|
-
useClassNames as useClassNames33,
|
|
2933
|
-
useStateProps as useStateProps15
|
|
2934
|
-
} from "@marigold/system";
|
|
2927
|
+
import { Radio } from "react-aria-components";
|
|
2928
|
+
import { cn as cn36, useClassNames as useClassNames35 } from "@marigold/system";
|
|
2935
2929
|
|
|
2936
2930
|
// src/Radio/Context.ts
|
|
2937
2931
|
import { createContext as createContext7, useContext as useContext7 } from "react";
|
|
@@ -2941,63 +2935,149 @@ var RadioGroupContext = createContext7(
|
|
|
2941
2935
|
var useRadioGroupContext = () => useContext7(RadioGroupContext);
|
|
2942
2936
|
|
|
2943
2937
|
// src/Radio/RadioGroup.tsx
|
|
2944
|
-
import {
|
|
2945
|
-
import {
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2938
|
+
import { RadioGroup } from "react-aria-components";
|
|
2939
|
+
import { cn as cn35, useClassNames as useClassNames34 } from "@marigold/system";
|
|
2940
|
+
|
|
2941
|
+
// src/FieldBase/_FieldBase.tsx
|
|
2942
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
2943
|
+
import { cn as cn34, width as twWidth2, useClassNames as useClassNames33 } from "@marigold/system";
|
|
2944
|
+
|
|
2945
|
+
// src/HelpText/_HelpText.tsx
|
|
2946
|
+
import { Text } from "react-aria-components";
|
|
2947
|
+
import { cn as cn33, useClassNames as useClassNames32 } from "@marigold/system";
|
|
2948
|
+
import { Fragment as Fragment7, jsx as jsx64, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2949
|
+
var HelpText2 = ({
|
|
2949
2950
|
variant,
|
|
2950
2951
|
size,
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2952
|
+
description,
|
|
2953
|
+
error,
|
|
2954
|
+
errorMessage,
|
|
2955
|
+
...props
|
|
2956
|
+
}) => {
|
|
2957
|
+
const hasErrorMessage = errorMessage && error;
|
|
2958
|
+
const classNames2 = useClassNames32({
|
|
2959
|
+
component: "HelpText",
|
|
2960
|
+
variant,
|
|
2961
|
+
size
|
|
2962
|
+
});
|
|
2963
|
+
if (!description && !errorMessage) {
|
|
2964
|
+
return null;
|
|
2965
|
+
}
|
|
2966
|
+
return /* @__PURE__ */ jsx64(
|
|
2967
|
+
Text,
|
|
2968
|
+
{
|
|
2969
|
+
...props,
|
|
2970
|
+
slot: hasErrorMessage ? "errorMessage" : "description",
|
|
2971
|
+
className: cn33("flex items-center gap-1", classNames2.container),
|
|
2972
|
+
children: hasErrorMessage ? /* @__PURE__ */ jsxs27(Fragment7, { children: [
|
|
2973
|
+
/* @__PURE__ */ jsx64(
|
|
2974
|
+
"svg",
|
|
2975
|
+
{
|
|
2976
|
+
className: cn33("h-4 w-4", classNames2.icon),
|
|
2977
|
+
viewBox: "0 0 24 24",
|
|
2978
|
+
role: "presentation",
|
|
2979
|
+
children: /* @__PURE__ */ jsx64("path", { d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z" })
|
|
2980
|
+
}
|
|
2981
|
+
),
|
|
2982
|
+
errorMessage
|
|
2983
|
+
] }) : description
|
|
2984
|
+
}
|
|
2985
|
+
);
|
|
2986
|
+
};
|
|
2987
|
+
|
|
2988
|
+
// src/FieldBase/_FieldBase.tsx
|
|
2989
|
+
import { jsx as jsx65, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2990
|
+
var fixedForwardRef = forwardRef13;
|
|
2991
|
+
var _FieldBase = (props, ref) => {
|
|
2992
|
+
const {
|
|
2993
|
+
as: Component = "div",
|
|
2994
|
+
children,
|
|
2995
|
+
label,
|
|
2996
|
+
size,
|
|
2997
|
+
variant,
|
|
2998
|
+
width = "full",
|
|
2999
|
+
description,
|
|
3000
|
+
errorMessage,
|
|
3001
|
+
...rest
|
|
3002
|
+
} = props;
|
|
3003
|
+
const classNames2 = useClassNames33({
|
|
3004
|
+
component: "Field",
|
|
3005
|
+
variant,
|
|
3006
|
+
size
|
|
3007
|
+
});
|
|
3008
|
+
return /* @__PURE__ */ jsxs28(
|
|
3009
|
+
Component,
|
|
3010
|
+
{
|
|
3011
|
+
ref,
|
|
3012
|
+
className: cn34("group/field", twWidth2[width], classNames2),
|
|
3013
|
+
...rest,
|
|
3014
|
+
children: [
|
|
3015
|
+
/* @__PURE__ */ jsx65(_Label, { variant, size, children: label }),
|
|
3016
|
+
children,
|
|
3017
|
+
/* @__PURE__ */ jsx65(
|
|
3018
|
+
HelpText2,
|
|
3019
|
+
{
|
|
3020
|
+
variant,
|
|
3021
|
+
size,
|
|
3022
|
+
description,
|
|
3023
|
+
errorMessage,
|
|
3024
|
+
error: props.isInvalid
|
|
3025
|
+
}
|
|
3026
|
+
)
|
|
3027
|
+
]
|
|
3028
|
+
}
|
|
3029
|
+
);
|
|
3030
|
+
};
|
|
3031
|
+
var FieldBase2 = fixedForwardRef(_FieldBase);
|
|
3032
|
+
|
|
3033
|
+
// src/Radio/RadioGroup.tsx
|
|
3034
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
3035
|
+
var _RadioGroup = ({
|
|
3036
|
+
variant,
|
|
3037
|
+
size,
|
|
3038
|
+
label,
|
|
3039
|
+
error,
|
|
2955
3040
|
disabled,
|
|
3041
|
+
required,
|
|
2956
3042
|
readOnly,
|
|
2957
|
-
|
|
3043
|
+
description,
|
|
3044
|
+
errorMessage,
|
|
3045
|
+
orientation = "vertical",
|
|
3046
|
+
children,
|
|
3047
|
+
width,
|
|
2958
3048
|
...rest
|
|
2959
3049
|
}) => {
|
|
3050
|
+
const classNames2 = useClassNames34({ component: "Radio", variant, size });
|
|
2960
3051
|
const props = {
|
|
2961
|
-
isRequired: required,
|
|
2962
3052
|
isDisabled: disabled,
|
|
2963
3053
|
isReadOnly: readOnly,
|
|
2964
|
-
|
|
3054
|
+
isRequired: required,
|
|
3055
|
+
isInvalid: error,
|
|
2965
3056
|
...rest
|
|
2966
3057
|
};
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
const classNames2 = useClassNames32({ component: "Radio", variant, size });
|
|
2970
|
-
const stateProps = useStateProps14({
|
|
2971
|
-
disabled,
|
|
2972
|
-
readOnly,
|
|
2973
|
-
error,
|
|
2974
|
-
required
|
|
2975
|
-
});
|
|
2976
|
-
return /* @__PURE__ */ jsx64(
|
|
2977
|
-
FieldBase,
|
|
3058
|
+
return /* @__PURE__ */ jsx66(
|
|
3059
|
+
FieldBase2,
|
|
2978
3060
|
{
|
|
3061
|
+
as: RadioGroup,
|
|
2979
3062
|
width,
|
|
2980
|
-
label
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
disabled,
|
|
2988
|
-
stateProps,
|
|
2989
|
-
...radioGroupProps,
|
|
2990
|
-
children: /* @__PURE__ */ jsx64(
|
|
3063
|
+
label,
|
|
3064
|
+
description,
|
|
3065
|
+
errorMessage,
|
|
3066
|
+
variant,
|
|
3067
|
+
size,
|
|
3068
|
+
...props,
|
|
3069
|
+
children: /* @__PURE__ */ jsx66(
|
|
2991
3070
|
"div",
|
|
2992
3071
|
{
|
|
2993
3072
|
role: "presentation",
|
|
3073
|
+
"data-testid": "group",
|
|
2994
3074
|
"data-orientation": orientation,
|
|
2995
|
-
className:
|
|
3075
|
+
className: cn35(
|
|
2996
3076
|
classNames2.group,
|
|
2997
3077
|
"flex items-start",
|
|
2998
3078
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
2999
3079
|
),
|
|
3000
|
-
children: /* @__PURE__ */
|
|
3080
|
+
children: /* @__PURE__ */ jsx66(RadioGroupContext.Provider, { value: { width, variant, size }, children })
|
|
3001
3081
|
}
|
|
3002
3082
|
)
|
|
3003
3083
|
}
|
|
@@ -3005,83 +3085,62 @@ var RadioGroup = ({
|
|
|
3005
3085
|
};
|
|
3006
3086
|
|
|
3007
3087
|
// src/Radio/Radio.tsx
|
|
3008
|
-
import { jsx as
|
|
3009
|
-
var Dot = () => /* @__PURE__ */
|
|
3010
|
-
var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */
|
|
3088
|
+
import { Fragment as Fragment8, jsx as jsx67, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3089
|
+
var Dot = () => /* @__PURE__ */ jsx67("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx67("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
3090
|
+
var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx67(
|
|
3011
3091
|
"div",
|
|
3012
3092
|
{
|
|
3013
|
-
className:
|
|
3093
|
+
className: cn36(
|
|
3014
3094
|
"bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
|
|
3015
3095
|
className
|
|
3016
3096
|
),
|
|
3017
3097
|
"aria-hidden": "true",
|
|
3018
3098
|
...props,
|
|
3019
|
-
children: checked ? /* @__PURE__ */
|
|
3099
|
+
children: checked ? /* @__PURE__ */ jsx67(Dot, {}) : null
|
|
3020
3100
|
}
|
|
3021
3101
|
);
|
|
3022
|
-
var
|
|
3023
|
-
({
|
|
3024
|
-
const {
|
|
3025
|
-
|
|
3026
|
-
size,
|
|
3027
|
-
error,
|
|
3028
|
-
width: groupWidth,
|
|
3029
|
-
state
|
|
3030
|
-
} = useRadioGroupContext();
|
|
3031
|
-
const inputRef = useObjectRef7(ref);
|
|
3032
|
-
const { inputProps } = useRadio(
|
|
3033
|
-
{ isDisabled: disabled, ...props },
|
|
3034
|
-
state,
|
|
3035
|
-
inputRef
|
|
3036
|
-
);
|
|
3037
|
-
const classNames2 = useClassNames33({
|
|
3102
|
+
var _Radio = forwardRef14(
|
|
3103
|
+
({ value, disabled, width, children, ...props }, ref) => {
|
|
3104
|
+
const { variant, size, width: groupWidth } = useRadioGroupContext();
|
|
3105
|
+
const classNames2 = useClassNames35({
|
|
3038
3106
|
component: "Radio",
|
|
3039
3107
|
variant: variant || props.variant,
|
|
3040
3108
|
size: size || props.size
|
|
3041
3109
|
});
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
const stateProps = useStateProps15({
|
|
3045
|
-
hover: isHovered,
|
|
3046
|
-
focus: isFocusVisible,
|
|
3047
|
-
checked: inputProps.checked,
|
|
3048
|
-
disabled: inputProps.disabled,
|
|
3049
|
-
readOnly: props.readOnly,
|
|
3050
|
-
error
|
|
3051
|
-
});
|
|
3052
|
-
return /* @__PURE__ */ jsxs27(
|
|
3053
|
-
"label",
|
|
3110
|
+
return /* @__PURE__ */ jsx67(
|
|
3111
|
+
Radio,
|
|
3054
3112
|
{
|
|
3055
|
-
|
|
3113
|
+
ref,
|
|
3114
|
+
className: cn36(
|
|
3056
3115
|
"group/radio",
|
|
3057
3116
|
"relative flex items-center gap-[1ch]",
|
|
3058
3117
|
width || groupWidth || "w-full",
|
|
3059
3118
|
classNames2.container
|
|
3060
3119
|
),
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3120
|
+
value,
|
|
3121
|
+
isDisabled: disabled,
|
|
3122
|
+
...props,
|
|
3123
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs29(Fragment8, { children: [
|
|
3124
|
+
/* @__PURE__ */ jsx67(
|
|
3125
|
+
Icon2,
|
|
3065
3126
|
{
|
|
3066
|
-
|
|
3067
|
-
className:
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
)
|
|
3071
|
-
...mergeProps14(inputProps, focusProps)
|
|
3127
|
+
checked: isSelected,
|
|
3128
|
+
className: cn36(
|
|
3129
|
+
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
3130
|
+
classNames2.radio
|
|
3131
|
+
)
|
|
3072
3132
|
}
|
|
3073
3133
|
),
|
|
3074
|
-
/* @__PURE__ */
|
|
3075
|
-
|
|
3076
|
-
]
|
|
3134
|
+
/* @__PURE__ */ jsx67("div", { className: classNames2.label, children })
|
|
3135
|
+
] })
|
|
3077
3136
|
}
|
|
3078
3137
|
);
|
|
3079
3138
|
}
|
|
3080
3139
|
);
|
|
3081
|
-
|
|
3140
|
+
_Radio.Group = _RadioGroup;
|
|
3082
3141
|
|
|
3083
3142
|
// src/Slider/Slider.tsx
|
|
3084
|
-
import { forwardRef as
|
|
3143
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
3085
3144
|
import {
|
|
3086
3145
|
Slider,
|
|
3087
3146
|
SliderOutput,
|
|
@@ -3089,12 +3148,12 @@ import {
|
|
|
3089
3148
|
SliderTrack
|
|
3090
3149
|
} from "react-aria-components";
|
|
3091
3150
|
import {
|
|
3092
|
-
cn as
|
|
3093
|
-
width as
|
|
3094
|
-
useClassNames as
|
|
3151
|
+
cn as cn37,
|
|
3152
|
+
width as twWidth3,
|
|
3153
|
+
useClassNames as useClassNames36
|
|
3095
3154
|
} from "@marigold/system";
|
|
3096
|
-
import { jsx as
|
|
3097
|
-
var _Slider =
|
|
3155
|
+
import { jsx as jsx68, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3156
|
+
var _Slider = forwardRef15(
|
|
3098
3157
|
({
|
|
3099
3158
|
thumbLabels,
|
|
3100
3159
|
variant,
|
|
@@ -3103,7 +3162,7 @@ var _Slider = forwardRef14(
|
|
|
3103
3162
|
disabled,
|
|
3104
3163
|
...rest
|
|
3105
3164
|
}, ref) => {
|
|
3106
|
-
const classNames2 =
|
|
3165
|
+
const classNames2 = useClassNames36({
|
|
3107
3166
|
component: "Slider",
|
|
3108
3167
|
variant,
|
|
3109
3168
|
size
|
|
@@ -3112,27 +3171,27 @@ var _Slider = forwardRef14(
|
|
|
3112
3171
|
isDisabled: disabled,
|
|
3113
3172
|
...rest
|
|
3114
3173
|
};
|
|
3115
|
-
return /* @__PURE__ */
|
|
3174
|
+
return /* @__PURE__ */ jsxs30(
|
|
3116
3175
|
Slider,
|
|
3117
3176
|
{
|
|
3118
|
-
className:
|
|
3177
|
+
className: cn37(
|
|
3119
3178
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
3120
3179
|
classNames2.container,
|
|
3121
|
-
|
|
3180
|
+
twWidth3[width]
|
|
3122
3181
|
),
|
|
3123
3182
|
ref,
|
|
3124
3183
|
...props,
|
|
3125
3184
|
children: [
|
|
3126
|
-
/* @__PURE__ */
|
|
3127
|
-
/* @__PURE__ */
|
|
3128
|
-
/* @__PURE__ */
|
|
3185
|
+
/* @__PURE__ */ jsx68(_Label, { children: props.children }),
|
|
3186
|
+
/* @__PURE__ */ jsx68(SliderOutput, { className: cn37("flex justify-end", classNames2.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
3187
|
+
/* @__PURE__ */ jsx68(
|
|
3129
3188
|
SliderTrack,
|
|
3130
3189
|
{
|
|
3131
|
-
className:
|
|
3132
|
-
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */
|
|
3190
|
+
className: cn37("relative col-span-2 h-2 w-full", classNames2.track),
|
|
3191
|
+
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */ jsx68(
|
|
3133
3192
|
SliderThumb,
|
|
3134
3193
|
{
|
|
3135
|
-
className:
|
|
3194
|
+
className: cn37("top-1/2 cursor-pointer", classNames2.thumb),
|
|
3136
3195
|
index: i,
|
|
3137
3196
|
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i]
|
|
3138
3197
|
},
|
|
@@ -3147,16 +3206,16 @@ var _Slider = forwardRef14(
|
|
|
3147
3206
|
);
|
|
3148
3207
|
|
|
3149
3208
|
// src/Split/Split.tsx
|
|
3150
|
-
import { jsx as
|
|
3151
|
-
var Split = (props) => /* @__PURE__ */
|
|
3209
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
3210
|
+
var Split = (props) => /* @__PURE__ */ jsx69("div", { ...props, role: "separator", className: "grow" });
|
|
3152
3211
|
|
|
3153
3212
|
// src/Stack/Stack.tsx
|
|
3154
3213
|
import {
|
|
3155
3214
|
alignment as alignment3,
|
|
3156
|
-
cn as
|
|
3215
|
+
cn as cn38,
|
|
3157
3216
|
gapSpace as gapSpace6
|
|
3158
3217
|
} from "@marigold/system";
|
|
3159
|
-
import { jsx as
|
|
3218
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
3160
3219
|
var Stack = ({
|
|
3161
3220
|
children,
|
|
3162
3221
|
space = 0,
|
|
@@ -3167,10 +3226,10 @@ var Stack = ({
|
|
|
3167
3226
|
...props
|
|
3168
3227
|
}) => {
|
|
3169
3228
|
var _a, _b, _c, _d;
|
|
3170
|
-
return /* @__PURE__ */
|
|
3229
|
+
return /* @__PURE__ */ jsx70(
|
|
3171
3230
|
"div",
|
|
3172
3231
|
{
|
|
3173
|
-
className:
|
|
3232
|
+
className: cn38(
|
|
3174
3233
|
"flex flex-col",
|
|
3175
3234
|
gapSpace6[space],
|
|
3176
3235
|
alignX && ((_b = (_a = alignment3) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -3184,15 +3243,15 @@ var Stack = ({
|
|
|
3184
3243
|
};
|
|
3185
3244
|
|
|
3186
3245
|
// src/Switch/Switch.tsx
|
|
3187
|
-
import { forwardRef as
|
|
3246
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
3188
3247
|
import { Switch } from "react-aria-components";
|
|
3189
3248
|
import {
|
|
3190
|
-
cn as
|
|
3191
|
-
width as
|
|
3192
|
-
useClassNames as
|
|
3249
|
+
cn as cn39,
|
|
3250
|
+
width as twWidth4,
|
|
3251
|
+
useClassNames as useClassNames37
|
|
3193
3252
|
} from "@marigold/system";
|
|
3194
|
-
import { jsx as
|
|
3195
|
-
var _Switch =
|
|
3253
|
+
import { jsx as jsx71, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3254
|
+
var _Switch = forwardRef16(
|
|
3196
3255
|
({
|
|
3197
3256
|
variant,
|
|
3198
3257
|
size,
|
|
@@ -3203,14 +3262,14 @@ var _Switch = forwardRef15(
|
|
|
3203
3262
|
readOnly,
|
|
3204
3263
|
...props
|
|
3205
3264
|
}, ref) => {
|
|
3206
|
-
const classNames2 =
|
|
3207
|
-
return /* @__PURE__ */
|
|
3265
|
+
const classNames2 = useClassNames37({ component: "Switch", size, variant });
|
|
3266
|
+
return /* @__PURE__ */ jsxs31(
|
|
3208
3267
|
Switch,
|
|
3209
3268
|
{
|
|
3210
3269
|
...props,
|
|
3211
3270
|
ref,
|
|
3212
|
-
className:
|
|
3213
|
-
|
|
3271
|
+
className: cn39(
|
|
3272
|
+
twWidth4[width],
|
|
3214
3273
|
"group/switch",
|
|
3215
3274
|
"flex items-center justify-between gap-[1ch]",
|
|
3216
3275
|
classNames2.container
|
|
@@ -3219,17 +3278,17 @@ var _Switch = forwardRef15(
|
|
|
3219
3278
|
isReadOnly: readOnly,
|
|
3220
3279
|
children: [
|
|
3221
3280
|
children,
|
|
3222
|
-
/* @__PURE__ */
|
|
3281
|
+
/* @__PURE__ */ jsx71("div", { className: " relative", children: /* @__PURE__ */ jsx71(
|
|
3223
3282
|
"div",
|
|
3224
3283
|
{
|
|
3225
|
-
className:
|
|
3284
|
+
className: cn39(
|
|
3226
3285
|
"h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed ",
|
|
3227
3286
|
classNames2.track
|
|
3228
3287
|
),
|
|
3229
|
-
children: /* @__PURE__ */
|
|
3288
|
+
children: /* @__PURE__ */ jsx71(
|
|
3230
3289
|
"div",
|
|
3231
3290
|
{
|
|
3232
|
-
className:
|
|
3291
|
+
className: cn39(
|
|
3233
3292
|
"h-[22px] w-[22px]",
|
|
3234
3293
|
"cubic-bezier(.7,0,.3,1)",
|
|
3235
3294
|
"absolute left-0 top-px",
|
|
@@ -3258,7 +3317,7 @@ import {
|
|
|
3258
3317
|
Row,
|
|
3259
3318
|
useTableState
|
|
3260
3319
|
} from "@react-stately/table";
|
|
3261
|
-
import { cn as
|
|
3320
|
+
import { cn as cn44, useClassNames as useClassNames39 } from "@marigold/system";
|
|
3262
3321
|
|
|
3263
3322
|
// src/Table/Context.tsx
|
|
3264
3323
|
import { createContext as createContext8, useContext as useContext8 } from "react";
|
|
@@ -3267,19 +3326,19 @@ var useTableContext = () => useContext8(TableContext);
|
|
|
3267
3326
|
|
|
3268
3327
|
// src/Table/TableBody.tsx
|
|
3269
3328
|
import { useTableRowGroup } from "@react-aria/table";
|
|
3270
|
-
import { jsx as
|
|
3329
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
3271
3330
|
var TableBody = ({ children }) => {
|
|
3272
3331
|
const { rowGroupProps } = useTableRowGroup();
|
|
3273
|
-
return /* @__PURE__ */
|
|
3332
|
+
return /* @__PURE__ */ jsx72("tbody", { ...rowGroupProps, children });
|
|
3274
3333
|
};
|
|
3275
3334
|
|
|
3276
3335
|
// src/Table/TableCell.tsx
|
|
3277
3336
|
import { useRef as useRef20 } from "react";
|
|
3278
|
-
import { useFocusRing as
|
|
3337
|
+
import { useFocusRing as useFocusRing8 } from "@react-aria/focus";
|
|
3279
3338
|
import { useTableCell } from "@react-aria/table";
|
|
3280
|
-
import { mergeProps as
|
|
3281
|
-
import { useStateProps as
|
|
3282
|
-
import { jsx as
|
|
3339
|
+
import { mergeProps as mergeProps14 } from "@react-aria/utils";
|
|
3340
|
+
import { useStateProps as useStateProps14 } from "@marigold/system";
|
|
3341
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
3283
3342
|
var TableCell = ({ cell }) => {
|
|
3284
3343
|
const ref = useRef20(null);
|
|
3285
3344
|
const { interactive, state, classNames: classNames2 } = useTableContext();
|
|
@@ -3300,14 +3359,14 @@ var TableCell = ({ cell }) => {
|
|
|
3300
3359
|
onMouseDown: (e) => e.stopPropagation(),
|
|
3301
3360
|
onPointerDown: (e) => e.stopPropagation()
|
|
3302
3361
|
};
|
|
3303
|
-
const { focusProps, isFocusVisible } =
|
|
3304
|
-
const stateProps =
|
|
3305
|
-
return /* @__PURE__ */
|
|
3362
|
+
const { focusProps, isFocusVisible } = useFocusRing8();
|
|
3363
|
+
const stateProps = useStateProps14({ disabled, focusVisible: isFocusVisible });
|
|
3364
|
+
return /* @__PURE__ */ jsx73(
|
|
3306
3365
|
"td",
|
|
3307
3366
|
{
|
|
3308
3367
|
ref,
|
|
3309
3368
|
className: classNames2 == null ? void 0 : classNames2.cell,
|
|
3310
|
-
...
|
|
3369
|
+
...mergeProps14(cellProps, focusProps),
|
|
3311
3370
|
...stateProps,
|
|
3312
3371
|
children: cell.rendered
|
|
3313
3372
|
}
|
|
@@ -3316,10 +3375,10 @@ var TableCell = ({ cell }) => {
|
|
|
3316
3375
|
|
|
3317
3376
|
// src/Table/TableCheckboxCell.tsx
|
|
3318
3377
|
import { useRef as useRef21 } from "react";
|
|
3319
|
-
import { useFocusRing as
|
|
3378
|
+
import { useFocusRing as useFocusRing9 } from "@react-aria/focus";
|
|
3320
3379
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
3321
|
-
import { mergeProps as
|
|
3322
|
-
import { cn as
|
|
3380
|
+
import { mergeProps as mergeProps15 } from "@react-aria/utils";
|
|
3381
|
+
import { cn as cn40, useStateProps as useStateProps15 } from "@marigold/system";
|
|
3323
3382
|
|
|
3324
3383
|
// src/Table/utils.ts
|
|
3325
3384
|
var mapCheckboxProps = ({
|
|
@@ -3342,7 +3401,7 @@ var mapCheckboxProps = ({
|
|
|
3342
3401
|
};
|
|
3343
3402
|
|
|
3344
3403
|
// src/Table/TableCheckboxCell.tsx
|
|
3345
|
-
import { jsx as
|
|
3404
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
3346
3405
|
var TableCheckboxCell = ({ cell }) => {
|
|
3347
3406
|
const ref = useRef21(null);
|
|
3348
3407
|
const { state, classNames: classNames2 } = useTableContext();
|
|
@@ -3357,30 +3416,30 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
3357
3416
|
const { checkboxProps } = mapCheckboxProps(
|
|
3358
3417
|
useTableSelectionCheckbox({ key: cell.parentKey }, state)
|
|
3359
3418
|
);
|
|
3360
|
-
const { focusProps, isFocusVisible } =
|
|
3361
|
-
const stateProps =
|
|
3362
|
-
return /* @__PURE__ */
|
|
3419
|
+
const { focusProps, isFocusVisible } = useFocusRing9();
|
|
3420
|
+
const stateProps = useStateProps15({ disabled, focusVisible: isFocusVisible });
|
|
3421
|
+
return /* @__PURE__ */ jsx74(
|
|
3363
3422
|
"td",
|
|
3364
3423
|
{
|
|
3365
3424
|
ref,
|
|
3366
|
-
className:
|
|
3367
|
-
...
|
|
3425
|
+
className: cn40("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
|
|
3426
|
+
...mergeProps15(gridCellProps, focusProps),
|
|
3368
3427
|
...stateProps,
|
|
3369
|
-
children: /* @__PURE__ */
|
|
3428
|
+
children: /* @__PURE__ */ jsx74(_Checkbox, { ...checkboxProps })
|
|
3370
3429
|
}
|
|
3371
3430
|
);
|
|
3372
3431
|
};
|
|
3373
3432
|
|
|
3374
3433
|
// src/Table/TableColumnHeader.tsx
|
|
3375
3434
|
import { useRef as useRef22 } from "react";
|
|
3376
|
-
import { useFocusRing as
|
|
3377
|
-
import { useHover as
|
|
3435
|
+
import { useFocusRing as useFocusRing10 } from "@react-aria/focus";
|
|
3436
|
+
import { useHover as useHover6 } from "@react-aria/interactions";
|
|
3378
3437
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
3379
|
-
import { mergeProps as
|
|
3438
|
+
import { mergeProps as mergeProps16 } from "@react-aria/utils";
|
|
3380
3439
|
import { SortDown, SortUp } from "@marigold/icons";
|
|
3381
|
-
import { cn as
|
|
3382
|
-
import { width as
|
|
3383
|
-
import { jsx as
|
|
3440
|
+
import { cn as cn41, useStateProps as useStateProps16 } from "@marigold/system";
|
|
3441
|
+
import { width as twWidth5 } from "@marigold/system";
|
|
3442
|
+
import { jsx as jsx75, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3384
3443
|
var TableColumnHeader = ({
|
|
3385
3444
|
column,
|
|
3386
3445
|
width = "auto"
|
|
@@ -3395,23 +3454,23 @@ var TableColumnHeader = ({
|
|
|
3395
3454
|
state,
|
|
3396
3455
|
ref
|
|
3397
3456
|
);
|
|
3398
|
-
const { hoverProps, isHovered } =
|
|
3399
|
-
const { focusProps, isFocusVisible } =
|
|
3400
|
-
const stateProps =
|
|
3457
|
+
const { hoverProps, isHovered } = useHover6({});
|
|
3458
|
+
const { focusProps, isFocusVisible } = useFocusRing10();
|
|
3459
|
+
const stateProps = useStateProps16({
|
|
3401
3460
|
hover: isHovered,
|
|
3402
3461
|
focusVisible: isFocusVisible
|
|
3403
3462
|
});
|
|
3404
|
-
return /* @__PURE__ */
|
|
3463
|
+
return /* @__PURE__ */ jsxs32(
|
|
3405
3464
|
"th",
|
|
3406
3465
|
{
|
|
3407
3466
|
colSpan: column.colspan,
|
|
3408
3467
|
ref,
|
|
3409
|
-
className:
|
|
3410
|
-
...
|
|
3468
|
+
className: cn41("cursor-default", twWidth5[width], classNames2 == null ? void 0 : classNames2.header),
|
|
3469
|
+
...mergeProps16(columnHeaderProps, hoverProps, focusProps),
|
|
3411
3470
|
...stateProps,
|
|
3412
3471
|
children: [
|
|
3413
3472
|
column.rendered,
|
|
3414
|
-
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */
|
|
3473
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx75(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx75(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx75(SortDown, { className: "inline-block" }))
|
|
3415
3474
|
]
|
|
3416
3475
|
}
|
|
3417
3476
|
);
|
|
@@ -3419,36 +3478,36 @@ var TableColumnHeader = ({
|
|
|
3419
3478
|
|
|
3420
3479
|
// src/Table/TableHeader.tsx
|
|
3421
3480
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
3422
|
-
import { jsx as
|
|
3481
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
3423
3482
|
var TableHeader = ({ children }) => {
|
|
3424
3483
|
const { rowGroupProps } = useTableRowGroup2();
|
|
3425
|
-
return /* @__PURE__ */
|
|
3484
|
+
return /* @__PURE__ */ jsx76("thead", { ...rowGroupProps, children });
|
|
3426
3485
|
};
|
|
3427
3486
|
|
|
3428
3487
|
// src/Table/TableHeaderRow.tsx
|
|
3429
3488
|
import { useRef as useRef23 } from "react";
|
|
3430
3489
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
3431
|
-
import { jsx as
|
|
3490
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
3432
3491
|
var TableHeaderRow = ({ item, children }) => {
|
|
3433
3492
|
const { state } = useTableContext();
|
|
3434
3493
|
const ref = useRef23(null);
|
|
3435
3494
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
3436
|
-
return /* @__PURE__ */
|
|
3495
|
+
return /* @__PURE__ */ jsx77("tr", { ...rowProps, ref, children });
|
|
3437
3496
|
};
|
|
3438
3497
|
|
|
3439
3498
|
// src/Table/TableRow.tsx
|
|
3440
3499
|
import { useRef as useRef24 } from "react";
|
|
3441
|
-
import { useFocusRing as
|
|
3442
|
-
import { useHover as
|
|
3500
|
+
import { useFocusRing as useFocusRing11 } from "@react-aria/focus";
|
|
3501
|
+
import { useHover as useHover7 } from "@react-aria/interactions";
|
|
3443
3502
|
import { useTableRow } from "@react-aria/table";
|
|
3444
|
-
import { mergeProps as
|
|
3445
|
-
import { cn as
|
|
3446
|
-
import { jsx as
|
|
3503
|
+
import { mergeProps as mergeProps17 } from "@react-aria/utils";
|
|
3504
|
+
import { cn as cn42, useClassNames as useClassNames38, useStateProps as useStateProps17 } from "@marigold/system";
|
|
3505
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
3447
3506
|
var TableRow = ({ children, row }) => {
|
|
3448
3507
|
const ref = useRef24(null);
|
|
3449
3508
|
const { interactive, state, ...ctx } = useTableContext();
|
|
3450
3509
|
const { variant, size } = row.props;
|
|
3451
|
-
const classNames2 =
|
|
3510
|
+
const classNames2 = useClassNames38({
|
|
3452
3511
|
component: "Table",
|
|
3453
3512
|
variant: variant || ctx.variant,
|
|
3454
3513
|
size: size || ctx.size
|
|
@@ -3462,28 +3521,28 @@ var TableRow = ({ children, row }) => {
|
|
|
3462
3521
|
);
|
|
3463
3522
|
const disabled = state.disabledKeys.has(row.key);
|
|
3464
3523
|
const selected = state.selectionManager.isSelected(row.key);
|
|
3465
|
-
const { focusProps, isFocusVisible } =
|
|
3466
|
-
const { hoverProps, isHovered } =
|
|
3524
|
+
const { focusProps, isFocusVisible } = useFocusRing11({ within: true });
|
|
3525
|
+
const { hoverProps, isHovered } = useHover7({
|
|
3467
3526
|
isDisabled: disabled || !interactive
|
|
3468
3527
|
});
|
|
3469
|
-
const stateProps =
|
|
3528
|
+
const stateProps = useStateProps17({
|
|
3470
3529
|
disabled,
|
|
3471
3530
|
selected,
|
|
3472
3531
|
hover: isHovered,
|
|
3473
3532
|
focusVisible: isFocusVisible,
|
|
3474
3533
|
active: isPressed
|
|
3475
3534
|
});
|
|
3476
|
-
return /* @__PURE__ */
|
|
3535
|
+
return /* @__PURE__ */ jsx78(
|
|
3477
3536
|
"tr",
|
|
3478
3537
|
{
|
|
3479
3538
|
ref,
|
|
3480
|
-
className:
|
|
3539
|
+
className: cn42(
|
|
3481
3540
|
[
|
|
3482
3541
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
3483
3542
|
],
|
|
3484
3543
|
classNames2 == null ? void 0 : classNames2.row
|
|
3485
3544
|
),
|
|
3486
|
-
...
|
|
3545
|
+
...mergeProps17(rowProps, focusProps, hoverProps),
|
|
3487
3546
|
...stateProps,
|
|
3488
3547
|
children
|
|
3489
3548
|
}
|
|
@@ -3492,19 +3551,19 @@ var TableRow = ({ children, row }) => {
|
|
|
3492
3551
|
|
|
3493
3552
|
// src/Table/TableSelectAllCell.tsx
|
|
3494
3553
|
import { useRef as useRef25 } from "react";
|
|
3495
|
-
import { useFocusRing as
|
|
3496
|
-
import { useHover as
|
|
3554
|
+
import { useFocusRing as useFocusRing12 } from "@react-aria/focus";
|
|
3555
|
+
import { useHover as useHover8 } from "@react-aria/interactions";
|
|
3497
3556
|
import {
|
|
3498
3557
|
useTableColumnHeader as useTableColumnHeader2,
|
|
3499
3558
|
useTableSelectAllCheckbox
|
|
3500
3559
|
} from "@react-aria/table";
|
|
3501
|
-
import { mergeProps as
|
|
3560
|
+
import { mergeProps as mergeProps18 } from "@react-aria/utils";
|
|
3502
3561
|
import {
|
|
3503
|
-
cn as
|
|
3504
|
-
width as
|
|
3505
|
-
useStateProps as
|
|
3562
|
+
cn as cn43,
|
|
3563
|
+
width as twWidth6,
|
|
3564
|
+
useStateProps as useStateProps18
|
|
3506
3565
|
} from "@marigold/system";
|
|
3507
|
-
import { jsx as
|
|
3566
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
3508
3567
|
var TableSelectAllCell = ({
|
|
3509
3568
|
column,
|
|
3510
3569
|
width = "auto"
|
|
@@ -3519,30 +3578,30 @@ var TableSelectAllCell = ({
|
|
|
3519
3578
|
ref
|
|
3520
3579
|
);
|
|
3521
3580
|
const { checkboxProps } = mapCheckboxProps(useTableSelectAllCheckbox(state));
|
|
3522
|
-
const { hoverProps, isHovered } =
|
|
3523
|
-
const { focusProps, isFocusVisible } =
|
|
3524
|
-
const stateProps =
|
|
3581
|
+
const { hoverProps, isHovered } = useHover8({});
|
|
3582
|
+
const { focusProps, isFocusVisible } = useFocusRing12();
|
|
3583
|
+
const stateProps = useStateProps18({
|
|
3525
3584
|
hover: isHovered,
|
|
3526
3585
|
focusVisible: isFocusVisible
|
|
3527
3586
|
});
|
|
3528
|
-
return /* @__PURE__ */
|
|
3587
|
+
return /* @__PURE__ */ jsx79(
|
|
3529
3588
|
"th",
|
|
3530
3589
|
{
|
|
3531
3590
|
ref,
|
|
3532
|
-
className:
|
|
3533
|
-
|
|
3591
|
+
className: cn43(
|
|
3592
|
+
twWidth6[width],
|
|
3534
3593
|
["text-center align-middle leading-none"],
|
|
3535
3594
|
classNames2 == null ? void 0 : classNames2.header
|
|
3536
3595
|
),
|
|
3537
|
-
...
|
|
3596
|
+
...mergeProps18(columnHeaderProps, hoverProps, focusProps),
|
|
3538
3597
|
...stateProps,
|
|
3539
|
-
children: /* @__PURE__ */
|
|
3598
|
+
children: /* @__PURE__ */ jsx79(_Checkbox, { ...checkboxProps })
|
|
3540
3599
|
}
|
|
3541
3600
|
);
|
|
3542
3601
|
};
|
|
3543
3602
|
|
|
3544
3603
|
// src/Table/Table.tsx
|
|
3545
|
-
import { jsx as
|
|
3604
|
+
import { jsx as jsx80, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3546
3605
|
var Table = ({
|
|
3547
3606
|
variant,
|
|
3548
3607
|
size,
|
|
@@ -3559,21 +3618,21 @@ var Table = ({
|
|
|
3559
3618
|
props.selectionBehavior !== "replace"
|
|
3560
3619
|
});
|
|
3561
3620
|
const { gridProps } = useTable(props, state, tableRef);
|
|
3562
|
-
const classNames2 =
|
|
3621
|
+
const classNames2 = useClassNames39({
|
|
3563
3622
|
component: "Table",
|
|
3564
3623
|
variant,
|
|
3565
3624
|
size
|
|
3566
3625
|
});
|
|
3567
3626
|
const { collection } = state;
|
|
3568
|
-
return /* @__PURE__ */
|
|
3627
|
+
return /* @__PURE__ */ jsx80(
|
|
3569
3628
|
TableContext.Provider,
|
|
3570
3629
|
{
|
|
3571
3630
|
value: { state, interactive, classNames: classNames2, variant, size },
|
|
3572
|
-
children: /* @__PURE__ */
|
|
3631
|
+
children: /* @__PURE__ */ jsxs33(
|
|
3573
3632
|
"table",
|
|
3574
3633
|
{
|
|
3575
3634
|
ref: tableRef,
|
|
3576
|
-
className:
|
|
3635
|
+
className: cn44(
|
|
3577
3636
|
"group/table",
|
|
3578
3637
|
"border-collapse overflow-auto whitespace-nowrap",
|
|
3579
3638
|
stretch ? "table w-full" : "block",
|
|
@@ -3581,17 +3640,17 @@ var Table = ({
|
|
|
3581
3640
|
),
|
|
3582
3641
|
...gridProps,
|
|
3583
3642
|
children: [
|
|
3584
|
-
/* @__PURE__ */
|
|
3643
|
+
/* @__PURE__ */ jsx80(TableHeader, { children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx80(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
|
|
3585
3644
|
(column) => {
|
|
3586
3645
|
var _a, _b, _c;
|
|
3587
|
-
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3646
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx80(
|
|
3588
3647
|
TableSelectAllCell,
|
|
3589
3648
|
{
|
|
3590
3649
|
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
3591
3650
|
column
|
|
3592
3651
|
},
|
|
3593
3652
|
column.key
|
|
3594
|
-
) : /* @__PURE__ */
|
|
3653
|
+
) : /* @__PURE__ */ jsx80(
|
|
3595
3654
|
TableColumnHeader,
|
|
3596
3655
|
{
|
|
3597
3656
|
width: (_c = column.props) == null ? void 0 : _c.width,
|
|
@@ -3601,12 +3660,12 @@ var Table = ({
|
|
|
3601
3660
|
);
|
|
3602
3661
|
}
|
|
3603
3662
|
) }, headerRow.key)) }),
|
|
3604
|
-
/* @__PURE__ */
|
|
3663
|
+
/* @__PURE__ */ jsxs33(TableBody, { children: [
|
|
3605
3664
|
...collection.rows.map(
|
|
3606
|
-
(row) => row.type === "item" && /* @__PURE__ */
|
|
3665
|
+
(row) => row.type === "item" && /* @__PURE__ */ jsx80(TableRow, { row, children: [...collection.getChildren(row.key)].map(
|
|
3607
3666
|
(cell) => {
|
|
3608
3667
|
var _a;
|
|
3609
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3668
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx80(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx80(TableCell, { cell }, cell.key);
|
|
3610
3669
|
}
|
|
3611
3670
|
) }, row.key)
|
|
3612
3671
|
)
|
|
@@ -3625,7 +3684,7 @@ Table.Row = Row;
|
|
|
3625
3684
|
|
|
3626
3685
|
// src/Text/Text.tsx
|
|
3627
3686
|
import {
|
|
3628
|
-
cn as
|
|
3687
|
+
cn as cn45,
|
|
3629
3688
|
createVar as createVar9,
|
|
3630
3689
|
cursorStyle,
|
|
3631
3690
|
fontWeight,
|
|
@@ -3633,11 +3692,11 @@ import {
|
|
|
3633
3692
|
textAlign as textAlign2,
|
|
3634
3693
|
textSize,
|
|
3635
3694
|
textStyle,
|
|
3636
|
-
useClassNames as
|
|
3695
|
+
useClassNames as useClassNames40,
|
|
3637
3696
|
useTheme as useTheme5
|
|
3638
3697
|
} from "@marigold/system";
|
|
3639
|
-
import { jsx as
|
|
3640
|
-
var
|
|
3698
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3699
|
+
var Text2 = ({
|
|
3641
3700
|
variant,
|
|
3642
3701
|
size,
|
|
3643
3702
|
color,
|
|
@@ -3650,16 +3709,16 @@ var Text = ({
|
|
|
3650
3709
|
...props
|
|
3651
3710
|
}) => {
|
|
3652
3711
|
const theme = useTheme5();
|
|
3653
|
-
const classNames2 =
|
|
3712
|
+
const classNames2 = useClassNames40({
|
|
3654
3713
|
component: "Text",
|
|
3655
3714
|
variant,
|
|
3656
3715
|
size
|
|
3657
3716
|
});
|
|
3658
|
-
return /* @__PURE__ */
|
|
3717
|
+
return /* @__PURE__ */ jsx81(
|
|
3659
3718
|
"p",
|
|
3660
3719
|
{
|
|
3661
3720
|
...props,
|
|
3662
|
-
className:
|
|
3721
|
+
className: cn45(
|
|
3663
3722
|
classNames2,
|
|
3664
3723
|
"text-[--color] outline-[--outline]",
|
|
3665
3724
|
fontStyle && textStyle[fontStyle],
|
|
@@ -3682,14 +3741,14 @@ var Text = ({
|
|
|
3682
3741
|
};
|
|
3683
3742
|
|
|
3684
3743
|
// src/TextArea/TextArea.tsx
|
|
3685
|
-
import { forwardRef as
|
|
3686
|
-
import { useFocusRing as
|
|
3687
|
-
import { useHover as
|
|
3744
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
3745
|
+
import { useFocusRing as useFocusRing13 } from "@react-aria/focus";
|
|
3746
|
+
import { useHover as useHover9 } from "@react-aria/interactions";
|
|
3688
3747
|
import { useTextField } from "@react-aria/textfield";
|
|
3689
|
-
import { useObjectRef as
|
|
3690
|
-
import { useClassNames as
|
|
3691
|
-
import { jsx as
|
|
3692
|
-
var TextArea =
|
|
3748
|
+
import { useObjectRef as useObjectRef7 } from "@react-aria/utils";
|
|
3749
|
+
import { useClassNames as useClassNames41, useStateProps as useStateProps19 } from "@marigold/system";
|
|
3750
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
3751
|
+
var TextArea = forwardRef17(
|
|
3693
3752
|
({
|
|
3694
3753
|
variant,
|
|
3695
3754
|
size,
|
|
@@ -3702,7 +3761,7 @@ var TextArea = forwardRef16(
|
|
|
3702
3761
|
...props
|
|
3703
3762
|
}, ref) => {
|
|
3704
3763
|
const { label, description, errorMessage } = props;
|
|
3705
|
-
const textAreaRef =
|
|
3764
|
+
const textAreaRef = useObjectRef7(ref);
|
|
3706
3765
|
const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField(
|
|
3707
3766
|
{
|
|
3708
3767
|
inputElementType: "textarea",
|
|
@@ -3714,9 +3773,9 @@ var TextArea = forwardRef16(
|
|
|
3714
3773
|
},
|
|
3715
3774
|
textAreaRef
|
|
3716
3775
|
);
|
|
3717
|
-
const { hoverProps, isHovered } =
|
|
3718
|
-
const { focusProps, isFocusVisible } =
|
|
3719
|
-
const stateProps =
|
|
3776
|
+
const { hoverProps, isHovered } = useHover9({});
|
|
3777
|
+
const { focusProps, isFocusVisible } = useFocusRing13();
|
|
3778
|
+
const stateProps = useStateProps19({
|
|
3720
3779
|
hover: isHovered,
|
|
3721
3780
|
focus: isFocusVisible,
|
|
3722
3781
|
disabled,
|
|
@@ -3724,8 +3783,8 @@ var TextArea = forwardRef16(
|
|
|
3724
3783
|
required,
|
|
3725
3784
|
error
|
|
3726
3785
|
});
|
|
3727
|
-
const classNames2 =
|
|
3728
|
-
return /* @__PURE__ */
|
|
3786
|
+
const classNames2 = useClassNames41({ component: "TextArea", variant, size });
|
|
3787
|
+
return /* @__PURE__ */ jsx82(
|
|
3729
3788
|
FieldBase,
|
|
3730
3789
|
{
|
|
3731
3790
|
label,
|
|
@@ -3739,7 +3798,7 @@ var TextArea = forwardRef16(
|
|
|
3739
3798
|
variant,
|
|
3740
3799
|
size,
|
|
3741
3800
|
width,
|
|
3742
|
-
children: /* @__PURE__ */
|
|
3801
|
+
children: /* @__PURE__ */ jsx82(
|
|
3743
3802
|
"textarea",
|
|
3744
3803
|
{
|
|
3745
3804
|
className: classNames2,
|
|
@@ -3756,17 +3815,17 @@ var TextArea = forwardRef16(
|
|
|
3756
3815
|
);
|
|
3757
3816
|
|
|
3758
3817
|
// src/TextField/TextField.tsx
|
|
3759
|
-
import { forwardRef as
|
|
3760
|
-
import { useFocusRing as
|
|
3761
|
-
import { useHover as
|
|
3818
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
3819
|
+
import { useFocusRing as useFocusRing14 } from "@react-aria/focus";
|
|
3820
|
+
import { useHover as useHover10 } from "@react-aria/interactions";
|
|
3762
3821
|
import { useTextField as useTextField2 } from "@react-aria/textfield";
|
|
3763
|
-
import { mergeProps as
|
|
3764
|
-
import { useStateProps as
|
|
3765
|
-
import { jsx as
|
|
3766
|
-
var TextField =
|
|
3822
|
+
import { mergeProps as mergeProps19, useObjectRef as useObjectRef8 } from "@react-aria/utils";
|
|
3823
|
+
import { useStateProps as useStateProps20 } from "@marigold/system";
|
|
3824
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
3825
|
+
var TextField = forwardRef18(
|
|
3767
3826
|
({ variant, size, width, disabled, required, readOnly, error, ...props }, ref) => {
|
|
3768
3827
|
const { label, description, errorMessage, autoFocus } = props;
|
|
3769
|
-
const inputRef =
|
|
3828
|
+
const inputRef = useObjectRef8(ref);
|
|
3770
3829
|
const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField2(
|
|
3771
3830
|
{
|
|
3772
3831
|
isDisabled: disabled,
|
|
@@ -3777,12 +3836,12 @@ var TextField = forwardRef17(
|
|
|
3777
3836
|
},
|
|
3778
3837
|
inputRef
|
|
3779
3838
|
);
|
|
3780
|
-
const { hoverProps, isHovered } =
|
|
3781
|
-
const { focusProps, isFocused } =
|
|
3839
|
+
const { hoverProps, isHovered } = useHover10({});
|
|
3840
|
+
const { focusProps, isFocused } = useFocusRing14({
|
|
3782
3841
|
isTextInput: true,
|
|
3783
3842
|
autoFocus
|
|
3784
3843
|
});
|
|
3785
|
-
const stateProps =
|
|
3844
|
+
const stateProps = useStateProps20({
|
|
3786
3845
|
hover: isHovered,
|
|
3787
3846
|
focus: isFocused,
|
|
3788
3847
|
disabled,
|
|
@@ -3790,7 +3849,7 @@ var TextField = forwardRef17(
|
|
|
3790
3849
|
readOnly,
|
|
3791
3850
|
required
|
|
3792
3851
|
});
|
|
3793
|
-
return /* @__PURE__ */
|
|
3852
|
+
return /* @__PURE__ */ jsx83(
|
|
3794
3853
|
FieldBase,
|
|
3795
3854
|
{
|
|
3796
3855
|
label,
|
|
@@ -3804,13 +3863,13 @@ var TextField = forwardRef17(
|
|
|
3804
3863
|
variant,
|
|
3805
3864
|
size,
|
|
3806
3865
|
width,
|
|
3807
|
-
children: /* @__PURE__ */
|
|
3866
|
+
children: /* @__PURE__ */ jsx83(
|
|
3808
3867
|
Input,
|
|
3809
3868
|
{
|
|
3810
3869
|
ref: inputRef,
|
|
3811
3870
|
variant,
|
|
3812
3871
|
size,
|
|
3813
|
-
...
|
|
3872
|
+
...mergeProps19(focusProps, inputProps, hoverProps)
|
|
3814
3873
|
}
|
|
3815
3874
|
)
|
|
3816
3875
|
}
|
|
@@ -3819,8 +3878,8 @@ var TextField = forwardRef17(
|
|
|
3819
3878
|
);
|
|
3820
3879
|
|
|
3821
3880
|
// src/Tiles/Tiles.tsx
|
|
3822
|
-
import { cn as
|
|
3823
|
-
import { jsx as
|
|
3881
|
+
import { cn as cn46, createVar as createVar10, gapSpace as gapSpace7 } from "@marigold/system";
|
|
3882
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
3824
3883
|
var Tiles = ({
|
|
3825
3884
|
space = 0,
|
|
3826
3885
|
stretch = false,
|
|
@@ -3833,11 +3892,11 @@ var Tiles = ({
|
|
|
3833
3892
|
if (stretch) {
|
|
3834
3893
|
column = `minmax(${column}, 1fr)`;
|
|
3835
3894
|
}
|
|
3836
|
-
return /* @__PURE__ */
|
|
3895
|
+
return /* @__PURE__ */ jsx84(
|
|
3837
3896
|
"div",
|
|
3838
3897
|
{
|
|
3839
3898
|
...props,
|
|
3840
|
-
className:
|
|
3899
|
+
className: cn46(
|
|
3841
3900
|
"grid",
|
|
3842
3901
|
gapSpace7[space],
|
|
3843
3902
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
@@ -3851,7 +3910,7 @@ var Tiles = ({
|
|
|
3851
3910
|
|
|
3852
3911
|
// src/Tooltip/Tooltip.tsx
|
|
3853
3912
|
import { useTooltip } from "@react-aria/tooltip";
|
|
3854
|
-
import { cn as
|
|
3913
|
+
import { cn as cn47, useClassNames as useClassNames42 } from "@marigold/system";
|
|
3855
3914
|
|
|
3856
3915
|
// src/Tooltip/Context.ts
|
|
3857
3916
|
import { createContext as createContext9, useContext as useContext9 } from "react";
|
|
@@ -3864,7 +3923,7 @@ import { FocusableProvider } from "@react-aria/focus";
|
|
|
3864
3923
|
import { useOverlayPosition } from "@react-aria/overlays";
|
|
3865
3924
|
import { useTooltipTrigger } from "@react-aria/tooltip";
|
|
3866
3925
|
import { useTooltipTriggerState } from "@react-stately/tooltip";
|
|
3867
|
-
import { jsx as
|
|
3926
|
+
import { jsx as jsx85, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3868
3927
|
var TooltipTrigger = ({
|
|
3869
3928
|
disabled,
|
|
3870
3929
|
open,
|
|
@@ -3901,9 +3960,9 @@ var TooltipTrigger = ({
|
|
|
3901
3960
|
isOpen: state.isOpen,
|
|
3902
3961
|
overlayRef
|
|
3903
3962
|
});
|
|
3904
|
-
return /* @__PURE__ */
|
|
3963
|
+
return /* @__PURE__ */ jsxs34(FocusableProvider, { ref: tooltipTriggerRef, ...triggerProps, children: [
|
|
3905
3964
|
tooltipTrigger,
|
|
3906
|
-
/* @__PURE__ */
|
|
3965
|
+
/* @__PURE__ */ jsx85(
|
|
3907
3966
|
TooltipContext.Provider,
|
|
3908
3967
|
{
|
|
3909
3968
|
value: {
|
|
@@ -3914,33 +3973,33 @@ var TooltipTrigger = ({
|
|
|
3914
3973
|
...tooltipProps,
|
|
3915
3974
|
...positionProps
|
|
3916
3975
|
},
|
|
3917
|
-
children: /* @__PURE__ */
|
|
3976
|
+
children: /* @__PURE__ */ jsx85(Overlay, { open: state.isOpen, children: tooltip })
|
|
3918
3977
|
}
|
|
3919
3978
|
)
|
|
3920
3979
|
] });
|
|
3921
3980
|
};
|
|
3922
3981
|
|
|
3923
3982
|
// src/Tooltip/Tooltip.tsx
|
|
3924
|
-
import { jsx as
|
|
3983
|
+
import { jsx as jsx86, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3925
3984
|
var Tooltip = ({ children, variant, size }) => {
|
|
3926
3985
|
const { arrowProps, state, overlayRef, placement, ...rest } = useTooltipContext();
|
|
3927
3986
|
const { tooltipProps } = useTooltip({}, state);
|
|
3928
|
-
const classNames2 =
|
|
3929
|
-
return /* @__PURE__ */
|
|
3987
|
+
const classNames2 = useClassNames42({ component: "Tooltip", variant, size });
|
|
3988
|
+
return /* @__PURE__ */ jsxs35(
|
|
3930
3989
|
"div",
|
|
3931
3990
|
{
|
|
3932
3991
|
...tooltipProps,
|
|
3933
3992
|
...rest,
|
|
3934
3993
|
ref: overlayRef,
|
|
3935
|
-
className:
|
|
3994
|
+
className: cn47("group/tooltip", classNames2.container),
|
|
3936
3995
|
"data-placement": placement,
|
|
3937
3996
|
children: [
|
|
3938
|
-
/* @__PURE__ */
|
|
3939
|
-
/* @__PURE__ */
|
|
3997
|
+
/* @__PURE__ */ jsx86("div", { children }),
|
|
3998
|
+
/* @__PURE__ */ jsx86(
|
|
3940
3999
|
"div",
|
|
3941
4000
|
{
|
|
3942
4001
|
...arrowProps,
|
|
3943
|
-
className:
|
|
4002
|
+
className: cn47("absolute h-0 w-0", classNames2.arrow)
|
|
3944
4003
|
}
|
|
3945
4004
|
)
|
|
3946
4005
|
]
|
|
@@ -3956,20 +4015,20 @@ import { Item as Item6 } from "@react-stately/collections";
|
|
|
3956
4015
|
import { useRef as useRef29 } from "react";
|
|
3957
4016
|
import { useTagGroup } from "@react-aria/tag";
|
|
3958
4017
|
import { useListState } from "@react-stately/list";
|
|
3959
|
-
import { useStateProps as
|
|
4018
|
+
import { useStateProps as useStateProps21 } from "@marigold/system";
|
|
3960
4019
|
|
|
3961
4020
|
// src/TagGroup/Tag.tsx
|
|
3962
4021
|
import React3, { useRef as useRef28 } from "react";
|
|
3963
4022
|
import { useButton as useButton6 } from "@react-aria/button";
|
|
3964
|
-
import { useFocusRing as
|
|
4023
|
+
import { useFocusRing as useFocusRing15 } from "@react-aria/focus";
|
|
3965
4024
|
import { useTag } from "@react-aria/tag";
|
|
3966
|
-
import { mergeProps as
|
|
3967
|
-
import { cn as
|
|
3968
|
-
import { jsx as
|
|
4025
|
+
import { mergeProps as mergeProps20 } from "@react-aria/utils";
|
|
4026
|
+
import { cn as cn48, useClassNames as useClassNames43 } from "@marigold/system";
|
|
4027
|
+
import { jsx as jsx87, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3969
4028
|
var CloseButton2 = ({ className, ...props }) => {
|
|
3970
4029
|
const ref = useRef28(null);
|
|
3971
4030
|
const { buttonProps } = useButton6({ ...props }, ref);
|
|
3972
|
-
return /* @__PURE__ */
|
|
4031
|
+
return /* @__PURE__ */ jsx87("button", { className, ...buttonProps, children: /* @__PURE__ */ jsx87("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx87("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" }) }) });
|
|
3973
4032
|
};
|
|
3974
4033
|
var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
3975
4034
|
const props = {
|
|
@@ -3977,7 +4036,7 @@ var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
|
3977
4036
|
...rest
|
|
3978
4037
|
};
|
|
3979
4038
|
let ref = React3.useRef(null);
|
|
3980
|
-
let { focusProps } =
|
|
4039
|
+
let { focusProps } = useFocusRing15({ within: true });
|
|
3981
4040
|
const { rowProps, gridCellProps, allowsRemoving, removeButtonProps } = useTag(
|
|
3982
4041
|
{
|
|
3983
4042
|
...props,
|
|
@@ -3986,20 +4045,20 @@ var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
|
3986
4045
|
state,
|
|
3987
4046
|
ref
|
|
3988
4047
|
);
|
|
3989
|
-
const classNames2 =
|
|
3990
|
-
return /* @__PURE__ */
|
|
4048
|
+
const classNames2 = useClassNames43({ component: "Tag", variant, size });
|
|
4049
|
+
return /* @__PURE__ */ jsx87(
|
|
3991
4050
|
"span",
|
|
3992
4051
|
{
|
|
3993
4052
|
ref,
|
|
3994
|
-
...
|
|
4053
|
+
...mergeProps20(rowProps, focusProps),
|
|
3995
4054
|
className: classNames2.tag,
|
|
3996
|
-
children: /* @__PURE__ */
|
|
3997
|
-
/* @__PURE__ */
|
|
3998
|
-
allowsRemoving && /* @__PURE__ */
|
|
4055
|
+
children: /* @__PURE__ */ jsxs36("div", { ...gridCellProps, className: classNames2.gridCell, children: [
|
|
4056
|
+
/* @__PURE__ */ jsx87("span", { children: item.rendered }),
|
|
4057
|
+
allowsRemoving && /* @__PURE__ */ jsx87(
|
|
3999
4058
|
CloseButton2,
|
|
4000
4059
|
{
|
|
4001
4060
|
...removeButtonProps,
|
|
4002
|
-
className:
|
|
4061
|
+
className: cn48("flex items-center", classNames2.closeButton)
|
|
4003
4062
|
}
|
|
4004
4063
|
)
|
|
4005
4064
|
] })
|
|
@@ -4008,7 +4067,7 @@ var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
|
4008
4067
|
};
|
|
4009
4068
|
|
|
4010
4069
|
// src/TagGroup/TagGroup.tsx
|
|
4011
|
-
import { jsx as
|
|
4070
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
4012
4071
|
import { createElement } from "react";
|
|
4013
4072
|
var TagGroup = ({
|
|
4014
4073
|
width,
|
|
@@ -4025,11 +4084,11 @@ var TagGroup = ({
|
|
|
4025
4084
|
const inputRef = useRef29(null);
|
|
4026
4085
|
const state = useListState(props);
|
|
4027
4086
|
const { gridProps, labelProps, descriptionProps, errorMessageProps } = useTagGroup(props, state, inputRef);
|
|
4028
|
-
const stateProps =
|
|
4087
|
+
const stateProps = useStateProps21({
|
|
4029
4088
|
error,
|
|
4030
4089
|
required
|
|
4031
4090
|
});
|
|
4032
|
-
return /* @__PURE__ */
|
|
4091
|
+
return /* @__PURE__ */ jsx88(
|
|
4033
4092
|
FieldBase,
|
|
4034
4093
|
{
|
|
4035
4094
|
width,
|
|
@@ -4042,7 +4101,7 @@ var TagGroup = ({
|
|
|
4042
4101
|
errorMessageProps,
|
|
4043
4102
|
stateProps,
|
|
4044
4103
|
...gridProps,
|
|
4045
|
-
children: /* @__PURE__ */
|
|
4104
|
+
children: /* @__PURE__ */ jsx88(
|
|
4046
4105
|
"div",
|
|
4047
4106
|
{
|
|
4048
4107
|
role: "presentation",
|
|
@@ -4074,10 +4133,10 @@ Tag2.Group = TagGroup;
|
|
|
4074
4133
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
4075
4134
|
|
|
4076
4135
|
// src/XLoader/XLoader.tsx
|
|
4077
|
-
import { forwardRef as
|
|
4136
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
4078
4137
|
import { SVG as SVG6 } from "@marigold/system";
|
|
4079
|
-
import { jsx as
|
|
4080
|
-
var XLoader =
|
|
4138
|
+
import { jsx as jsx89, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4139
|
+
var XLoader = forwardRef19((props, ref) => /* @__PURE__ */ jsxs37(
|
|
4081
4140
|
SVG6,
|
|
4082
4141
|
{
|
|
4083
4142
|
id: "XLoader",
|
|
@@ -4087,13 +4146,13 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ jsxs35(
|
|
|
4087
4146
|
...props,
|
|
4088
4147
|
...ref,
|
|
4089
4148
|
children: [
|
|
4090
|
-
/* @__PURE__ */
|
|
4091
|
-
/* @__PURE__ */
|
|
4149
|
+
/* @__PURE__ */ jsx89("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
4150
|
+
/* @__PURE__ */ jsx89(
|
|
4092
4151
|
"path",
|
|
4093
4152
|
{
|
|
4094
4153
|
id: "XMLID_5_",
|
|
4095
4154
|
d: "M124.3 12.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
4096
|
-
children: /* @__PURE__ */
|
|
4155
|
+
children: /* @__PURE__ */ jsx89(
|
|
4097
4156
|
"animate",
|
|
4098
4157
|
{
|
|
4099
4158
|
attributeName: "opacity",
|
|
@@ -4106,12 +4165,12 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ jsxs35(
|
|
|
4106
4165
|
)
|
|
4107
4166
|
}
|
|
4108
4167
|
),
|
|
4109
|
-
/* @__PURE__ */
|
|
4168
|
+
/* @__PURE__ */ jsx89(
|
|
4110
4169
|
"path",
|
|
4111
4170
|
{
|
|
4112
4171
|
id: "XMLID_18_",
|
|
4113
4172
|
d: "M115.9 24.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
4114
|
-
children: /* @__PURE__ */
|
|
4173
|
+
children: /* @__PURE__ */ jsx89(
|
|
4115
4174
|
"animate",
|
|
4116
4175
|
{
|
|
4117
4176
|
attributeName: "opacity",
|
|
@@ -4124,12 +4183,12 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ jsxs35(
|
|
|
4124
4183
|
)
|
|
4125
4184
|
}
|
|
4126
4185
|
),
|
|
4127
|
-
/* @__PURE__ */
|
|
4186
|
+
/* @__PURE__ */ jsx89(
|
|
4128
4187
|
"path",
|
|
4129
4188
|
{
|
|
4130
4189
|
id: "XMLID_19_",
|
|
4131
4190
|
d: "M107.5 35.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
4132
|
-
children: /* @__PURE__ */
|
|
4191
|
+
children: /* @__PURE__ */ jsx89(
|
|
4133
4192
|
"animate",
|
|
4134
4193
|
{
|
|
4135
4194
|
attributeName: "opacity",
|
|
@@ -4142,12 +4201,12 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ jsxs35(
|
|
|
4142
4201
|
)
|
|
4143
4202
|
}
|
|
4144
4203
|
),
|
|
4145
|
-
/* @__PURE__ */
|
|
4204
|
+
/* @__PURE__ */ jsx89(
|
|
4146
4205
|
"path",
|
|
4147
4206
|
{
|
|
4148
4207
|
id: "XMLID_20_",
|
|
4149
4208
|
d: "M99.1 47.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
4150
|
-
children: /* @__PURE__ */
|
|
4209
|
+
children: /* @__PURE__ */ jsx89(
|
|
4151
4210
|
"animate",
|
|
4152
4211
|
{
|
|
4153
4212
|
attributeName: "opacity",
|
|
@@ -4160,12 +4219,12 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ jsxs35(
|
|
|
4160
4219
|
)
|
|
4161
4220
|
}
|
|
4162
4221
|
),
|
|
4163
|
-
/* @__PURE__ */
|
|
4222
|
+
/* @__PURE__ */ jsx89(
|
|
4164
4223
|
"path",
|
|
4165
4224
|
{
|
|
4166
4225
|
id: "XMLID_21_",
|
|
4167
4226
|
d: "M90.7 59H90c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.8-2.2 4.9-4.9 4.9z",
|
|
4168
|
-
children: /* @__PURE__ */
|
|
4227
|
+
children: /* @__PURE__ */ jsx89(
|
|
4169
4228
|
"animate",
|
|
4170
4229
|
{
|
|
4171
4230
|
attributeName: "opacity",
|
|
@@ -4178,12 +4237,12 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ jsxs35(
|
|
|
4178
4237
|
)
|
|
4179
4238
|
}
|
|
4180
4239
|
),
|
|
4181
|
-
/* @__PURE__ */
|
|
4240
|
+
/* @__PURE__ */ jsx89(
|
|
4182
4241
|
"path",
|
|
4183
4242
|
{
|
|
4184
4243
|
id: "XMLID_22_",
|
|
4185
4244
|
d: "M68 89.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.8c0 2.6-2.2 4.8-4.9 4.8z",
|
|
4186
|
-
children: /* @__PURE__ */
|
|
4245
|
+
children: /* @__PURE__ */ jsx89(
|
|
4187
4246
|
"animate",
|
|
4188
4247
|
{
|
|
4189
4248
|
attributeName: "opacity",
|
|
@@ -4196,12 +4255,12 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ jsxs35(
|
|
|
4196
4255
|
)
|
|
4197
4256
|
}
|
|
4198
4257
|
),
|
|
4199
|
-
/* @__PURE__ */
|
|
4258
|
+
/* @__PURE__ */ jsx89(
|
|
4200
4259
|
"path",
|
|
4201
4260
|
{
|
|
4202
4261
|
id: "XMLID_23_",
|
|
4203
4262
|
d: "M59.6 101.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
4204
|
-
children: /* @__PURE__ */
|
|
4263
|
+
children: /* @__PURE__ */ jsx89(
|
|
4205
4264
|
"animate",
|
|
4206
4265
|
{
|
|
4207
4266
|
attributeName: "opacity",
|
|
@@ -4214,12 +4273,12 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ jsxs35(
|
|
|
4214
4273
|
)
|
|
4215
4274
|
}
|
|
4216
4275
|
),
|
|
4217
|
-
/* @__PURE__ */
|
|
4276
|
+
/* @__PURE__ */ jsx89(
|
|
4218
4277
|
"path",
|
|
4219
4278
|
{
|
|
4220
4279
|
id: "XMLID_24_",
|
|
4221
4280
|
d: "M51.2 112.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
4222
|
-
children: /* @__PURE__ */
|
|
4281
|
+
children: /* @__PURE__ */ jsx89(
|
|
4223
4282
|
"animate",
|
|
4224
4283
|
{
|
|
4225
4284
|
attributeName: "opacity",
|
|
@@ -4232,12 +4291,12 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ jsxs35(
|
|
|
4232
4291
|
)
|
|
4233
4292
|
}
|
|
4234
4293
|
),
|
|
4235
|
-
/* @__PURE__ */
|
|
4294
|
+
/* @__PURE__ */ jsx89(
|
|
4236
4295
|
"path",
|
|
4237
4296
|
{
|
|
4238
4297
|
id: "XMLID_25_",
|
|
4239
4298
|
d: "M42.8 124.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
4240
|
-
children: /* @__PURE__ */
|
|
4299
|
+
children: /* @__PURE__ */ jsx89(
|
|
4241
4300
|
"animate",
|
|
4242
4301
|
{
|
|
4243
4302
|
attributeName: "opacity",
|
|
@@ -4250,12 +4309,12 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ jsxs35(
|
|
|
4250
4309
|
)
|
|
4251
4310
|
}
|
|
4252
4311
|
),
|
|
4253
|
-
/* @__PURE__ */
|
|
4312
|
+
/* @__PURE__ */ jsx89(
|
|
4254
4313
|
"path",
|
|
4255
4314
|
{
|
|
4256
4315
|
id: "XMLID_26_",
|
|
4257
4316
|
d: "M34.4 136h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
4258
|
-
children: /* @__PURE__ */
|
|
4317
|
+
children: /* @__PURE__ */ jsx89(
|
|
4259
4318
|
"animate",
|
|
4260
4319
|
{
|
|
4261
4320
|
attributeName: "opacity",
|
|
@@ -4268,12 +4327,12 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ jsxs35(
|
|
|
4268
4327
|
)
|
|
4269
4328
|
}
|
|
4270
4329
|
),
|
|
4271
|
-
/* @__PURE__ */
|
|
4330
|
+
/* @__PURE__ */ jsx89(
|
|
4272
4331
|
"path",
|
|
4273
4332
|
{
|
|
4274
4333
|
id: "XMLID_27_",
|
|
4275
4334
|
d: "M26 147.6h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
4276
|
-
children: /* @__PURE__ */
|
|
4335
|
+
children: /* @__PURE__ */ jsx89(
|
|
4277
4336
|
"animate",
|
|
4278
4337
|
{
|
|
4279
4338
|
attributeName: "opacity",
|
|
@@ -4295,7 +4354,7 @@ import { useRef as useRef32 } from "react";
|
|
|
4295
4354
|
import { useTabList } from "@react-aria/tabs";
|
|
4296
4355
|
import { Item as Item7 } from "@react-stately/collections";
|
|
4297
4356
|
import { useTabListState } from "@react-stately/tabs";
|
|
4298
|
-
import { cn as
|
|
4357
|
+
import { cn as cn51, gapSpace as gapSpace8, useClassNames as useClassNames44 } from "@marigold/system";
|
|
4299
4358
|
|
|
4300
4359
|
// src/Tabs/Context.ts
|
|
4301
4360
|
import { createContext as createContext10, useContext as useContext10 } from "react";
|
|
@@ -4304,30 +4363,30 @@ var useTabContext = () => useContext10(TabContext);
|
|
|
4304
4363
|
|
|
4305
4364
|
// src/Tabs/Tab.tsx
|
|
4306
4365
|
import { useRef as useRef30 } from "react";
|
|
4307
|
-
import { useFocus, useHover as
|
|
4366
|
+
import { useFocus, useHover as useHover11 } from "@react-aria/interactions";
|
|
4308
4367
|
import { useTab } from "@react-aria/tabs";
|
|
4309
|
-
import { mergeProps as
|
|
4310
|
-
import { cn as
|
|
4311
|
-
import { jsx as
|
|
4368
|
+
import { mergeProps as mergeProps21 } from "@react-aria/utils";
|
|
4369
|
+
import { cn as cn49, useStateProps as useStateProps22 } from "@marigold/system";
|
|
4370
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
4312
4371
|
var Tab = ({ item, state }) => {
|
|
4313
4372
|
const { key, rendered } = item;
|
|
4314
4373
|
const ref = useRef30(null);
|
|
4315
4374
|
const { tabProps, isSelected } = useTab({ key }, state, ref);
|
|
4316
4375
|
const disabled = tabProps["aria-disabled"];
|
|
4317
|
-
const { hoverProps, isHovered } =
|
|
4376
|
+
const { hoverProps, isHovered } = useHover11({
|
|
4318
4377
|
isDisabled: disabled || isSelected
|
|
4319
4378
|
});
|
|
4320
4379
|
const { focusProps } = useFocus({});
|
|
4321
|
-
const stateProps =
|
|
4380
|
+
const stateProps = useStateProps22({ active: isSelected, hover: isHovered });
|
|
4322
4381
|
const { classNames: classNames2 } = useTabContext();
|
|
4323
|
-
return /* @__PURE__ */
|
|
4382
|
+
return /* @__PURE__ */ jsx90(
|
|
4324
4383
|
"div",
|
|
4325
4384
|
{
|
|
4326
|
-
className:
|
|
4385
|
+
className: cn49(
|
|
4327
4386
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
4328
4387
|
classNames2.tab
|
|
4329
4388
|
),
|
|
4330
|
-
...
|
|
4389
|
+
...mergeProps21(tabProps, stateProps, focusProps, hoverProps),
|
|
4331
4390
|
ref,
|
|
4332
4391
|
children: rendered
|
|
4333
4392
|
}
|
|
@@ -4337,19 +4396,19 @@ var Tab = ({ item, state }) => {
|
|
|
4337
4396
|
// src/Tabs/TabPanel.tsx
|
|
4338
4397
|
import { useRef as useRef31 } from "react";
|
|
4339
4398
|
import { useTabPanel } from "@react-aria/tabs";
|
|
4340
|
-
import { cn as
|
|
4341
|
-
import { jsx as
|
|
4399
|
+
import { cn as cn50 } from "@marigold/system";
|
|
4400
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
4342
4401
|
var TabPanel = ({ state, ...props }) => {
|
|
4343
4402
|
var _a;
|
|
4344
4403
|
const ref = useRef31(null);
|
|
4345
4404
|
const { tabPanelProps } = useTabPanel(props, state, ref);
|
|
4346
4405
|
const selectedItemProps = (_a = state.selectedItem) == null ? void 0 : _a.props;
|
|
4347
4406
|
const { classNames: classNames2 } = useTabContext();
|
|
4348
|
-
return /* @__PURE__ */
|
|
4407
|
+
return /* @__PURE__ */ jsx91("div", { className: cn50(classNames2.tabpanel), ref, ...tabPanelProps, children: selectedItemProps == null ? void 0 : selectedItemProps.children });
|
|
4349
4408
|
};
|
|
4350
4409
|
|
|
4351
4410
|
// src/Tabs/Tabs.tsx
|
|
4352
|
-
import { jsx as
|
|
4411
|
+
import { jsx as jsx92, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4353
4412
|
var Tabs = ({
|
|
4354
4413
|
space = 2,
|
|
4355
4414
|
size = "medium",
|
|
@@ -4365,24 +4424,24 @@ var Tabs = ({
|
|
|
4365
4424
|
};
|
|
4366
4425
|
const state = useTabListState(props);
|
|
4367
4426
|
const { tabListProps } = useTabList(props, state, ref);
|
|
4368
|
-
const classNames2 =
|
|
4427
|
+
const classNames2 = useClassNames44({
|
|
4369
4428
|
component: "Tabs",
|
|
4370
4429
|
size,
|
|
4371
4430
|
variant
|
|
4372
4431
|
});
|
|
4373
|
-
return /* @__PURE__ */
|
|
4374
|
-
/* @__PURE__ */
|
|
4432
|
+
return /* @__PURE__ */ jsx92(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsxs38("div", { className: cn51(classNames2.container), children: [
|
|
4433
|
+
/* @__PURE__ */ jsx92(
|
|
4375
4434
|
"div",
|
|
4376
4435
|
{
|
|
4377
|
-
className:
|
|
4436
|
+
className: cn51("flex", gapSpace8[space], classNames2.tabs),
|
|
4378
4437
|
...tabListProps,
|
|
4379
4438
|
ref,
|
|
4380
4439
|
children: [...state.collection].map((item) => {
|
|
4381
|
-
return /* @__PURE__ */
|
|
4440
|
+
return /* @__PURE__ */ jsx92(Tab, { item, state }, item.key);
|
|
4382
4441
|
})
|
|
4383
4442
|
}
|
|
4384
4443
|
),
|
|
4385
|
-
/* @__PURE__ */
|
|
4444
|
+
/* @__PURE__ */ jsx92(TabPanel, { state }, (_a = state.selectedItem) == null ? void 0 : _a.key)
|
|
4386
4445
|
] }) });
|
|
4387
4446
|
};
|
|
4388
4447
|
Tabs.Item = Item7;
|
|
@@ -4432,8 +4491,8 @@ export {
|
|
|
4432
4491
|
NumberField,
|
|
4433
4492
|
Overlay,
|
|
4434
4493
|
Popover,
|
|
4435
|
-
Radio,
|
|
4436
|
-
RadioGroup,
|
|
4494
|
+
_Radio as Radio,
|
|
4495
|
+
_RadioGroup as RadioGroup,
|
|
4437
4496
|
Select,
|
|
4438
4497
|
_Slider as Slider,
|
|
4439
4498
|
Split,
|
|
@@ -4442,7 +4501,7 @@ export {
|
|
|
4442
4501
|
Table,
|
|
4443
4502
|
Tabs,
|
|
4444
4503
|
Tag2 as Tag,
|
|
4445
|
-
Text,
|
|
4504
|
+
Text2 as Text,
|
|
4446
4505
|
TextArea,
|
|
4447
4506
|
TextField,
|
|
4448
4507
|
ThemeProvider2 as ThemeProvider,
|