@lindle/linoardo 1.0.45 → 1.0.47
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/{ExpansionPanelItem-DYcbxZnv.d.ts → ExpansionPanelItem-By0ziOVw.d.cts} +2 -1
- package/dist/{ExpansionPanelItem-B9srsYMI.d.cts → ExpansionPanelItem-CFfWX7ia.d.ts} +2 -1
- package/dist/badge.d.cts +1 -1
- package/dist/badge.d.ts +1 -1
- package/dist/block.cjs +0 -1
- package/dist/block.cjs.map +1 -1
- package/dist/block.d.cts +1 -1
- package/dist/block.d.ts +1 -1
- package/dist/block.js +1 -1
- package/dist/button.cjs +73 -17
- package/dist/button.cjs.map +1 -1
- package/dist/button.d.cts +16 -5
- package/dist/button.d.ts +16 -5
- package/dist/button.js +1 -1
- package/dist/card.cjs +0 -1
- package/dist/card.cjs.map +1 -1
- package/dist/card.d.cts +1 -1
- package/dist/card.d.ts +1 -1
- package/dist/card.js +1 -1
- package/dist/chip.cjs +7 -15
- package/dist/chip.cjs.map +1 -1
- package/dist/chip.d.cts +1 -1
- package/dist/chip.d.ts +1 -1
- package/dist/chip.js +2 -2
- package/dist/{chunk-PSMGRUU5.js → chunk-4CYM2UM3.js} +9 -17
- package/dist/chunk-4CYM2UM3.js.map +1 -0
- package/dist/{chunk-5GT6L4BE.js → chunk-4NKKWBMP.js} +2 -3
- package/dist/chunk-4NKKWBMP.js.map +1 -0
- package/dist/{chunk-ZTP2JSQ6.js → chunk-4VHGXXZE.js} +52 -26
- package/dist/chunk-4VHGXXZE.js.map +1 -0
- package/dist/{chunk-HT5XBHWN.js → chunk-57CCAWFX.js} +3 -3
- package/dist/{chunk-HT5XBHWN.js.map → chunk-57CCAWFX.js.map} +1 -1
- package/dist/{chunk-5MVIF5GP.js → chunk-7HOQSHPQ.js} +4 -7
- package/dist/chunk-7HOQSHPQ.js.map +1 -0
- package/dist/{chunk-U4P2VJCV.js → chunk-7YZBEH2K.js} +2 -3
- package/dist/chunk-7YZBEH2K.js.map +1 -0
- package/dist/{chunk-RG5FCFLX.js → chunk-AUVYU7M5.js} +4 -3
- package/dist/chunk-AUVYU7M5.js.map +1 -0
- package/dist/{chunk-NADLY6LM.js → chunk-DUEQOGNR.js} +3 -4
- package/dist/chunk-DUEQOGNR.js.map +1 -0
- package/dist/{chunk-FEGFA3FN.js → chunk-JFIFVLWE.js} +3 -3
- package/dist/{chunk-FEGFA3FN.js.map → chunk-JFIFVLWE.js.map} +1 -1
- package/dist/{chunk-DIWGVTWO.js → chunk-RUOU46YI.js} +75 -19
- package/dist/chunk-RUOU46YI.js.map +1 -0
- package/dist/{chunk-F3PI7A6V.js → chunk-TRR7TDVA.js} +3 -4
- package/dist/chunk-TRR7TDVA.js.map +1 -0
- package/dist/chunk-UGG35FPX.js +141 -0
- package/dist/chunk-UGG35FPX.js.map +1 -0
- package/dist/{chunk-VPF7M2PB.js → chunk-UWNDN4XL.js} +2 -5
- package/dist/chunk-UWNDN4XL.js.map +1 -0
- package/dist/{chunk-FJNKMRYQ.js → chunk-XA74HBMH.js} +6 -4
- package/dist/chunk-XA74HBMH.js.map +1 -0
- package/dist/expansion-panel/item.cjs +2 -1
- package/dist/expansion-panel/item.cjs.map +1 -1
- package/dist/expansion-panel/item.d.cts +2 -2
- package/dist/expansion-panel/item.d.ts +2 -2
- package/dist/expansion-panel/item.js +1 -1
- package/dist/expansion-panel.cjs +5 -2
- package/dist/expansion-panel.cjs.map +1 -1
- package/dist/expansion-panel.d.cts +3 -3
- package/dist/expansion-panel.d.ts +3 -3
- package/dist/expansion-panel.js +2 -2
- package/dist/{global.types-gx9A7mUe.d.cts → global.types-CjO3VRWu.d.cts} +1 -1
- package/dist/{global.types-gx9A7mUe.d.ts → global.types-CjO3VRWu.d.ts} +1 -1
- package/dist/hero.cjs +0 -3
- package/dist/hero.cjs.map +1 -1
- package/dist/hero.d.cts +1 -1
- package/dist/hero.d.ts +1 -1
- package/dist/hero.js +1 -1
- package/dist/icon.d.cts +1 -1
- package/dist/icon.d.ts +1 -1
- package/dist/{index-CNwl6vmH.d.ts → index-BgLrabTA.d.ts} +1 -1
- package/dist/{index-BDrBOeFI.d.cts → index-C19gZTrO.d.cts} +1 -1
- package/dist/index.cjs +321 -278
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -5
- package/dist/index.d.ts +20 -5
- package/dist/index.js +77 -24
- package/dist/index.js.map +1 -1
- package/dist/input.cjs +62 -145
- package/dist/input.cjs.map +1 -1
- package/dist/input.d.cts +6 -6
- package/dist/input.d.ts +6 -6
- package/dist/input.js +1 -2
- package/dist/list/item.d.cts +2 -2
- package/dist/list/item.d.ts +2 -2
- package/dist/list.cjs +1 -2
- package/dist/list.cjs.map +1 -1
- package/dist/list.d.cts +3 -3
- package/dist/list.d.ts +3 -3
- package/dist/list.js +1 -1
- package/dist/menu.cjs +50 -24
- package/dist/menu.cjs.map +1 -1
- package/dist/menu.js +1 -1
- package/dist/notification.d.cts +1 -1
- package/dist/notification.d.ts +1 -1
- package/dist/profileCard.cjs +74 -21
- package/dist/profileCard.cjs.map +1 -1
- package/dist/profileCard.d.cts +1 -1
- package/dist/profileCard.d.ts +1 -1
- package/dist/profileCard.js +2 -2
- package/dist/select.cjs +1 -2
- package/dist/select.cjs.map +1 -1
- package/dist/select.d.cts +2 -2
- package/dist/select.d.ts +2 -2
- package/dist/select.js +1 -1
- package/dist/slider.d.cts +1 -1
- package/dist/slider.d.ts +1 -1
- package/dist/styles.css +254 -91
- package/dist/switch.d.cts +1 -1
- package/dist/switch.d.ts +1 -1
- package/dist/timeline.cjs.map +1 -1
- package/dist/timeline.d.cts +2 -2
- package/dist/timeline.d.ts +2 -2
- package/dist/timeline.js +2 -2
- package/dist/{types-DaTHYIPO.d.ts → types-B4puM-zr.d.cts} +3 -4
- package/dist/{types-CJ0zqPXF.d.cts → types-BDisBwnf.d.ts} +3 -4
- package/package.json +1 -1
- package/dist/chunk-5GT6L4BE.js.map +0 -1
- package/dist/chunk-5MVIF5GP.js.map +0 -1
- package/dist/chunk-DIWGVTWO.js.map +0 -1
- package/dist/chunk-F3PI7A6V.js.map +0 -1
- package/dist/chunk-FJNKMRYQ.js.map +0 -1
- package/dist/chunk-NADLY6LM.js.map +0 -1
- package/dist/chunk-OBGYXMZ3.js +0 -218
- package/dist/chunk-OBGYXMZ3.js.map +0 -1
- package/dist/chunk-PSMGRUU5.js.map +0 -1
- package/dist/chunk-RG5FCFLX.js.map +0 -1
- package/dist/chunk-U4P2VJCV.js.map +0 -1
- package/dist/chunk-VPF7M2PB.js.map +0 -1
- package/dist/chunk-ZTP2JSQ6.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
var tailwindMerge = require('tailwind-merge');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var reactDom = require('react-dom');
|
|
@@ -29,7 +29,7 @@ function _interopNamespace(e) {
|
|
|
29
29
|
return Object.freeze(n);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
33
|
var StarterKit__default = /*#__PURE__*/_interopDefault(StarterKit);
|
|
34
34
|
var TurndownService__default = /*#__PURE__*/_interopDefault(TurndownService);
|
|
35
35
|
|
|
@@ -49,7 +49,6 @@ var blackAndWhitePaletteClasses = {
|
|
|
49
49
|
text: "bg-transparent text-black hover:bg-neutral-200 focus-visible:ring-black/20 underline-offset-2 border border-transparent",
|
|
50
50
|
filled: "bg-black/10 text-black border border-black/30 hover:bg-black/20 focus-visible:ring-black/20",
|
|
51
51
|
underlined: "bg-transparent text-black border border-transparent underline decoration-2 underline-offset-4 hover:bg-neutral-200 focus-visible:ring-black/20",
|
|
52
|
-
rounded: "rounded-full border-2 border-black bg-white text-black hover:bg-black hover:text-white focus-visible:ring-black/40 focus-visible:ring-offset-white",
|
|
53
52
|
sharp: "bg-black text-white rounded-none hover:bg-black/90 focus-visible:ring-black/40"
|
|
54
53
|
};
|
|
55
54
|
var paletteVariantClasses = {
|
|
@@ -60,8 +59,7 @@ var paletteVariantClasses = {
|
|
|
60
59
|
ghost: "text-primary bg-primary/10 hover:bg-primary/20 focus-visible:ring-primary/40 border border-transparent",
|
|
61
60
|
text: "bg-transparent text-primary hover:bg-primary/10 focus-visible:ring-primary/30 underline-offset-2 border border-transparent",
|
|
62
61
|
filled: "bg-primary/15 text-primary border border-primary/30 hover:bg-primary/25 focus-visible:ring-primary/25",
|
|
63
|
-
underlined: "bg-transparent text-primary border border-transparent underline decoration-2 underline-offset-4 hover:bg-primary/5 focus-visible:ring-primary/25"
|
|
64
|
-
rounded: "rounded-full border border-primary/60 bg-primary/10 text-primary hover:bg-primary/20 focus-visible:ring-primary/25"
|
|
62
|
+
underlined: "bg-transparent text-primary border border-transparent underline decoration-2 underline-offset-4 hover:bg-primary/5 focus-visible:ring-primary/25"
|
|
65
63
|
},
|
|
66
64
|
neutral: {
|
|
67
65
|
solid: "bg-gray-600 text-white hover:bg-gray-700 focus-visible:ring-gray-500",
|
|
@@ -70,8 +68,7 @@ var paletteVariantClasses = {
|
|
|
70
68
|
ghost: "text-gray-700 bg-gray-100 hover:bg-gray-200 focus-visible:ring-gray-300 border border-transparent",
|
|
71
69
|
text: "bg-transparent text-gray-700 hover:bg-gray-100 focus-visible:ring-gray-200 underline-offset-2 border border-transparent",
|
|
72
70
|
filled: "bg-gray-200 text-gray-900 border border-gray-300 hover:bg-gray-300 focus-visible:ring-gray-300",
|
|
73
|
-
underlined: "bg-transparent text-gray-900 border border-transparent underline decoration-2 underline-offset-4 hover:bg-gray-100 focus-visible:ring-gray-300"
|
|
74
|
-
rounded: "rounded-full border border-gray-400 bg-white text-gray-800 hover:bg-gray-100 focus-visible:ring-gray-300"
|
|
71
|
+
underlined: "bg-transparent text-gray-900 border border-transparent underline decoration-2 underline-offset-4 hover:bg-gray-100 focus-visible:ring-gray-300"
|
|
75
72
|
},
|
|
76
73
|
info: {
|
|
77
74
|
solid: "bg-sky-500 text-white hover:bg-sky-600 focus-visible:ring-sky-400",
|
|
@@ -80,8 +77,7 @@ var paletteVariantClasses = {
|
|
|
80
77
|
ghost: "text-sky-600 bg-sky-100 hover:bg-sky-200 focus-visible:ring-sky-300 border border-transparent",
|
|
81
78
|
text: "bg-transparent text-sky-600 hover:bg-sky-100 focus-visible:ring-sky-200 underline-offset-2 border border-transparent",
|
|
82
79
|
filled: "bg-sky-100 text-sky-700 border border-sky-200 hover:bg-sky-200 focus-visible:ring-sky-200",
|
|
83
|
-
underlined: "bg-transparent text-sky-600 border border-transparent underline decoration-2 underline-offset-4 hover:bg-sky-50 focus-visible:ring-sky-200"
|
|
84
|
-
rounded: "rounded-full border border-sky-500/70 bg-sky-50 text-sky-700 hover:bg-sky-100 focus-visible:ring-sky-200"
|
|
80
|
+
underlined: "bg-transparent text-sky-600 border border-transparent underline decoration-2 underline-offset-4 hover:bg-sky-50 focus-visible:ring-sky-200"
|
|
85
81
|
},
|
|
86
82
|
success: {
|
|
87
83
|
solid: "bg-emerald-500 text-white hover:bg-emerald-600 focus-visible:ring-emerald-400",
|
|
@@ -90,8 +86,7 @@ var paletteVariantClasses = {
|
|
|
90
86
|
ghost: "text-emerald-600 bg-emerald-100 hover:bg-emerald-200 focus-visible:ring-emerald-300 border border-transparent",
|
|
91
87
|
text: "bg-transparent text-emerald-600 hover:bg-emerald-100 focus-visible:ring-emerald-200 underline-offset-2 border border-transparent",
|
|
92
88
|
filled: "bg-emerald-100 text-emerald-700 border border-emerald-200 hover:bg-emerald-200 focus-visible:ring-emerald-200",
|
|
93
|
-
underlined: "bg-transparent text-emerald-600 border border-transparent underline decoration-2 underline-offset-4 hover:bg-emerald-50 focus-visible:ring-emerald-200"
|
|
94
|
-
rounded: "rounded-full border border-emerald-500/70 bg-emerald-50 text-emerald-700 hover:bg-emerald-100 focus-visible:ring-emerald-200"
|
|
89
|
+
underlined: "bg-transparent text-emerald-600 border border-transparent underline decoration-2 underline-offset-4 hover:bg-emerald-50 focus-visible:ring-emerald-200"
|
|
95
90
|
},
|
|
96
91
|
warning: {
|
|
97
92
|
solid: "bg-amber-500 text-white hover:bg-amber-600 focus-visible:ring-amber-400",
|
|
@@ -100,8 +95,7 @@ var paletteVariantClasses = {
|
|
|
100
95
|
ghost: "text-amber-600 bg-amber-100 hover:bg-amber-200 focus-visible:ring-amber-300 border border-transparent",
|
|
101
96
|
text: "bg-transparent text-amber-600 hover:bg-amber-100 focus-visible:ring-amber-200 underline-offset-2 border border-transparent",
|
|
102
97
|
filled: "bg-amber-100 text-amber-800 border border-amber-200 hover:bg-amber-200 focus-visible:ring-amber-200",
|
|
103
|
-
underlined: "bg-transparent text-amber-600 border border-transparent underline decoration-2 underline-offset-4 hover:bg-amber-50 focus-visible:ring-amber-200"
|
|
104
|
-
rounded: "rounded-full border border-amber-500/70 bg-amber-50 text-amber-700 hover:bg-amber-100 focus-visible:ring-amber-200"
|
|
98
|
+
underlined: "bg-transparent text-amber-600 border border-transparent underline decoration-2 underline-offset-4 hover:bg-amber-50 focus-visible:ring-amber-200"
|
|
105
99
|
},
|
|
106
100
|
danger: {
|
|
107
101
|
solid: "bg-red-500 text-white hover:bg-red-600 focus-visible:ring-red-400",
|
|
@@ -110,8 +104,7 @@ var paletteVariantClasses = {
|
|
|
110
104
|
ghost: "text-red-600 bg-red-100 hover:bg-red-200 focus-visible:ring-red-300 border border-transparent",
|
|
111
105
|
text: "bg-transparent text-red-600 hover:bg-red-100 focus-visible:ring-red-200 underline-offset-2 border border-transparent",
|
|
112
106
|
filled: "bg-red-100 text-red-700 border border-red-200 hover:bg-red-200 focus-visible:ring-red-200",
|
|
113
|
-
underlined: "bg-transparent text-red-600 border border-transparent underline decoration-2 underline-offset-4 hover:bg-red-50 focus-visible:ring-red-200"
|
|
114
|
-
rounded: "rounded-full border border-red-500/70 bg-red-50 text-red-700 hover:bg-red-100 focus-visible:ring-red-200"
|
|
107
|
+
underlined: "bg-transparent text-red-600 border border-transparent underline decoration-2 underline-offset-4 hover:bg-red-50 focus-visible:ring-red-200"
|
|
115
108
|
},
|
|
116
109
|
surface: {
|
|
117
110
|
solid: "bg-white text-gray-900 border border-gray-200 hover:bg-gray-50 focus-visible:ring-gray-200",
|
|
@@ -120,8 +113,7 @@ var paletteVariantClasses = {
|
|
|
120
113
|
ghost: "text-gray-900 bg-gray-100 hover:bg-gray-200 focus-visible:ring-gray-200 border border-transparent",
|
|
121
114
|
text: "bg-transparent text-gray-900 hover:bg-gray-100 focus-visible:ring-gray-200 underline-offset-2 border border-transparent",
|
|
122
115
|
filled: "bg-gray-50 text-gray-900 border border-gray-200 hover:bg-white focus-visible:ring-gray-200",
|
|
123
|
-
underlined: "bg-transparent text-gray-900 border border-transparent underline decoration-2 underline-offset-4 hover:bg-gray-100 focus-visible:ring-gray-200"
|
|
124
|
-
rounded: "rounded-full border border-gray-300 bg-white text-gray-900 hover:bg-gray-50 focus-visible:ring-gray-200"
|
|
116
|
+
underlined: "bg-transparent text-gray-900 border border-transparent underline decoration-2 underline-offset-4 hover:bg-gray-100 focus-visible:ring-gray-200"
|
|
125
117
|
},
|
|
126
118
|
bw: blackAndWhitePaletteClasses
|
|
127
119
|
};
|
|
@@ -177,7 +169,7 @@ var iconOnlyIconSizeClasses = {
|
|
|
177
169
|
large: "text-xl",
|
|
178
170
|
"x-large": "text-2xl"
|
|
179
171
|
};
|
|
180
|
-
var
|
|
172
|
+
var ButtonBase = React__namespace.forwardRef(
|
|
181
173
|
({
|
|
182
174
|
variant = "solid",
|
|
183
175
|
color = "primary",
|
|
@@ -232,7 +224,71 @@ var Button = React4__namespace.forwardRef(
|
|
|
232
224
|
);
|
|
233
225
|
}
|
|
234
226
|
);
|
|
235
|
-
|
|
227
|
+
ButtonBase.displayName = "Button";
|
|
228
|
+
var isButtonElement = (element) => {
|
|
229
|
+
if (!React__namespace.isValidElement(element)) {
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
const elementType = element.type;
|
|
233
|
+
return element.type === ButtonBase || elementType.displayName === ButtonBase.displayName;
|
|
234
|
+
};
|
|
235
|
+
var ButtonGroup = React__namespace.forwardRef((props, ref) => {
|
|
236
|
+
const {
|
|
237
|
+
variant,
|
|
238
|
+
color,
|
|
239
|
+
size,
|
|
240
|
+
block = false,
|
|
241
|
+
disabled = false,
|
|
242
|
+
loading = false,
|
|
243
|
+
iconOnly,
|
|
244
|
+
vertical = false,
|
|
245
|
+
attached = true,
|
|
246
|
+
className,
|
|
247
|
+
role,
|
|
248
|
+
children,
|
|
249
|
+
...rest
|
|
250
|
+
} = props;
|
|
251
|
+
const groupBase = vertical ? "inline-flex w-fit flex-col" : "inline-flex w-fit items-stretch";
|
|
252
|
+
const blockClass = block ? "w-full [&>*]:flex-1" : void 0;
|
|
253
|
+
const attachedClass = attached ? vertical ? "[&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:rounded-t-none [&>*:not(:last-child)]:rounded-b-none" : "[&>*:not(:first-child)]:-ml-px [&>*:not(:first-child)]:rounded-l-none [&>*:not(:last-child)]:rounded-r-none" : void 0;
|
|
254
|
+
const enhanceChild = (child) => {
|
|
255
|
+
if (!React__namespace.isValidElement(child)) {
|
|
256
|
+
return child;
|
|
257
|
+
}
|
|
258
|
+
if (isButtonElement(child)) {
|
|
259
|
+
return React__namespace.cloneElement(child, {
|
|
260
|
+
variant: child.props.variant ?? variant,
|
|
261
|
+
color: child.props.color ?? color,
|
|
262
|
+
size: child.props.size ?? size,
|
|
263
|
+
block: child.props.block ?? block,
|
|
264
|
+
disabled: child.props.disabled ?? disabled,
|
|
265
|
+
loading: child.props.loading ?? loading,
|
|
266
|
+
iconOnly: child.props.iconOnly ?? iconOnly
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
if (child.props && typeof child.props === "object" && "children" in child.props) {
|
|
270
|
+
const nestedChildren = React__namespace.Children.map(child.props.children, enhanceChild);
|
|
271
|
+
if (nestedChildren !== child.props.children) {
|
|
272
|
+
return React__namespace.cloneElement(child, void 0, nestedChildren);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return child;
|
|
276
|
+
};
|
|
277
|
+
const resolvedChildren = React__namespace.Children.map(children, enhanceChild);
|
|
278
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
279
|
+
"div",
|
|
280
|
+
{
|
|
281
|
+
...rest,
|
|
282
|
+
ref,
|
|
283
|
+
role: role ?? "group",
|
|
284
|
+
className: tailwindMerge.twMerge(groupBase, blockClass, attachedClass, className),
|
|
285
|
+
children: resolvedChildren
|
|
286
|
+
}
|
|
287
|
+
);
|
|
288
|
+
});
|
|
289
|
+
ButtonGroup.displayName = "Button.Group";
|
|
290
|
+
var Button = ButtonBase;
|
|
291
|
+
Button.Group = ButtonGroup;
|
|
236
292
|
var Button_default = Button;
|
|
237
293
|
|
|
238
294
|
// src/Containment/Chip/states.chip.ts
|
|
@@ -245,7 +301,6 @@ var blackAndWhitePaletteClasses2 = {
|
|
|
245
301
|
text: "bg-transparent text-black border border-transparent hover:bg-neutral-200 focus-visible:ring-black/20",
|
|
246
302
|
filled: "bg-black/10 text-black border border-black/30 hover:bg-black/20 focus-visible:ring-black/20",
|
|
247
303
|
underlined: "bg-transparent text-black border-0 border-b-2 border-black px-0 rounded-none hover:text-black/80 focus-visible:ring-black/20",
|
|
248
|
-
rounded: "rounded-full bg-white text-black border-2 border-black hover:bg-black hover:text-white focus-visible:ring-black/40 focus-visible:ring-offset-white",
|
|
249
304
|
sharp: "rounded-none bg-black text-white border border-black hover:bg-black/90 focus-visible:ring-black/40 focus-visible:ring-offset-white"
|
|
250
305
|
};
|
|
251
306
|
var paletteVariantClasses2 = {
|
|
@@ -256,8 +311,7 @@ var paletteVariantClasses2 = {
|
|
|
256
311
|
ghost: "bg-primary/15 text-primary border border-transparent hover:bg-primary/25",
|
|
257
312
|
text: "bg-transparent text-primary border border-transparent hover:text-primary/80",
|
|
258
313
|
filled: "bg-primary/10 text-primary border border-primary/30 hover:bg-primary/20",
|
|
259
|
-
underlined: "bg-transparent text-primary border-0 border-b-2 border-primary px-0 rounded-none hover:text-primary/80"
|
|
260
|
-
rounded: "bg-white text-primary border border-primary/40 shadow-sm hover:bg-primary/5"
|
|
314
|
+
underlined: "bg-transparent text-primary border-0 border-b-2 border-primary px-0 rounded-none hover:text-primary/80"
|
|
261
315
|
},
|
|
262
316
|
neutral: {
|
|
263
317
|
solid: "bg-gray-900 text-white border border-gray-900 hover:bg-gray-800",
|
|
@@ -266,8 +320,7 @@ var paletteVariantClasses2 = {
|
|
|
266
320
|
ghost: "bg-gray-100 text-gray-900 border border-transparent hover:bg-gray-200",
|
|
267
321
|
text: "bg-transparent text-gray-900 border border-transparent hover:text-gray-700",
|
|
268
322
|
filled: "bg-gray-200 text-gray-900 border border-gray-300 hover:bg-gray-300",
|
|
269
|
-
underlined: "bg-transparent text-gray-900 border-0 border-b-2 border-gray-500 px-0 rounded-none hover:text-gray-700"
|
|
270
|
-
rounded: "bg-white text-gray-900 border border-gray-300 shadow-sm hover:bg-gray-100"
|
|
323
|
+
underlined: "bg-transparent text-gray-900 border-0 border-b-2 border-gray-500 px-0 rounded-none hover:text-gray-700"
|
|
271
324
|
},
|
|
272
325
|
info: {
|
|
273
326
|
solid: "bg-sky-500 text-white border border-sky-500 hover:bg-sky-600",
|
|
@@ -276,8 +329,7 @@ var paletteVariantClasses2 = {
|
|
|
276
329
|
ghost: "bg-sky-100 text-sky-700 border border-transparent hover:bg-sky-200",
|
|
277
330
|
text: "bg-transparent text-sky-600 border border-transparent hover:text-sky-700",
|
|
278
331
|
filled: "bg-sky-100 text-sky-700 border border-sky-200 hover:bg-sky-200",
|
|
279
|
-
underlined: "bg-transparent text-sky-600 border-0 border-b-2 border-sky-500 px-0 rounded-none hover:text-sky-700"
|
|
280
|
-
rounded: "bg-white text-sky-700 border border-sky-200 shadow-sm hover:bg-sky-50"
|
|
332
|
+
underlined: "bg-transparent text-sky-600 border-0 border-b-2 border-sky-500 px-0 rounded-none hover:text-sky-700"
|
|
281
333
|
},
|
|
282
334
|
success: {
|
|
283
335
|
solid: "bg-emerald-500 text-white border border-emerald-500 hover:bg-emerald-600",
|
|
@@ -286,8 +338,7 @@ var paletteVariantClasses2 = {
|
|
|
286
338
|
ghost: "bg-emerald-100 text-emerald-700 border border-transparent hover:bg-emerald-200",
|
|
287
339
|
text: "bg-transparent text-emerald-600 border border-transparent hover:text-emerald-700",
|
|
288
340
|
filled: "bg-emerald-100 text-emerald-700 border border-emerald-200 hover:bg-emerald-200",
|
|
289
|
-
underlined: "bg-transparent text-emerald-600 border-0 border-b-2 border-emerald-500 px-0 rounded-none hover:text-emerald-700"
|
|
290
|
-
rounded: "bg-white text-emerald-700 border border-emerald-200 shadow-sm hover:bg-emerald-50"
|
|
341
|
+
underlined: "bg-transparent text-emerald-600 border-0 border-b-2 border-emerald-500 px-0 rounded-none hover:text-emerald-700"
|
|
291
342
|
},
|
|
292
343
|
warning: {
|
|
293
344
|
solid: "bg-amber-500 text-white border border-amber-500 hover:bg-amber-600",
|
|
@@ -296,8 +347,7 @@ var paletteVariantClasses2 = {
|
|
|
296
347
|
ghost: "bg-amber-100 text-amber-800 border border-transparent hover:bg-amber-200",
|
|
297
348
|
text: "bg-transparent text-amber-700 border border-transparent hover:text-amber-800",
|
|
298
349
|
filled: "bg-amber-100 text-amber-800 border border-amber-200 hover:bg-amber-200",
|
|
299
|
-
underlined: "bg-transparent text-amber-700 border-0 border-b-2 border-amber-500 px-0 rounded-none hover:text-amber-800"
|
|
300
|
-
rounded: "bg-white text-amber-700 border border-amber-200 shadow-sm hover:bg-amber-50"
|
|
350
|
+
underlined: "bg-transparent text-amber-700 border-0 border-b-2 border-amber-500 px-0 rounded-none hover:text-amber-800"
|
|
301
351
|
},
|
|
302
352
|
danger: {
|
|
303
353
|
solid: "bg-red-500 text-white border border-red-500 hover:bg-red-600",
|
|
@@ -306,8 +356,7 @@ var paletteVariantClasses2 = {
|
|
|
306
356
|
ghost: "bg-red-100 text-red-700 border border-transparent hover:bg-red-200",
|
|
307
357
|
text: "bg-transparent text-red-600 border border-transparent hover:text-red-700",
|
|
308
358
|
filled: "bg-red-100 text-red-700 border border-red-200 hover:bg-red-200",
|
|
309
|
-
underlined: "bg-transparent text-red-600 border-0 border-b-2 border-red-500 px-0 rounded-none hover:text-red-700"
|
|
310
|
-
rounded: "bg-white text-red-600 border border-red-200 shadow-sm hover:bg-red-50"
|
|
359
|
+
underlined: "bg-transparent text-red-600 border-0 border-b-2 border-red-500 px-0 rounded-none hover:text-red-700"
|
|
311
360
|
},
|
|
312
361
|
surface: {
|
|
313
362
|
solid: "bg-white text-gray-900 border border-gray-200 hover:bg-gray-50",
|
|
@@ -316,8 +365,7 @@ var paletteVariantClasses2 = {
|
|
|
316
365
|
ghost: "bg-gray-100 text-gray-900 border border-transparent hover:bg-gray-200",
|
|
317
366
|
text: "bg-transparent text-gray-900 border border-transparent hover:text-gray-600",
|
|
318
367
|
filled: "bg-gray-50 text-gray-900 border border-gray-200 hover:bg-white",
|
|
319
|
-
underlined: "bg-transparent text-gray-900 border-0 border-b-2 border-gray-400 px-0 rounded-none hover:text-gray-600"
|
|
320
|
-
rounded: "bg-white text-gray-900 border border-gray-200 shadow-sm hover:bg-gray-50"
|
|
368
|
+
underlined: "bg-transparent text-gray-900 border-0 border-b-2 border-gray-400 px-0 rounded-none hover:text-gray-600"
|
|
321
369
|
},
|
|
322
370
|
bw: blackAndWhitePaletteClasses2
|
|
323
371
|
};
|
|
@@ -357,7 +405,7 @@ var chipSizeClasses = {
|
|
|
357
405
|
large: "h-8 text-sm px-3",
|
|
358
406
|
"x-large": "h-9 text-base px-3.5"
|
|
359
407
|
};
|
|
360
|
-
var Chip =
|
|
408
|
+
var Chip = React.forwardRef(
|
|
361
409
|
({
|
|
362
410
|
variant = "solid",
|
|
363
411
|
color = "primary",
|
|
@@ -554,7 +602,7 @@ var Badge = ({
|
|
|
554
602
|
className,
|
|
555
603
|
...rest
|
|
556
604
|
}) => {
|
|
557
|
-
const hasChildren =
|
|
605
|
+
const hasChildren = React__namespace.Children.count(children) > 0;
|
|
558
606
|
const iconClassName = resolveIconClassName3(icon);
|
|
559
607
|
const isNumberContent = typeof content === "number" && Number.isFinite(content);
|
|
560
608
|
let displayValue = content;
|
|
@@ -695,7 +743,7 @@ var accentClasses = {
|
|
|
695
743
|
indicator: "bg-gray-900 dark:bg-gray-100"
|
|
696
744
|
}
|
|
697
745
|
};
|
|
698
|
-
var ListItem =
|
|
746
|
+
var ListItem = React__namespace.forwardRef((props, ref) => {
|
|
699
747
|
const {
|
|
700
748
|
component,
|
|
701
749
|
href,
|
|
@@ -809,8 +857,7 @@ var listVariantClasses = {
|
|
|
809
857
|
ghost: "bg-gray-50 border border-transparent dark:bg-gray-900/60",
|
|
810
858
|
text: "bg-transparent border border-transparent",
|
|
811
859
|
filled: "bg-gray-50 border border-gray-200 shadow-inner shadow-gray-900/5 dark:bg-gray-900/70 dark:border-gray-800 dark:shadow-black/30",
|
|
812
|
-
underlined: "bg-transparent border border-transparent border-b border-gray-200 rounded-none dark:border-gray-800"
|
|
813
|
-
rounded: "bg-white border border-gray-200 shadow-lg shadow-gray-900/10 dark:bg-gray-900 dark:border-gray-800 dark:shadow-black/30"
|
|
860
|
+
underlined: "bg-transparent border border-transparent border-b border-gray-200 rounded-none dark:border-gray-800"
|
|
814
861
|
};
|
|
815
862
|
var listRoundedClasses = {
|
|
816
863
|
none: "rounded-none",
|
|
@@ -821,13 +868,13 @@ var listRoundedClasses = {
|
|
|
821
868
|
pill: "rounded-full"
|
|
822
869
|
};
|
|
823
870
|
var isListItemElement = (element) => {
|
|
824
|
-
if (!
|
|
871
|
+
if (!React__namespace.isValidElement(element)) {
|
|
825
872
|
return false;
|
|
826
873
|
}
|
|
827
874
|
const elementType = element.type;
|
|
828
875
|
return element.type === Item_default || elementType.displayName === Item_default.displayName;
|
|
829
876
|
};
|
|
830
|
-
var List =
|
|
877
|
+
var List = React__namespace.forwardRef((props, ref) => {
|
|
831
878
|
const {
|
|
832
879
|
variant = "solid",
|
|
833
880
|
density = "default",
|
|
@@ -849,11 +896,11 @@ var List = React4__namespace.forwardRef((props, ref) => {
|
|
|
849
896
|
const navClass = nav ? "py-1" : void 0;
|
|
850
897
|
const accentColor = color;
|
|
851
898
|
const enhanceChild = (child) => {
|
|
852
|
-
if (!
|
|
899
|
+
if (!React__namespace.isValidElement(child)) {
|
|
853
900
|
return child;
|
|
854
901
|
}
|
|
855
902
|
if (isListItemElement(child)) {
|
|
856
|
-
return
|
|
903
|
+
return React__namespace.cloneElement(child, {
|
|
857
904
|
density: child.props.density ?? density,
|
|
858
905
|
lines: child.props.lines ?? lines,
|
|
859
906
|
nav: child.props.nav ?? nav,
|
|
@@ -863,14 +910,14 @@ var List = React4__namespace.forwardRef((props, ref) => {
|
|
|
863
910
|
});
|
|
864
911
|
}
|
|
865
912
|
if (child.props && typeof child.props === "object" && "children" in child.props) {
|
|
866
|
-
const nestedChildren =
|
|
913
|
+
const nestedChildren = React__namespace.Children.map(child.props.children, enhanceChild);
|
|
867
914
|
if (nestedChildren !== child.props.children) {
|
|
868
|
-
return
|
|
915
|
+
return React__namespace.cloneElement(child, void 0, nestedChildren);
|
|
869
916
|
}
|
|
870
917
|
}
|
|
871
918
|
return child;
|
|
872
919
|
};
|
|
873
|
-
const resolvedChildren =
|
|
920
|
+
const resolvedChildren = React__namespace.Children.map(children, enhanceChild);
|
|
874
921
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
875
922
|
"div",
|
|
876
923
|
{
|
|
@@ -887,20 +934,29 @@ var ListWithItem = List;
|
|
|
887
934
|
ListWithItem.Item = Item_default;
|
|
888
935
|
var List_default = ListWithItem;
|
|
889
936
|
var placementClasses = {
|
|
890
|
-
"bottom-start": "left-0 top-full
|
|
891
|
-
bottom: "left-1/2 top-full -translate-x-1/2
|
|
892
|
-
"bottom-end": "right-0 top-full
|
|
893
|
-
"top-start": "left-0 bottom-full
|
|
894
|
-
top: "left-1/2 bottom-full -translate-x-1/2
|
|
895
|
-
"top-end": "right-0 bottom-full
|
|
937
|
+
"bottom-start": "left-0 top-full",
|
|
938
|
+
bottom: "left-1/2 top-full -translate-x-1/2",
|
|
939
|
+
"bottom-end": "right-0 top-full",
|
|
940
|
+
"top-start": "left-0 bottom-full",
|
|
941
|
+
top: "left-1/2 bottom-full -translate-x-1/2",
|
|
942
|
+
"top-end": "right-0 bottom-full"
|
|
943
|
+
};
|
|
944
|
+
var originClasses = {
|
|
945
|
+
"bottom-start": "origin-top-left",
|
|
946
|
+
bottom: "origin-top",
|
|
947
|
+
"bottom-end": "origin-top-right",
|
|
948
|
+
"top-start": "origin-bottom-left",
|
|
949
|
+
top: "origin-bottom",
|
|
950
|
+
"top-end": "origin-bottom-right"
|
|
896
951
|
};
|
|
897
952
|
var offsetClasses = {
|
|
898
|
-
top: "
|
|
899
|
-
bottom: "
|
|
953
|
+
top: "pb-2",
|
|
954
|
+
bottom: "pt-2"
|
|
900
955
|
};
|
|
901
|
-
var
|
|
956
|
+
var menuWrapperBaseClasses = "absolute z-50";
|
|
957
|
+
var menuBaseClasses = "min-w-[10rem] rounded-xl border border-gray-200/80 bg-white/95 p-2 text-sm text-gray-700 shadow-lg shadow-gray-900/10 ring-1 ring-black/5 backdrop-blur-md transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2";
|
|
902
958
|
var overlayBaseClasses = "fixed inset-0 z-40 bg-gray-900/30 backdrop-blur-[1px]";
|
|
903
|
-
var Menu =
|
|
959
|
+
var Menu = React__namespace.forwardRef((props, ref) => {
|
|
904
960
|
const {
|
|
905
961
|
activator,
|
|
906
962
|
children,
|
|
@@ -925,11 +981,17 @@ var Menu = React4__namespace.forwardRef((props, ref) => {
|
|
|
925
981
|
const shouldRenderContent = hasContent && (keepMounted || isOpen || allowHoverTrigger || allowFocusTrigger);
|
|
926
982
|
const shouldRenderOverlay = scrim && hasContent && (isOpen || allowHoverTrigger || allowFocusTrigger);
|
|
927
983
|
const verticalPlacement = placement.startsWith("top") ? "top" : "bottom";
|
|
928
|
-
const
|
|
929
|
-
"pointer-events-none
|
|
930
|
-
isOpen ? "pointer-events-auto
|
|
931
|
-
allowHoverTrigger ? "group-hover/menu:pointer-events-auto
|
|
932
|
-
allowFocusTrigger ? "group-focus-within/menu:pointer-events-auto
|
|
984
|
+
const interactiveVisibilityClasses = tailwindMerge.twMerge(
|
|
985
|
+
"pointer-events-none",
|
|
986
|
+
isOpen ? "pointer-events-auto" : void 0,
|
|
987
|
+
allowHoverTrigger ? "group-hover/menu:pointer-events-auto" : void 0,
|
|
988
|
+
allowFocusTrigger ? "group-focus-within/menu:pointer-events-auto" : void 0
|
|
989
|
+
);
|
|
990
|
+
const visualVisibilityClasses = tailwindMerge.twMerge(
|
|
991
|
+
"opacity-0 scale-95",
|
|
992
|
+
isOpen ? "opacity-100 scale-100" : void 0,
|
|
993
|
+
allowHoverTrigger ? "group-hover/menu:opacity-100 group-hover/menu:scale-100" : void 0,
|
|
994
|
+
allowFocusTrigger ? "group-focus-within/menu:opacity-100 group-focus-within/menu:scale-100" : void 0
|
|
933
995
|
);
|
|
934
996
|
const overlayVisibilityClasses = tailwindMerge.twMerge(
|
|
935
997
|
"pointer-events-none opacity-0 transition-opacity duration-150",
|
|
@@ -964,21 +1026,32 @@ var Menu = React4__namespace.forwardRef((props, ref) => {
|
|
|
964
1026
|
shouldRenderContent ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
965
1027
|
"div",
|
|
966
1028
|
{
|
|
967
|
-
...restContentProps,
|
|
968
1029
|
className: tailwindMerge.twMerge(
|
|
969
|
-
|
|
1030
|
+
menuWrapperBaseClasses,
|
|
970
1031
|
placementClasses[placement],
|
|
971
1032
|
offsetClasses[verticalPlacement],
|
|
972
1033
|
matchActivatorWidth ? "min-w-full" : void 0,
|
|
973
|
-
|
|
974
|
-
contentClassName,
|
|
975
|
-
contentExtraClassName
|
|
1034
|
+
interactiveVisibilityClasses
|
|
976
1035
|
),
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1036
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1037
|
+
"div",
|
|
1038
|
+
{
|
|
1039
|
+
...restContentProps,
|
|
1040
|
+
className: tailwindMerge.twMerge(
|
|
1041
|
+
menuBaseClasses,
|
|
1042
|
+
originClasses[placement],
|
|
1043
|
+
visualVisibilityClasses,
|
|
1044
|
+
matchActivatorWidth ? "min-w-full" : void 0,
|
|
1045
|
+
contentClassName,
|
|
1046
|
+
contentExtraClassName
|
|
1047
|
+
),
|
|
1048
|
+
"data-state": isOpen ? "open" : "closed",
|
|
1049
|
+
role: contentRole ?? "menu",
|
|
1050
|
+
tabIndex: contentTabIndex ?? -1,
|
|
1051
|
+
style: contentStyle,
|
|
1052
|
+
children
|
|
1053
|
+
}
|
|
1054
|
+
)
|
|
982
1055
|
}
|
|
983
1056
|
) : null
|
|
984
1057
|
]
|
|
@@ -1017,7 +1090,7 @@ var traverseNode = (node, value) => {
|
|
|
1017
1090
|
if (node === null || node === void 0 || typeof node === "boolean" || typeof node === "string" || typeof node === "number") {
|
|
1018
1091
|
return { node, changed: false };
|
|
1019
1092
|
}
|
|
1020
|
-
if (!
|
|
1093
|
+
if (!React.isValidElement(node)) {
|
|
1021
1094
|
return { node, changed: false };
|
|
1022
1095
|
}
|
|
1023
1096
|
const element = node;
|
|
@@ -1030,7 +1103,7 @@ var traverseNode = (node, value) => {
|
|
|
1030
1103
|
return { node, changed: false };
|
|
1031
1104
|
}
|
|
1032
1105
|
const injectedProps = shouldInject ? { [EXPANSION_PANEL_CONTEXT_PROP]: value } : void 0;
|
|
1033
|
-
const cloned = mappedChildren === void 0 ?
|
|
1106
|
+
const cloned = mappedChildren === void 0 ? React.cloneElement(element, injectedProps) : React.cloneElement(element, injectedProps, mappedChildren);
|
|
1034
1107
|
return { node: cloned, changed: true };
|
|
1035
1108
|
};
|
|
1036
1109
|
var injectExpansionPanelContext = (children, value) => traverseNode(children, value).node;
|
|
@@ -1100,6 +1173,7 @@ var ExpansionPanelItemInner = (props) => {
|
|
|
1100
1173
|
const divider = context?.divider ?? true;
|
|
1101
1174
|
const variant = context?.variant ?? "elevated";
|
|
1102
1175
|
const rounded = context?.rounded ?? "lg";
|
|
1176
|
+
const isControlled = context?.controlled ?? false;
|
|
1103
1177
|
const accent = accentClasses2[color] ?? accentClasses2.primary;
|
|
1104
1178
|
const isExpanded = value !== null && value !== void 0 ? context?.expandedValues.includes(value) ?? false : false;
|
|
1105
1179
|
const rootSurface = divider ? "bg-transparent border-0 shadow-none" : itemVariantClasses[variant];
|
|
@@ -1145,7 +1219,7 @@ var ExpansionPanelItemInner = (props) => {
|
|
|
1145
1219
|
id: inputId,
|
|
1146
1220
|
type: "checkbox",
|
|
1147
1221
|
className: "expansion-panel-item__toggle",
|
|
1148
|
-
defaultChecked: isExpanded,
|
|
1222
|
+
...isControlled ? { checked: isExpanded, readOnly: true } : { defaultChecked: isExpanded },
|
|
1149
1223
|
disabled
|
|
1150
1224
|
}
|
|
1151
1225
|
),
|
|
@@ -1195,7 +1269,7 @@ var ExpansionPanelItemInner = (props) => {
|
|
|
1195
1269
|
}
|
|
1196
1270
|
);
|
|
1197
1271
|
};
|
|
1198
|
-
var ExpansionPanelItem =
|
|
1272
|
+
var ExpansionPanelItem = React.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(ExpansionPanelItemInner, { ...props, forwardedRef: ref }));
|
|
1199
1273
|
ExpansionPanelItem.displayName = "ExpansionPanelItem";
|
|
1200
1274
|
markExpansionPanelItem(ExpansionPanelItem);
|
|
1201
1275
|
var ExpansionPanelItem_default = ExpansionPanelItem;
|
|
@@ -1239,6 +1313,7 @@ var ExpansionPanelInner = (props, forwardedRef) => {
|
|
|
1239
1313
|
...rest
|
|
1240
1314
|
} = props;
|
|
1241
1315
|
const allowMultiple = multiple ?? false;
|
|
1316
|
+
const isControlled = value !== void 0;
|
|
1242
1317
|
const resolvedValue = value !== void 0 ? value : defaultValue;
|
|
1243
1318
|
const expandedValues = normalizeValues(resolvedValue, allowMultiple);
|
|
1244
1319
|
const providerValue = {
|
|
@@ -1247,7 +1322,8 @@ var ExpansionPanelInner = (props, forwardedRef) => {
|
|
|
1247
1322
|
color,
|
|
1248
1323
|
divider,
|
|
1249
1324
|
rounded,
|
|
1250
|
-
variant
|
|
1325
|
+
variant,
|
|
1326
|
+
controlled: isControlled
|
|
1251
1327
|
};
|
|
1252
1328
|
const variantClass = divider ? variantContainerClasses[variant] : "bg-transparent border border-transparent shadow-none";
|
|
1253
1329
|
const shapeClass = roundedClasses2[rounded] ?? roundedClasses2.lg;
|
|
@@ -1269,7 +1345,7 @@ var ExpansionPanelInner = (props, forwardedRef) => {
|
|
|
1269
1345
|
}
|
|
1270
1346
|
);
|
|
1271
1347
|
};
|
|
1272
|
-
var ExpansionPanelBase =
|
|
1348
|
+
var ExpansionPanelBase = React.forwardRef(ExpansionPanelInner);
|
|
1273
1349
|
var ExpansionPanel = Object.assign(ExpansionPanelBase, {
|
|
1274
1350
|
Item: ExpansionPanelItem_default
|
|
1275
1351
|
});
|
|
@@ -1285,7 +1361,7 @@ var resolveSizeValue = (value) => {
|
|
|
1285
1361
|
}
|
|
1286
1362
|
return typeof value === "number" ? `${value}px` : value;
|
|
1287
1363
|
};
|
|
1288
|
-
var Dialog =
|
|
1364
|
+
var Dialog = React__namespace.forwardRef((props, forwardedRef) => {
|
|
1289
1365
|
const {
|
|
1290
1366
|
activator,
|
|
1291
1367
|
children,
|
|
@@ -1410,7 +1486,7 @@ var resolveSizeValue2 = (value) => {
|
|
|
1410
1486
|
}
|
|
1411
1487
|
return typeof value === "number" ? `${value}px` : value;
|
|
1412
1488
|
};
|
|
1413
|
-
var Drawer =
|
|
1489
|
+
var Drawer = React__namespace.forwardRef((props, ref) => {
|
|
1414
1490
|
const {
|
|
1415
1491
|
location = "left",
|
|
1416
1492
|
floating = false,
|
|
@@ -1509,6 +1585,59 @@ var Drawer = React4__namespace.forwardRef((props, ref) => {
|
|
|
1509
1585
|
});
|
|
1510
1586
|
Drawer.displayName = "Drawer";
|
|
1511
1587
|
var Drawer_default = Drawer;
|
|
1588
|
+
var overlayBaseClasses4 = "inset-0 z-[55] transition-opacity duration-200 data-[state=closed]:opacity-0 data-[state=open]:opacity-100";
|
|
1589
|
+
var scrimClasses = "bg-gray-900/55 backdrop-blur-[2px]";
|
|
1590
|
+
var Overlay = React__namespace.forwardRef((props, ref) => {
|
|
1591
|
+
const {
|
|
1592
|
+
open,
|
|
1593
|
+
keepMounted = false,
|
|
1594
|
+
scrim = true,
|
|
1595
|
+
container = false,
|
|
1596
|
+
onClose,
|
|
1597
|
+
portal = false,
|
|
1598
|
+
portalContainer,
|
|
1599
|
+
className,
|
|
1600
|
+
role,
|
|
1601
|
+
children,
|
|
1602
|
+
...rest
|
|
1603
|
+
} = props;
|
|
1604
|
+
const isOpen = open ?? true;
|
|
1605
|
+
const shouldRender = keepMounted || isOpen;
|
|
1606
|
+
const state = isOpen ? "open" : "closed";
|
|
1607
|
+
if (!shouldRender) {
|
|
1608
|
+
return null;
|
|
1609
|
+
}
|
|
1610
|
+
const resolvedPortalContainer = portalContainer ?? (typeof document !== "undefined" ? document.body : null);
|
|
1611
|
+
const overlayNode = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1612
|
+
"div",
|
|
1613
|
+
{
|
|
1614
|
+
...rest,
|
|
1615
|
+
ref,
|
|
1616
|
+
role: role ?? "presentation",
|
|
1617
|
+
className: tailwindMerge.twMerge(
|
|
1618
|
+
overlayBaseClasses4,
|
|
1619
|
+
container ? "absolute" : "fixed",
|
|
1620
|
+
scrim ? scrimClasses : "bg-transparent backdrop-blur-0",
|
|
1621
|
+
isOpen ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0",
|
|
1622
|
+
className
|
|
1623
|
+
),
|
|
1624
|
+
"data-state": state,
|
|
1625
|
+
onClick: (event) => {
|
|
1626
|
+
if (event.target !== event.currentTarget) {
|
|
1627
|
+
return;
|
|
1628
|
+
}
|
|
1629
|
+
if (!event.defaultPrevented) {
|
|
1630
|
+
onClose?.();
|
|
1631
|
+
}
|
|
1632
|
+
},
|
|
1633
|
+
children
|
|
1634
|
+
}
|
|
1635
|
+
);
|
|
1636
|
+
const shouldPortal = portal && !container;
|
|
1637
|
+
return shouldPortal && resolvedPortalContainer ? reactDom.createPortal(overlayNode, resolvedPortalContainer) : overlayNode;
|
|
1638
|
+
});
|
|
1639
|
+
Overlay.displayName = "Overlay";
|
|
1640
|
+
var Overlay_default = Overlay;
|
|
1512
1641
|
var tooltipBaseClasses = "absolute z-[60] max-w-xs rounded-lg border border-white/10 bg-gray-900 px-3 py-2 text-xs font-medium text-white shadow-lg shadow-black/30 ring-1 ring-black/40 transition-all duration-150";
|
|
1513
1642
|
var wrapperBaseClasses = "relative inline-flex max-w-full align-middle";
|
|
1514
1643
|
var arrowBaseClasses = "pointer-events-none absolute h-2 w-2 rotate-45 border border-white/10 bg-gray-900 shadow-lg shadow-black/20";
|
|
@@ -1546,7 +1675,7 @@ var arrowPlacementClasses = {
|
|
|
1546
1675
|
"right-start": "right-full top-4 translate-x-1/2",
|
|
1547
1676
|
"right-end": "right-full bottom-4 translate-x-1/2"
|
|
1548
1677
|
};
|
|
1549
|
-
var ToolTip =
|
|
1678
|
+
var ToolTip = React__namespace.forwardRef((props, forwardedRef) => {
|
|
1550
1679
|
const {
|
|
1551
1680
|
activator,
|
|
1552
1681
|
children,
|
|
@@ -1652,7 +1781,6 @@ var variantClasses = {
|
|
|
1652
1781
|
text: "rounded-2xl border border-transparent bg-transparent dark:border-transparent dark:bg-transparent",
|
|
1653
1782
|
filled: "rounded-2xl border border-gray-200 bg-gray-50 dark:border-slate-800 dark:bg-slate-800",
|
|
1654
1783
|
underlined: " border border-transparent border-b border-b-gray-200 dark:border-transparent dark:border-b-slate-700 dark:bg-transparent",
|
|
1655
|
-
rounded: "rounded-3xl border border-gray-200 bg-white dark:border-slate-800 dark:bg-slate-900",
|
|
1656
1784
|
sharp: "rounded-none border border-gray-200 bg-white dark:border-slate-800 dark:bg-slate-900"
|
|
1657
1785
|
};
|
|
1658
1786
|
var elevationClasses = {
|
|
@@ -1664,7 +1792,7 @@ var elevationClasses = {
|
|
|
1664
1792
|
5: "shadow-xl",
|
|
1665
1793
|
6: "shadow-2xl"
|
|
1666
1794
|
};
|
|
1667
|
-
var CardRoot =
|
|
1795
|
+
var CardRoot = React.forwardRef(function Card({ className, children, variant = "solid", padding = "md", overflow = "hidden", interactive = false, dividers = true, elevation = 0, ...rest }, ref) {
|
|
1668
1796
|
const variantClass = variantClasses[variant] ?? variantClasses.solid;
|
|
1669
1797
|
const paddingClass = paddingClasses[padding] ?? paddingClasses.md;
|
|
1670
1798
|
const overflowClass = overflowClasses[overflow] ?? overflowClasses.hidden;
|
|
@@ -1735,13 +1863,13 @@ var Card2 = Object.assign(CardRoot, {
|
|
|
1735
1863
|
});
|
|
1736
1864
|
var Card_default = Card2;
|
|
1737
1865
|
function applyDividers(children, dividers) {
|
|
1738
|
-
return
|
|
1739
|
-
if (!
|
|
1866
|
+
return React.Children.map(children, (child) => {
|
|
1867
|
+
if (!React.isValidElement(child)) return child;
|
|
1740
1868
|
if (isDividerSection(child)) {
|
|
1741
|
-
return
|
|
1869
|
+
return React.cloneElement(child, { dividers: child.props.dividers ?? dividers });
|
|
1742
1870
|
}
|
|
1743
1871
|
if (hasNestedChildren(child)) {
|
|
1744
|
-
return
|
|
1872
|
+
return React.cloneElement(child, {
|
|
1745
1873
|
children: applyDividers(child.props.children, dividers)
|
|
1746
1874
|
});
|
|
1747
1875
|
}
|
|
@@ -1773,10 +1901,9 @@ var variantClasses2 = {
|
|
|
1773
1901
|
ghost: "rounded-xl bg-white/20 backdrop-opacity-5 border border-white/20 dark:bg-slate-900/30 dark:border-white/10",
|
|
1774
1902
|
filled: "rounded-xl bg-white/60 backdrop-opacity-5 border border-white/40 dark:bg-slate-900/70 dark:border-white/15",
|
|
1775
1903
|
underlined: "rounded-xl bg-white/20 backdrop-opacity-5 border-b border-white/40 dark:bg-slate-900/30 dark:border-white/20",
|
|
1776
|
-
rounded: "rounded-3xl bg-white/40 backdrop-opacity-5 border border-white/30 dark:bg-slate-900/50 dark:border-white/10",
|
|
1777
1904
|
sharp: "rounded-none bg-white/40 backdrop-opacity-5 border border-white/30 dark:bg-slate-900/50 dark:border-white/10"
|
|
1778
1905
|
};
|
|
1779
|
-
var Block =
|
|
1906
|
+
var Block = React__namespace.forwardRef(function Block2({ className, variant = "solid", blur = "sm", interactive = false, children, ...rest }, ref) {
|
|
1780
1907
|
const variantClass = variantClasses2[variant] ?? variantClasses2.solid;
|
|
1781
1908
|
const blurClass = blurClasses[blur] ?? blurClasses.sm;
|
|
1782
1909
|
const interactiveClass = interactive ? "transition-all duration-200 hover:-translate-y-0.5 hover:shadow-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-slate-900" : void 0;
|
|
@@ -1834,10 +1961,10 @@ var MasonryBase = (props, ref) => {
|
|
|
1834
1961
|
const renderedItems = items && items.length ? items.map((item, index) => {
|
|
1835
1962
|
const content = resolveItemContent(item, index, renderItem);
|
|
1836
1963
|
return wrapItem(content, resolveItemKey(item, index, getKey));
|
|
1837
|
-
}) :
|
|
1964
|
+
}) : React__namespace.Children.map(children, (child, index) => wrapItem(child, resolveChildKey(child, index))) ?? null;
|
|
1838
1965
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...rest, ref, role, className: tailwindMerge.twMerge(masonryBaseClass, className), style: layoutStyle, children: renderedItems });
|
|
1839
1966
|
};
|
|
1840
|
-
var Masonry =
|
|
1967
|
+
var Masonry = React__namespace.forwardRef(MasonryBase);
|
|
1841
1968
|
Masonry.displayName = "Masonry";
|
|
1842
1969
|
var Masonry_default = Masonry;
|
|
1843
1970
|
function toCssLength(value) {
|
|
@@ -1862,13 +1989,13 @@ function resolveColumnCount(column, maxColumn, hasColumnWidth) {
|
|
|
1862
1989
|
}
|
|
1863
1990
|
function resolveItemKey(item, index, getKey) {
|
|
1864
1991
|
if (getKey) return getKey(item, index);
|
|
1865
|
-
if (
|
|
1992
|
+
if (React__namespace.isValidElement(item) && item.key != null) {
|
|
1866
1993
|
return item.key;
|
|
1867
1994
|
}
|
|
1868
1995
|
return index;
|
|
1869
1996
|
}
|
|
1870
1997
|
function resolveChildKey(child, index) {
|
|
1871
|
-
if (
|
|
1998
|
+
if (React__namespace.isValidElement(child) && child.key != null) {
|
|
1872
1999
|
return child.key;
|
|
1873
2000
|
}
|
|
1874
2001
|
return index;
|
|
@@ -1894,7 +2021,7 @@ var hasMarker2 = (type) => {
|
|
|
1894
2021
|
return false;
|
|
1895
2022
|
};
|
|
1896
2023
|
var isTabsTabElement = (element) => {
|
|
1897
|
-
if (!
|
|
2024
|
+
if (!React.isValidElement(element)) {
|
|
1898
2025
|
return false;
|
|
1899
2026
|
}
|
|
1900
2027
|
return hasMarker2(element.type);
|
|
@@ -1986,7 +2113,7 @@ var panelVariantClasses = {
|
|
|
1986
2113
|
pill: "mt-3 rounded-2xl border border-gray-200 bg-white/90 p-4"
|
|
1987
2114
|
};
|
|
1988
2115
|
var isExtraContentObject = (value) => {
|
|
1989
|
-
return !!value && typeof value === "object" && !
|
|
2116
|
+
return !!value && typeof value === "object" && !React__namespace.isValidElement(value) && ("left" in value || "right" in value);
|
|
1990
2117
|
};
|
|
1991
2118
|
var resolveFirstEnabledTab = (tabs) => tabs.find((tab) => !tab.disabled)?.value;
|
|
1992
2119
|
var clampActive = (value, tabs) => {
|
|
@@ -2013,7 +2140,7 @@ var collectTabs = (children, tabsId) => {
|
|
|
2013
2140
|
return;
|
|
2014
2141
|
}
|
|
2015
2142
|
if (!isTabsTabElement(node)) {
|
|
2016
|
-
if (
|
|
2143
|
+
if (React__namespace.isValidElement(node)) {
|
|
2017
2144
|
const props = node.props;
|
|
2018
2145
|
if (props && Object.prototype.hasOwnProperty.call(props, "children")) {
|
|
2019
2146
|
walk(props.children);
|
|
@@ -2057,7 +2184,7 @@ var injectTabs = (children, context, tabs) => {
|
|
|
2057
2184
|
});
|
|
2058
2185
|
return changed ? next : node;
|
|
2059
2186
|
}
|
|
2060
|
-
if (!
|
|
2187
|
+
if (!React__namespace.isValidElement(node)) {
|
|
2061
2188
|
return node;
|
|
2062
2189
|
}
|
|
2063
2190
|
if (isTabsTabElement(node)) {
|
|
@@ -2073,14 +2200,14 @@ var injectTabs = (children, context, tabs) => {
|
|
|
2073
2200
|
__tabsTabId: tab.tabId,
|
|
2074
2201
|
__tabsPanelId: tab.panelId
|
|
2075
2202
|
};
|
|
2076
|
-
return
|
|
2203
|
+
return React__namespace.cloneElement(node, injectedProps);
|
|
2077
2204
|
}
|
|
2078
2205
|
if (node.props) {
|
|
2079
2206
|
const props = node.props;
|
|
2080
2207
|
if (props && Object.prototype.hasOwnProperty.call(props, "children")) {
|
|
2081
2208
|
const mappedChildren = walk(props.children);
|
|
2082
2209
|
if (mappedChildren !== props.children) {
|
|
2083
|
-
return
|
|
2210
|
+
return React__namespace.cloneElement(node, void 0, mappedChildren);
|
|
2084
2211
|
}
|
|
2085
2212
|
}
|
|
2086
2213
|
}
|
|
@@ -2114,7 +2241,7 @@ var handleTabListKeyDown = (event) => {
|
|
|
2114
2241
|
tabs[nextIndex]?.focus();
|
|
2115
2242
|
event.preventDefault();
|
|
2116
2243
|
};
|
|
2117
|
-
var Tabs =
|
|
2244
|
+
var Tabs = React__namespace.forwardRef((props, ref) => {
|
|
2118
2245
|
const {
|
|
2119
2246
|
activeKey,
|
|
2120
2247
|
defaultActiveKey,
|
|
@@ -2235,7 +2362,7 @@ var Tabs = React4__namespace.forwardRef((props, ref) => {
|
|
|
2235
2362
|
);
|
|
2236
2363
|
});
|
|
2237
2364
|
Tabs.displayName = "Tabs";
|
|
2238
|
-
var Tab =
|
|
2365
|
+
var Tab = React__namespace.forwardRef((props, ref) => {
|
|
2239
2366
|
const {
|
|
2240
2367
|
label: _label,
|
|
2241
2368
|
value,
|
|
@@ -2310,7 +2437,7 @@ var AppBar = ({
|
|
|
2310
2437
|
children,
|
|
2311
2438
|
...rest
|
|
2312
2439
|
}) => {
|
|
2313
|
-
const [mobileOpen, setMobileOpen] =
|
|
2440
|
+
const [mobileOpen, setMobileOpen] = React__namespace.useState(false);
|
|
2314
2441
|
const isDark = color === "primary" || color === "dark";
|
|
2315
2442
|
const isTransparent = color === "transparent";
|
|
2316
2443
|
const barClass = tailwindMerge.twMerge(
|
|
@@ -2423,7 +2550,6 @@ var containerVariants = {
|
|
|
2423
2550
|
ghost: "bg-primary/5 text-gray-900 border border-primary/10",
|
|
2424
2551
|
filled: "bg-slate-900 text-white shadow-2xl shadow-slate-900/40",
|
|
2425
2552
|
underlined: "border-b-4 border-primary/70 bg-white text-gray-900",
|
|
2426
|
-
rounded: "rounded-3xl border border-gray-100 bg-white text-gray-900 shadow-xl",
|
|
2427
2553
|
sharp: "rounded-none border border-gray-200 bg-white text-gray-900 shadow"
|
|
2428
2554
|
};
|
|
2429
2555
|
var frameRadii = {
|
|
@@ -2433,7 +2559,6 @@ var frameRadii = {
|
|
|
2433
2559
|
ghost: "rounded-2xl",
|
|
2434
2560
|
filled: "rounded-3xl",
|
|
2435
2561
|
underlined: "rounded-2xl",
|
|
2436
|
-
rounded: "rounded-3xl",
|
|
2437
2562
|
sharp: "rounded-none"
|
|
2438
2563
|
};
|
|
2439
2564
|
var badgeVariants = {
|
|
@@ -2443,7 +2568,6 @@ var badgeVariants = {
|
|
|
2443
2568
|
ghost: "bg-primary/15 text-primary border border-primary/25",
|
|
2444
2569
|
filled: "bg-white/10 text-white border border-white/20",
|
|
2445
2570
|
underlined: "bg-primary/10 text-primary border border-primary/20",
|
|
2446
|
-
rounded: "bg-primary/10 text-primary border border-primary/20",
|
|
2447
2571
|
sharp: "bg-primary/10 text-primary border border-primary/20"
|
|
2448
2572
|
};
|
|
2449
2573
|
var Hero = ({
|
|
@@ -2556,7 +2680,6 @@ var variantMap = {
|
|
|
2556
2680
|
ghost: "bg-slate-50 text-gray-900 border border-slate-100",
|
|
2557
2681
|
filled: "bg-slate-900 text-white",
|
|
2558
2682
|
underlined: "bg-white text-gray-900 border-b-4 border-primary/70",
|
|
2559
|
-
rounded: "bg-white text-gray-900 border border-gray-200 rounded-3xl",
|
|
2560
2683
|
sharp: "bg-white text-gray-900 border border-gray-200 rounded-none"
|
|
2561
2684
|
};
|
|
2562
2685
|
var elevationClasses2 = {
|
|
@@ -2575,7 +2698,6 @@ var cardRadiusMap = {
|
|
|
2575
2698
|
ghost: "rounded-2xl",
|
|
2576
2699
|
filled: "rounded-3xl",
|
|
2577
2700
|
underlined: "rounded-t-2xl",
|
|
2578
|
-
rounded: "rounded-3xl",
|
|
2579
2701
|
sharp: "rounded-none"
|
|
2580
2702
|
};
|
|
2581
2703
|
var avatarRadiusMap = {
|
|
@@ -2585,7 +2707,6 @@ var avatarRadiusMap = {
|
|
|
2585
2707
|
ghost: "rounded-2xl",
|
|
2586
2708
|
filled: "rounded-3xl",
|
|
2587
2709
|
underlined: "rounded-2xl",
|
|
2588
|
-
rounded: "rounded-3xl",
|
|
2589
2710
|
sharp: "rounded-none"
|
|
2590
2711
|
};
|
|
2591
2712
|
var isDarkVariant = (variant) => variant === "filled";
|
|
@@ -2594,7 +2715,7 @@ var SocialIcons = ({ socials, dark }) => {
|
|
|
2594
2715
|
if (Array.isArray(socials) && socials.length === 0) return null;
|
|
2595
2716
|
const isSocialLinkArray = Array.isArray(socials) && socials.length > 0 && "href" in socials[0];
|
|
2596
2717
|
if (isSocialLinkArray) {
|
|
2597
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: socials.map((link) => /* @__PURE__ */ jsxRuntime.jsx(Button_default, { iconOnly: true, icon: link.icon, variant: "
|
|
2718
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: socials.map((link) => /* @__PURE__ */ jsxRuntime.jsx(Button_default, { iconOnly: true, icon: link.icon, variant: "outline", size: "x-small", ...{ href: link.href, as: "a" } }, link.href)) });
|
|
2598
2719
|
}
|
|
2599
2720
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: socials });
|
|
2600
2721
|
};
|
|
@@ -2697,109 +2818,57 @@ var ProfileCard = ({
|
|
|
2697
2818
|
};
|
|
2698
2819
|
ProfileCard.displayName = "ProfileCard";
|
|
2699
2820
|
var ProfileCard_default = ProfileCard;
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
var resolveIconClassName4 = (icon) => {
|
|
2703
|
-
if (!icon) {
|
|
2704
|
-
return void 0;
|
|
2705
|
-
}
|
|
2706
|
-
if (typeof icon === "string") {
|
|
2707
|
-
const trimmed = icon.trim();
|
|
2708
|
-
if (!trimmed) {
|
|
2709
|
-
return void 0;
|
|
2710
|
-
}
|
|
2711
|
-
if (trimmed.includes(" ")) {
|
|
2712
|
-
return trimmed;
|
|
2713
|
-
}
|
|
2714
|
-
const normalizedName2 = trimmed.startsWith("mdi-") ? trimmed : `mdi-${trimmed}`;
|
|
2715
|
-
return ["mdi", normalizedName2].join(" ");
|
|
2716
|
-
}
|
|
2717
|
-
const [library, iconNameRaw] = icon;
|
|
2718
|
-
const baseClasses = iconBaseClasses[library] ?? [library];
|
|
2719
|
-
const iconName = iconNameRaw.trim();
|
|
2720
|
-
if (!iconName) {
|
|
2721
|
-
return baseClasses.join(" ");
|
|
2722
|
-
}
|
|
2723
|
-
const normalizedName = iconName.startsWith("mdi-") ? iconName : `mdi-${iconName}`;
|
|
2724
|
-
const classes = [...baseClasses, normalizedName];
|
|
2725
|
-
return Array.from(new Set(classes)).join(" ");
|
|
2726
|
-
};
|
|
2727
|
-
var Input = React4__namespace.default.forwardRef(
|
|
2728
|
-
({
|
|
2729
|
-
variant = "outline",
|
|
2730
|
-
size = "medium",
|
|
2731
|
-
success,
|
|
2732
|
-
error,
|
|
2733
|
-
warn,
|
|
2734
|
-
icon,
|
|
2735
|
-
className,
|
|
2736
|
-
wrapperClassName,
|
|
2737
|
-
label,
|
|
2738
|
-
prefix,
|
|
2739
|
-
suffix,
|
|
2740
|
-
...props
|
|
2741
|
-
}, ref) => {
|
|
2821
|
+
var Input = React__namespace.default.forwardRef(
|
|
2822
|
+
({ variant = "outline", size = "medium", rounded = "md", success, error, warn, className, wrapperClassName, label, prepend, append, ...props }, ref) => {
|
|
2742
2823
|
const { placeholder, onFocus, onBlur, ...inputProps } = props;
|
|
2743
|
-
const reactId =
|
|
2824
|
+
const reactId = React__namespace.default.useId();
|
|
2744
2825
|
const hasLabel = Boolean(label);
|
|
2745
2826
|
const hasProvidedPlaceholder = typeof placeholder === "string" && placeholder.trim().length > 0;
|
|
2746
2827
|
const hidePlaceholderUntilFocus = hasLabel && hasProvidedPlaceholder;
|
|
2747
|
-
const [isFocused, setIsFocused] =
|
|
2748
|
-
const classBase = "input-base
|
|
2828
|
+
const [isFocused, setIsFocused] = React__namespace.default.useState(false);
|
|
2829
|
+
const classBase = "input-base transition-colors duration-200 w-full has-[input:disabled]:opacity-50 has-[input:disabled]:cursor-not-allowed";
|
|
2830
|
+
const inputBase = "peer block w-full min-w-0 border-0 bg-transparent p-0 text-gray-900 dark:text-gray-100 placeholder:text-gray-500 dark:placeholder:text-gray-400 focus:outline-none focus:ring-0";
|
|
2749
2831
|
const variantClasses5 = {
|
|
2750
|
-
solid: "rounded border border-gray-400 bg-white shadow-sm focus-
|
|
2751
|
-
sharp: "rounded-none border border-gray-400 bg-white shadow-sm focus-
|
|
2752
|
-
outline: "rounded border-2 border-black bg-white focus-
|
|
2753
|
-
text: "rounded-none border-0 border-b border-transparent px-0 bg-transparent focus-
|
|
2754
|
-
ghost: "rounded border border-transparent bg-gray-50 text-gray-900 focus-
|
|
2755
|
-
filled: "rounded border border-gray-200 bg-gray-100 focus-
|
|
2756
|
-
underlined: "rounded-none border-0 border-b border-gray-300 px-0 bg-transparent focus-
|
|
2757
|
-
|
|
2832
|
+
solid: "rounded border border-gray-400 bg-white shadow-sm focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/30 dark:border-gray-600 dark:bg-slate-900 dark:shadow-black/20 dark:focus-within:border-primary/70 dark:focus-within:ring-primary/40",
|
|
2833
|
+
sharp: "rounded-none border border-gray-400 bg-white shadow-sm focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/30 dark:border-gray-600 dark:bg-slate-900 dark:shadow-black/20 dark:focus-within:border-primary/70 dark:focus-within:ring-primary/40",
|
|
2834
|
+
outline: "rounded border-2 border-black bg-white focus-within:border-black focus-within:ring-2 focus-within:ring-black/30 dark:border-black dark:bg-transparent dark:focus-within:border-black dark:focus-within:ring-black/40",
|
|
2835
|
+
text: "rounded-none border-0 border-b border-transparent px-0 bg-transparent focus-within:border-primary focus-within:ring-0 focus-within:ring-transparent dark:border-b-gray-600 dark:focus-within:border-primary/70",
|
|
2836
|
+
ghost: "rounded border border-transparent bg-gray-50 text-gray-900 focus-within:bg-white focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/15 dark:bg-slate-800 dark:text-gray-100 dark:focus-within:bg-slate-700 dark:focus-within:border-primary/60 dark:focus-within:ring-primary/25",
|
|
2837
|
+
filled: "rounded border border-gray-200 bg-gray-100 focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/25 dark:border-gray-700 dark:bg-slate-800 dark:focus-within:border-primary/60 dark:focus-within:ring-primary/30",
|
|
2838
|
+
underlined: "rounded-none border-0 border-b border-gray-300 px-0 bg-transparent focus-within:border-primary focus-within:ring-0 focus-within:ring-transparent dark:border-b-gray-600 dark:focus-within:border-primary/70"
|
|
2839
|
+
};
|
|
2840
|
+
const roundedClasses3 = {
|
|
2841
|
+
sm: "rounded-sm",
|
|
2842
|
+
md: "rounded-md",
|
|
2843
|
+
lg: "rounded-lg",
|
|
2844
|
+
xl: "rounded-xl",
|
|
2845
|
+
"2xl": "rounded-2xl",
|
|
2846
|
+
"3xl": "rounded-3xl"
|
|
2758
2847
|
};
|
|
2759
2848
|
const sizeClasses5 = {
|
|
2760
2849
|
"x-small": {
|
|
2761
2850
|
paddingY: "py-2",
|
|
2762
|
-
|
|
2763
|
-
paddingRight: "pr-2",
|
|
2764
|
-
paddingLeftLeading: "pl-8",
|
|
2765
|
-
paddingLeftLeadingDouble: "pl-12",
|
|
2766
|
-
paddingRightTrailing: "pr-8",
|
|
2851
|
+
paddingX: "px-2",
|
|
2767
2852
|
text: "text-xs"
|
|
2768
2853
|
},
|
|
2769
2854
|
small: {
|
|
2770
2855
|
paddingY: "py-2.5",
|
|
2771
|
-
|
|
2772
|
-
paddingRight: "pr-2.5",
|
|
2773
|
-
paddingLeftLeading: "pl-9",
|
|
2774
|
-
paddingLeftLeadingDouble: "pl-12",
|
|
2775
|
-
paddingRightTrailing: "pr-9",
|
|
2856
|
+
paddingX: "px-2.5",
|
|
2776
2857
|
text: "text-sm"
|
|
2777
2858
|
},
|
|
2778
2859
|
medium: {
|
|
2779
2860
|
paddingY: "py-3",
|
|
2780
|
-
|
|
2781
|
-
paddingRight: "pr-3",
|
|
2782
|
-
paddingLeftLeading: "pl-10",
|
|
2783
|
-
paddingLeftLeadingDouble: "pl-14",
|
|
2784
|
-
paddingRightTrailing: "pr-10",
|
|
2861
|
+
paddingX: "px-3",
|
|
2785
2862
|
text: "text-base"
|
|
2786
2863
|
},
|
|
2787
2864
|
large: {
|
|
2788
2865
|
paddingY: "py-3.5",
|
|
2789
|
-
|
|
2790
|
-
paddingRight: "pr-3.5",
|
|
2791
|
-
paddingLeftLeading: "pl-11",
|
|
2792
|
-
paddingLeftLeadingDouble: "pl-14",
|
|
2793
|
-
paddingRightTrailing: "pr-11",
|
|
2866
|
+
paddingX: "px-3.5",
|
|
2794
2867
|
text: "text-lg"
|
|
2795
2868
|
},
|
|
2796
2869
|
"x-large": {
|
|
2797
2870
|
paddingY: "py-4",
|
|
2798
|
-
|
|
2799
|
-
paddingRight: "pr-4",
|
|
2800
|
-
paddingLeftLeading: "pl-12",
|
|
2801
|
-
paddingLeftLeadingDouble: "pl-16",
|
|
2802
|
-
paddingRightTrailing: "pr-12",
|
|
2871
|
+
paddingX: "px-4",
|
|
2803
2872
|
text: "text-xl"
|
|
2804
2873
|
}
|
|
2805
2874
|
};
|
|
@@ -2816,25 +2885,18 @@ var Input = React4__namespace.default.forwardRef(
|
|
|
2816
2885
|
};
|
|
2817
2886
|
const variantClass = variantClasses5[variant] ?? variantClasses5.outline;
|
|
2818
2887
|
const toneClass = status ? statusClasses[status.tone] : void 0;
|
|
2819
|
-
|
|
2820
|
-
const
|
|
2821
|
-
const hasSuffix = typeof suffix === "string" ? suffix.trim().length > 0 : Boolean(suffix);
|
|
2822
|
-
const hasLeadingIcon = Boolean(prependIconClass);
|
|
2823
|
-
const hasLeadingAdornment = hasLeadingIcon || hasPrefix;
|
|
2824
|
-
const hasTrailingAdornment = hasSuffix;
|
|
2888
|
+
const hasPrepend = typeof prepend === "string" ? prepend.trim().length > 0 : Boolean(prepend);
|
|
2889
|
+
const hasAppend = typeof append === "string" ? append.trim().length > 0 : Boolean(append);
|
|
2825
2890
|
const sizeConfig = sizeClasses5[size] ?? sizeClasses5.medium;
|
|
2826
|
-
const
|
|
2827
|
-
const
|
|
2828
|
-
const sizeClass = [sizeConfig.paddingY, leftPaddingClass, rightPaddingClass, sizeConfig.text].join(" ");
|
|
2891
|
+
const sizeClass = [sizeConfig.paddingY, sizeConfig.paddingX, sizeConfig.text].join(" ");
|
|
2892
|
+
const roundedClass = variant === "sharp" || variant === "text" || variant === "underlined" ? "rounded-none" : roundedClasses3[rounded];
|
|
2829
2893
|
const inputName = inputProps.name || reactId;
|
|
2830
2894
|
const basePlaceholder = placeholder ?? (hasLabel ? " " : void 0);
|
|
2831
2895
|
const placeholderValue = hidePlaceholderUntilFocus ? isFocused ? placeholder : " " : basePlaceholder;
|
|
2832
2896
|
const placeholderClass = hidePlaceholderUntilFocus ? "placeholder-transparent focus:placeholder-gray-500 focus:dark:placeholder-gray-400" : void 0;
|
|
2833
|
-
const
|
|
2834
|
-
const
|
|
2835
|
-
const
|
|
2836
|
-
const renderSuffix = hasSuffix ? typeof suffix === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("text-gray-500 dark:text-gray-400", sizeConfig.text), children: suffix }) : suffix : null;
|
|
2837
|
-
const labelBgDefault = ["outline", "text", "underlined"].includes(variant) ? "bg-transparent" : "bg-white/90 dark:bg-slate-900";
|
|
2897
|
+
const renderPrepend = hasPrepend ? typeof prepend === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("text-gray-500 dark:text-gray-400", sizeConfig.text), children: prepend }) : prepend : null;
|
|
2898
|
+
const renderAppend = hasAppend ? typeof append === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("text-gray-500 dark:text-gray-400", sizeConfig.text), children: append }) : append : null;
|
|
2899
|
+
const labelBgDefault = "bg-white px-1 dark:bg-slate-900";
|
|
2838
2900
|
const handleFocus = (event) => {
|
|
2839
2901
|
if (hidePlaceholderUntilFocus) setIsFocused(true);
|
|
2840
2902
|
onFocus?.(event);
|
|
@@ -2844,62 +2906,43 @@ var Input = React4__namespace.default.forwardRef(
|
|
|
2844
2906
|
onBlur?.(event);
|
|
2845
2907
|
};
|
|
2846
2908
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tailwindMerge.twMerge("flex flex-col gap-1", wrapperClassName), children: [
|
|
2847
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2909
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: tailwindMerge.twMerge("flex w-full items-center gap-2", classBase, variantClass, roundedClass, toneClass, sizeClass, className), children: [
|
|
2910
|
+
hasPrepend && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 flex items-center", children: renderPrepend }),
|
|
2911
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative min-w-0 flex-1", children: [
|
|
2912
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2913
|
+
"input",
|
|
2851
2914
|
{
|
|
2915
|
+
...inputProps,
|
|
2916
|
+
ref,
|
|
2917
|
+
id: inputName,
|
|
2918
|
+
name: inputName,
|
|
2919
|
+
placeholder: placeholderValue,
|
|
2920
|
+
onFocus: handleFocus,
|
|
2921
|
+
onBlur: handleBlur,
|
|
2922
|
+
className: tailwindMerge.twMerge(inputBase, placeholderClass)
|
|
2923
|
+
}
|
|
2924
|
+
),
|
|
2925
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2926
|
+
"label",
|
|
2927
|
+
{
|
|
2928
|
+
htmlFor: inputName,
|
|
2852
2929
|
className: tailwindMerge.twMerge(
|
|
2853
|
-
"text-gray-
|
|
2854
|
-
|
|
2855
|
-
|
|
2930
|
+
"absolute left-0 z-10 transition-all duration-150 pointer-events-none text-gray-700 dark:text-gray-200",
|
|
2931
|
+
// Floated state: keep label above the border for readability
|
|
2932
|
+
"-top-2 -translate-y-full text-xs",
|
|
2933
|
+
labelBgDefault,
|
|
2934
|
+
// focus state keeps the same elevated position
|
|
2935
|
+
"peer-focus:left-0 peer-focus:-top-5 peer-focus:-translate-y-full peer-focus:text-xs peer-focus:text-gray-600 dark:peer-focus:text-gray-300",
|
|
2936
|
+
// when input is empty (placeholder shown) -> center label inside input
|
|
2937
|
+
"peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:text-sm peer-placeholder-shown:bg-transparent peer-placeholder-shown:text-gray-500 dark:peer-placeholder-shown:text-gray-400",
|
|
2938
|
+
// explicit filled state so label remains visible for any variant/value combination
|
|
2939
|
+
"peer-[&:not(:placeholder-shown)]:left-0 peer-[&:not(:placeholder-shown)]:-top-2 peer-[&:not(:placeholder-shown)]:-translate-y-full peer-[&:not(:placeholder-shown)]:text-xs peer-[&:not(:placeholder-shown)]:text-gray-700 dark:peer-[&:not(:placeholder-shown)]:text-gray-200"
|
|
2856
2940
|
),
|
|
2857
|
-
|
|
2941
|
+
children: label
|
|
2858
2942
|
}
|
|
2859
|
-
)
|
|
2860
|
-
renderPrefix
|
|
2943
|
+
)
|
|
2861
2944
|
] }),
|
|
2862
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2863
|
-
"input",
|
|
2864
|
-
{
|
|
2865
|
-
...inputProps,
|
|
2866
|
-
ref,
|
|
2867
|
-
id: inputName,
|
|
2868
|
-
name: inputName,
|
|
2869
|
-
placeholder: placeholderValue,
|
|
2870
|
-
onFocus: handleFocus,
|
|
2871
|
-
onBlur: handleBlur,
|
|
2872
|
-
className: tailwindMerge.twMerge(
|
|
2873
|
-
"peer",
|
|
2874
|
-
classBase,
|
|
2875
|
-
variantClass,
|
|
2876
|
-
toneClass,
|
|
2877
|
-
sizeClass,
|
|
2878
|
-
placeholderClass,
|
|
2879
|
-
className
|
|
2880
|
-
)
|
|
2881
|
-
}
|
|
2882
|
-
),
|
|
2883
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2884
|
-
"label",
|
|
2885
|
-
{
|
|
2886
|
-
htmlFor: inputName,
|
|
2887
|
-
className: tailwindMerge.twMerge(
|
|
2888
|
-
"absolute transition-all duration-150 pointer-events-none text-gray-700 rounded dark:text-gray-200",
|
|
2889
|
-
labelLeftClass,
|
|
2890
|
-
// Floated state: center label's vertical middle on the top border line
|
|
2891
|
-
"-top-1.5 -translate-y-2/3 text-xs px-1",
|
|
2892
|
-
labelBgDefault,
|
|
2893
|
-
// focus state mirrors floated state (keeps center on border)
|
|
2894
|
-
labelFocusLeftClass,
|
|
2895
|
-
"peer-focus:top-0 peer-focus:-translate-y-1/2 peer-focus:text-xs peer-focus:px-1 peer-focus:bg-white peer-focus:text-gray-600 dark:peer-focus:bg-slate-900 dark:peer-focus:text-gray-300",
|
|
2896
|
-
// when input is empty (placeholder shown) -> center label inside input
|
|
2897
|
-
"peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:text-sm peer-placeholder-shown:bg-transparent peer-placeholder-shown:text-gray-500 dark:peer-placeholder-shown:text-gray-400"
|
|
2898
|
-
),
|
|
2899
|
-
children: label
|
|
2900
|
-
}
|
|
2901
|
-
),
|
|
2902
|
-
hasTrailingAdornment && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-3 inset-y-0 flex items-center", children: renderSuffix })
|
|
2945
|
+
hasAppend && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 flex items-center", children: renderAppend })
|
|
2903
2946
|
] }),
|
|
2904
2947
|
status?.message && /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("text-sm", statusMessageClasses[status.tone]), children: status.message })
|
|
2905
2948
|
] });
|
|
@@ -3002,7 +3045,7 @@ var TextArea = ({
|
|
|
3002
3045
|
const modeToggleName = `${textareaId}-mode-toggle`;
|
|
3003
3046
|
const simpleToggleId = `${modeToggleName}-simple`;
|
|
3004
3047
|
const advancedToggleId = `${modeToggleName}-advanced`;
|
|
3005
|
-
const turndownService =
|
|
3048
|
+
const turndownService = React__namespace.default.useMemo(() => {
|
|
3006
3049
|
const service = new TurndownService__default.default({
|
|
3007
3050
|
codeBlockStyle: "fenced",
|
|
3008
3051
|
emDelimiter: "*",
|
|
@@ -3015,8 +3058,8 @@ var TextArea = ({
|
|
|
3015
3058
|
});
|
|
3016
3059
|
return service;
|
|
3017
3060
|
}, []);
|
|
3018
|
-
const hiddenTextareaRef =
|
|
3019
|
-
const lastMarkdownRef =
|
|
3061
|
+
const hiddenTextareaRef = React__namespace.default.useRef(null);
|
|
3062
|
+
const lastMarkdownRef = React__namespace.default.useRef(contentValue);
|
|
3020
3063
|
const editorContentClass = tailwindMerge.twMerge(
|
|
3021
3064
|
baseClass,
|
|
3022
3065
|
"min-h-45 rounded border-0 bg-transparent outline-none whitespace-pre-wrap wrap-break-words",
|
|
@@ -3054,11 +3097,11 @@ var TextArea = ({
|
|
|
3054
3097
|
dispatchInputEvent(hiddenTextareaRef.current);
|
|
3055
3098
|
}
|
|
3056
3099
|
});
|
|
3057
|
-
|
|
3100
|
+
React__namespace.default.useEffect(() => {
|
|
3058
3101
|
if (!editor) return;
|
|
3059
3102
|
editor.setEditable(editorEditable);
|
|
3060
3103
|
}, [editor, editorEditable]);
|
|
3061
|
-
|
|
3104
|
+
React__namespace.default.useEffect(() => {
|
|
3062
3105
|
if (!editor) return;
|
|
3063
3106
|
editor.setOptions({
|
|
3064
3107
|
editorProps: {
|
|
@@ -3073,7 +3116,7 @@ var TextArea = ({
|
|
|
3073
3116
|
}
|
|
3074
3117
|
});
|
|
3075
3118
|
}, [editor, editorContentClass, label, advancedLabelId]);
|
|
3076
|
-
|
|
3119
|
+
React__namespace.default.useEffect(() => {
|
|
3077
3120
|
if (!editor || typeof value !== "string") return;
|
|
3078
3121
|
if (value === lastMarkdownRef.current) return;
|
|
3079
3122
|
editor.commands.setContent(renderMarkdown(value), { emitUpdate: false });
|
|
@@ -3082,7 +3125,7 @@ var TextArea = ({
|
|
|
3082
3125
|
hiddenTextareaRef.current.value = value;
|
|
3083
3126
|
}
|
|
3084
3127
|
}, [editor, value]);
|
|
3085
|
-
|
|
3128
|
+
React__namespace.default.useEffect(() => {
|
|
3086
3129
|
if (!hiddenTextareaRef.current) return;
|
|
3087
3130
|
if (hiddenTextareaRef.current.value === contentValue) return;
|
|
3088
3131
|
hiddenTextareaRef.current.value = contentValue;
|
|
@@ -3383,8 +3426,7 @@ var variantClasses4 = {
|
|
|
3383
3426
|
text: "rounded-none border-0 border-b border-transparent pl-0 pr-10 bg-transparent focus-visible:border-primary focus-visible:ring-0 focus-visible:ring-transparent dark:border-b-gray-600 dark:focus-visible:border-primary/70",
|
|
3384
3427
|
ghost: "rounded border border-transparent bg-gray-50 text-gray-900 focus-visible:bg-white focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/15 dark:bg-slate-800 dark:text-gray-100 dark:focus-visible:bg-slate-700 dark:focus-visible:border-primary/60 dark:focus-visible:ring-primary/25",
|
|
3385
3428
|
filled: "rounded border border-gray-200 bg-gray-100 focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/25 dark:border-gray-700 dark:bg-slate-800 dark:focus-visible:border-primary/60 dark:focus-visible:ring-primary/30",
|
|
3386
|
-
underlined: "rounded-none border-0 border-b border-gray-300 pl-0 pr-10 bg-transparent focus-visible:border-primary focus-visible:ring-0 focus-visible:ring-transparent dark:border-b-gray-300 dark:focus-visible:border-primary/70"
|
|
3387
|
-
rounded: "rounded-full pl-4 pr-10 border border-gray-300 bg-white focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/20 shadow-sm dark:border-gray-600 dark:bg-slate-900 dark:focus-visible:border-primary/70 dark:focus-visible:ring-primary/30 dark:shadow-black/20"
|
|
3429
|
+
underlined: "rounded-none border-0 border-b border-gray-300 pl-0 pr-10 bg-transparent focus-visible:border-primary focus-visible:ring-0 focus-visible:ring-transparent dark:border-b-gray-300 dark:focus-visible:border-primary/70"
|
|
3388
3430
|
};
|
|
3389
3431
|
var sizeClasses3 = {
|
|
3390
3432
|
"x-small": { padding: "pl-2 pr-8 py-2", text: "text-xs" },
|
|
@@ -3403,7 +3445,7 @@ var toIdSafe = (value) => {
|
|
|
3403
3445
|
const sanitized = value.replace(/\s+/g, "-").replace(/[^A-Za-z0-9_-]/g, "");
|
|
3404
3446
|
return sanitized || "opt";
|
|
3405
3447
|
};
|
|
3406
|
-
var
|
|
3448
|
+
var resolveIconClassName4 = (icon) => {
|
|
3407
3449
|
if (!icon) {
|
|
3408
3450
|
return void 0;
|
|
3409
3451
|
}
|
|
@@ -3428,7 +3470,7 @@ var resolveIconClassName5 = (icon) => {
|
|
|
3428
3470
|
const classes = [...baseClasses, normalizedName];
|
|
3429
3471
|
return Array.from(new Set(classes)).join(" ");
|
|
3430
3472
|
};
|
|
3431
|
-
var Select =
|
|
3473
|
+
var Select = React__namespace.default.forwardRef(
|
|
3432
3474
|
({
|
|
3433
3475
|
options,
|
|
3434
3476
|
label,
|
|
@@ -3512,7 +3554,7 @@ var Select = React4__namespace.default.forwardRef(
|
|
|
3512
3554
|
const optionValueStr = String(option.value);
|
|
3513
3555
|
const isSelected = Array.isArray(value) ? value.map(String).includes(optionValueStr) : String(value) === optionValueStr;
|
|
3514
3556
|
const isDefaultSelected = Array.isArray(defaultValue) ? defaultValue.map(String).includes(optionValueStr) : String(defaultValue) === optionValueStr;
|
|
3515
|
-
const iconClassName =
|
|
3557
|
+
const iconClassName = resolveIconClassName4(option.icon);
|
|
3516
3558
|
const inputId = `${selectId}-${toIdSafe(optionValueStr)}-${index}`;
|
|
3517
3559
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3518
3560
|
"label",
|
|
@@ -3626,19 +3668,19 @@ var Slider = ({
|
|
|
3626
3668
|
const resolvedMax = toNumber(max, resolvedMin < 100 ? 100 : resolvedMin);
|
|
3627
3669
|
const resolvedStep = toNumber(step, 1);
|
|
3628
3670
|
const isControlled = typeof value === "number";
|
|
3629
|
-
const [internalValue, setInternalValue] =
|
|
3671
|
+
const [internalValue, setInternalValue] = React.useState(
|
|
3630
3672
|
clamp(
|
|
3631
3673
|
typeof value === "number" ? value : typeof defaultValue === "number" ? defaultValue : resolvedMin,
|
|
3632
3674
|
resolvedMin,
|
|
3633
3675
|
resolvedMax
|
|
3634
3676
|
)
|
|
3635
3677
|
);
|
|
3636
|
-
|
|
3678
|
+
React.useEffect(() => {
|
|
3637
3679
|
if (isControlled && typeof value === "number") {
|
|
3638
3680
|
setInternalValue(clamp(value, resolvedMin, resolvedMax));
|
|
3639
3681
|
}
|
|
3640
3682
|
}, [isControlled, value, resolvedMin, resolvedMax]);
|
|
3641
|
-
|
|
3683
|
+
React.useEffect(() => {
|
|
3642
3684
|
if (!isControlled) {
|
|
3643
3685
|
setInternalValue((prev) => clamp(prev, resolvedMin, resolvedMax));
|
|
3644
3686
|
}
|
|
@@ -3741,7 +3783,7 @@ var thumbActiveClasses = {
|
|
|
3741
3783
|
surface: "border-gray-900 shadow-[0_4px_12px_rgba(15,23,42,0.32)]",
|
|
3742
3784
|
bw: "border-black shadow-[0_4px_12px_rgba(0,0,0,0.32)]"
|
|
3743
3785
|
};
|
|
3744
|
-
var Switch =
|
|
3786
|
+
var Switch = React.forwardRef(
|
|
3745
3787
|
({
|
|
3746
3788
|
color = "primary",
|
|
3747
3789
|
size = "medium",
|
|
@@ -3760,10 +3802,10 @@ var Switch = React4.forwardRef(
|
|
|
3760
3802
|
const focusClass = focusRingClasses[color] ?? focusRingClasses.primary;
|
|
3761
3803
|
const thumbActive = thumbActiveClasses[color] ?? thumbActiveClasses.primary;
|
|
3762
3804
|
const isControlled = checked !== void 0;
|
|
3763
|
-
const [internalChecked, setInternalChecked] =
|
|
3805
|
+
const [internalChecked, setInternalChecked] = React.useState(
|
|
3764
3806
|
Boolean((isControlled ? checked : defaultChecked) ?? false)
|
|
3765
3807
|
);
|
|
3766
|
-
|
|
3808
|
+
React.useEffect(() => {
|
|
3767
3809
|
if (isControlled) {
|
|
3768
3810
|
setInternalChecked(Boolean(checked));
|
|
3769
3811
|
}
|
|
@@ -3984,7 +4026,7 @@ var resolveVariantClass3 = (variant, type) => {
|
|
|
3984
4026
|
return "bg-white/95 text-gray-900 border border-gray-200";
|
|
3985
4027
|
}
|
|
3986
4028
|
};
|
|
3987
|
-
var
|
|
4029
|
+
var resolveIconClassName5 = (icon) => {
|
|
3988
4030
|
if (!icon) return void 0;
|
|
3989
4031
|
if (typeof icon === "string") {
|
|
3990
4032
|
const trimmed = icon.trim();
|
|
@@ -3998,8 +4040,8 @@ var resolveIconClassName6 = (icon) => {
|
|
|
3998
4040
|
return `mdi ${library} ${normalized}`.trim();
|
|
3999
4041
|
};
|
|
4000
4042
|
var resolveIconNode2 = (icon, fallbackClassName) => {
|
|
4001
|
-
if (
|
|
4002
|
-
const iconClassName =
|
|
4043
|
+
if (React__namespace.isValidElement(icon)) return icon;
|
|
4044
|
+
const iconClassName = resolveIconClassName5(icon) ?? fallbackClassName;
|
|
4003
4045
|
if (!iconClassName) return null;
|
|
4004
4046
|
const hasBase = iconClassName.split(" ").some((token) => token.trim() === "mdi");
|
|
4005
4047
|
const hasGlyph = iconClassName.includes("mdi-");
|
|
@@ -4130,7 +4172,7 @@ var Notification = ({
|
|
|
4130
4172
|
};
|
|
4131
4173
|
var Notification_default = Notification;
|
|
4132
4174
|
var useNotification = (defaultMessage) => {
|
|
4133
|
-
const [messages, setMessages] =
|
|
4175
|
+
const [messages, setMessages] = React.useState([]);
|
|
4134
4176
|
const clearNotifications = (key) => {
|
|
4135
4177
|
setMessages((prev) => key ? prev.filter((notification) => notification.key !== key) : []);
|
|
4136
4178
|
};
|
|
@@ -4525,7 +4567,7 @@ var resolveIconNode3 = (icon) => {
|
|
|
4525
4567
|
const iconClass = resolveIconClassName2(icon);
|
|
4526
4568
|
return iconClass ? /* @__PURE__ */ jsxRuntime.jsx("i", { className: iconClass, "aria-hidden": true }) : null;
|
|
4527
4569
|
};
|
|
4528
|
-
var TimeLineItem =
|
|
4570
|
+
var TimeLineItem = React__namespace.forwardRef((props, ref) => {
|
|
4529
4571
|
const {
|
|
4530
4572
|
title,
|
|
4531
4573
|
subtitle,
|
|
@@ -4644,13 +4686,13 @@ var TimeLineItem = React4__namespace.forwardRef((props, ref) => {
|
|
|
4644
4686
|
});
|
|
4645
4687
|
TimeLineItem.displayName = "TimeLine.Item";
|
|
4646
4688
|
var isTimeLineItem = (child) => {
|
|
4647
|
-
if (!
|
|
4689
|
+
if (!React__namespace.isValidElement(child)) {
|
|
4648
4690
|
return false;
|
|
4649
4691
|
}
|
|
4650
4692
|
const elementType = child.type;
|
|
4651
4693
|
return child.type === TimeLineItem || elementType.displayName === TimeLineItem.displayName;
|
|
4652
4694
|
};
|
|
4653
|
-
var TimeLine =
|
|
4695
|
+
var TimeLine = React__namespace.forwardRef((props, ref) => {
|
|
4654
4696
|
const {
|
|
4655
4697
|
side = "right",
|
|
4656
4698
|
axis = "center",
|
|
@@ -4665,12 +4707,12 @@ var TimeLine = React4__namespace.forwardRef((props, ref) => {
|
|
|
4665
4707
|
...rest
|
|
4666
4708
|
} = props;
|
|
4667
4709
|
const resolvedGap = densityGapClasses[density] ?? densityGapClasses.default;
|
|
4668
|
-
const childArray =
|
|
4710
|
+
const childArray = React__namespace.Children.toArray(children);
|
|
4669
4711
|
const resolvedChildren = childArray.map((child, index) => {
|
|
4670
4712
|
if (!isTimeLineItem(child)) {
|
|
4671
4713
|
return child;
|
|
4672
4714
|
}
|
|
4673
|
-
return
|
|
4715
|
+
return React__namespace.cloneElement(child, {
|
|
4674
4716
|
__timelineSide: side,
|
|
4675
4717
|
__timelineAxis: axis,
|
|
4676
4718
|
__timelineAlign: align,
|
|
@@ -4709,6 +4751,7 @@ exports.ListItem = Item_default;
|
|
|
4709
4751
|
exports.Masonry = Masonry_default;
|
|
4710
4752
|
exports.Menu = Menu_default;
|
|
4711
4753
|
exports.Notification = Notification_default;
|
|
4754
|
+
exports.Overlay = Overlay_default;
|
|
4712
4755
|
exports.ProfileCard = ProfileCard_default;
|
|
4713
4756
|
exports.Progress = Progress_default;
|
|
4714
4757
|
exports.Select = Select_default;
|