@almadar/ui 5.30.0 → 5.31.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/avl/index.cjs +401 -177
- package/dist/avl/index.js +401 -177
- package/dist/components/core/atoms/Card.d.ts +2 -0
- package/dist/components/core/atoms/Input.d.ts +2 -0
- package/dist/components/core/atoms/Select.d.ts +18 -6
- package/dist/components/core/atoms/Spinner.d.ts +2 -0
- package/dist/components/core/atoms/index.d.ts +1 -1
- package/dist/components/core/molecules/JsonTreeEditor.d.ts +3 -8
- package/dist/components/core/molecules/Menu.d.ts +4 -0
- package/dist/components/core/molecules/index.d.ts +1 -1
- package/dist/components/core/organisms/index.d.ts +0 -1
- package/dist/components/core/templates/index.d.ts +0 -3
- package/dist/components/game/molecules/index.d.ts +0 -1
- package/dist/components/game/molecules/three/patterns.d.ts +20 -0
- package/dist/components/index.cjs +428 -385
- package/dist/components/index.js +429 -385
- package/dist/docs/index.cjs +205 -172
- package/dist/docs/index.d.cts +4 -0
- package/dist/docs/index.js +146 -113
- package/dist/marketing/index.cjs +91 -54
- package/dist/marketing/index.d.cts +2 -0
- package/dist/marketing/index.js +58 -21
- package/dist/providers/index.cjs +400 -176
- package/dist/providers/index.js +400 -176
- package/dist/runtime/index.cjs +400 -176
- package/dist/runtime/index.js +400 -176
- package/package.json +16 -2
package/dist/docs/index.d.cts
CHANGED
|
@@ -291,6 +291,8 @@ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
291
291
|
children?: React.ReactNode;
|
|
292
292
|
/** Declarative event key emitted on click for trait dispatch */
|
|
293
293
|
action?: EventKey;
|
|
294
|
+
/** Shows a skeleton/spinner overlay while true. */
|
|
295
|
+
loading?: boolean;
|
|
294
296
|
}
|
|
295
297
|
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
296
298
|
|
|
@@ -341,6 +343,8 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
|
341
343
|
action?: EventKey;
|
|
342
344
|
/** Input type - supports 'select' and 'textarea' in addition to standard types */
|
|
343
345
|
inputType?: "text" | "email" | "password" | "number" | "tel" | "url" | "search" | "date" | "datetime-local" | "time" | "checkbox" | "select" | "textarea";
|
|
346
|
+
label?: string;
|
|
347
|
+
helperText?: string;
|
|
344
348
|
error?: string;
|
|
345
349
|
leftIcon?: IconInput;
|
|
346
350
|
rightIcon?: IconInput;
|
package/dist/docs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React8, { useCallback, useState, useRef, useMemo, useEffect, useLayoutEffect, useContext, useSyncExternalStore, createContext } from 'react';
|
|
2
2
|
import { createLogger } from '@almadar/logger';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import * as LucideIcons2 from 'lucide-react';
|
|
@@ -2771,7 +2771,7 @@ var init_Box = __esm({
|
|
|
2771
2771
|
fixed: "fixed",
|
|
2772
2772
|
sticky: "sticky"
|
|
2773
2773
|
};
|
|
2774
|
-
Box =
|
|
2774
|
+
Box = React8.forwardRef(
|
|
2775
2775
|
({
|
|
2776
2776
|
padding,
|
|
2777
2777
|
paddingX,
|
|
@@ -2821,7 +2821,7 @@ var init_Box = __esm({
|
|
|
2821
2821
|
onMouseLeave?.(e);
|
|
2822
2822
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
2823
2823
|
const isClickable = action || onClick;
|
|
2824
|
-
return
|
|
2824
|
+
return React8.createElement(
|
|
2825
2825
|
Component,
|
|
2826
2826
|
{
|
|
2827
2827
|
ref,
|
|
@@ -3811,7 +3811,7 @@ var init_Icon = __esm({
|
|
|
3811
3811
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
3812
3812
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
3813
3813
|
const family = useIconFamily();
|
|
3814
|
-
const RenderedComponent =
|
|
3814
|
+
const RenderedComponent = React8.useMemo(() => {
|
|
3815
3815
|
if (directIcon) return null;
|
|
3816
3816
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
3817
3817
|
}, [directIcon, effectiveName, family]);
|
|
@@ -3870,7 +3870,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
3870
3870
|
const IconComp = value;
|
|
3871
3871
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
3872
3872
|
}
|
|
3873
|
-
if (
|
|
3873
|
+
if (React8.isValidElement(value)) {
|
|
3874
3874
|
return value;
|
|
3875
3875
|
}
|
|
3876
3876
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -3946,7 +3946,7 @@ var init_Button = __esm({
|
|
|
3946
3946
|
md: "h-icon-default w-icon-default",
|
|
3947
3947
|
lg: "h-icon-default w-icon-default"
|
|
3948
3948
|
};
|
|
3949
|
-
Button =
|
|
3949
|
+
Button = React8.forwardRef(
|
|
3950
3950
|
({
|
|
3951
3951
|
className,
|
|
3952
3952
|
variant = "primary",
|
|
@@ -4007,11 +4007,54 @@ var init_Button = __esm({
|
|
|
4007
4007
|
Button.displayName = "Button";
|
|
4008
4008
|
}
|
|
4009
4009
|
});
|
|
4010
|
+
var sizeStyles2, Spinner;
|
|
4011
|
+
var init_Spinner = __esm({
|
|
4012
|
+
"components/core/atoms/Spinner.tsx"() {
|
|
4013
|
+
init_cn();
|
|
4014
|
+
init_Icon();
|
|
4015
|
+
sizeStyles2 = {
|
|
4016
|
+
xs: "h-3 w-3",
|
|
4017
|
+
sm: "h-icon-default w-icon-default",
|
|
4018
|
+
md: "h-6 w-6",
|
|
4019
|
+
lg: "h-8 w-8"
|
|
4020
|
+
};
|
|
4021
|
+
Spinner = React8.forwardRef(
|
|
4022
|
+
({ className, size = "md", overlay, ...props }, ref) => {
|
|
4023
|
+
if (overlay) {
|
|
4024
|
+
return /* @__PURE__ */ jsx(
|
|
4025
|
+
"div",
|
|
4026
|
+
{
|
|
4027
|
+
ref,
|
|
4028
|
+
className: cn(
|
|
4029
|
+
"absolute inset-0 z-10 flex items-center justify-center",
|
|
4030
|
+
"bg-background/60 backdrop-blur-sm",
|
|
4031
|
+
className
|
|
4032
|
+
),
|
|
4033
|
+
...props,
|
|
4034
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin text-foreground", sizeStyles2[size]) })
|
|
4035
|
+
}
|
|
4036
|
+
);
|
|
4037
|
+
}
|
|
4038
|
+
return /* @__PURE__ */ jsx(
|
|
4039
|
+
"div",
|
|
4040
|
+
{
|
|
4041
|
+
ref,
|
|
4042
|
+
className: cn("text-foreground", className),
|
|
4043
|
+
...props,
|
|
4044
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin", sizeStyles2[size]) })
|
|
4045
|
+
}
|
|
4046
|
+
);
|
|
4047
|
+
}
|
|
4048
|
+
);
|
|
4049
|
+
Spinner.displayName = "Spinner";
|
|
4050
|
+
}
|
|
4051
|
+
});
|
|
4010
4052
|
var variantStyles3, paddingStyles2, shadowStyles2, lookStyles, Card, CardHeader, CardTitle, CardContent, CardBody, CardFooter;
|
|
4011
4053
|
var init_Card = __esm({
|
|
4012
4054
|
"components/core/atoms/Card.tsx"() {
|
|
4013
4055
|
init_cn();
|
|
4014
4056
|
init_useEventBus();
|
|
4057
|
+
init_Spinner();
|
|
4015
4058
|
variantStyles3 = {
|
|
4016
4059
|
default: [
|
|
4017
4060
|
"bg-card",
|
|
@@ -4065,7 +4108,7 @@ var init_Card = __esm({
|
|
|
4065
4108
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
4066
4109
|
"tile-image-first": "p-0 overflow-hidden"
|
|
4067
4110
|
};
|
|
4068
|
-
Card =
|
|
4111
|
+
Card = React8.forwardRef(
|
|
4069
4112
|
({
|
|
4070
4113
|
className,
|
|
4071
4114
|
variant = "bordered",
|
|
@@ -4076,6 +4119,7 @@ var init_Card = __esm({
|
|
|
4076
4119
|
look = "elevated",
|
|
4077
4120
|
children,
|
|
4078
4121
|
action,
|
|
4122
|
+
loading,
|
|
4079
4123
|
onClick,
|
|
4080
4124
|
...props
|
|
4081
4125
|
}, ref) => {
|
|
@@ -4089,7 +4133,7 @@ var init_Card = __esm({
|
|
|
4089
4133
|
{
|
|
4090
4134
|
ref,
|
|
4091
4135
|
className: cn(
|
|
4092
|
-
"rounded-container",
|
|
4136
|
+
"rounded-container relative",
|
|
4093
4137
|
"transition-all duration-[var(--transition-normal)]",
|
|
4094
4138
|
variantStyles3[variant],
|
|
4095
4139
|
paddingStyles2[padding],
|
|
@@ -4100,6 +4144,7 @@ var init_Card = __esm({
|
|
|
4100
4144
|
onClick: handleClick,
|
|
4101
4145
|
...props,
|
|
4102
4146
|
children: [
|
|
4147
|
+
loading && /* @__PURE__ */ jsx(Spinner, { overlay: true, size: "md" }),
|
|
4103
4148
|
(title || subtitle) && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
4104
4149
|
title && /* @__PURE__ */ jsx("h3", { className: "text-lg text-card-foreground font-bold", children: title }),
|
|
4105
4150
|
subtitle && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: subtitle })
|
|
@@ -4111,9 +4156,9 @@ var init_Card = __esm({
|
|
|
4111
4156
|
}
|
|
4112
4157
|
);
|
|
4113
4158
|
Card.displayName = "Card";
|
|
4114
|
-
CardHeader =
|
|
4159
|
+
CardHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
4115
4160
|
CardHeader.displayName = "CardHeader";
|
|
4116
|
-
CardTitle =
|
|
4161
|
+
CardTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4117
4162
|
"h3",
|
|
4118
4163
|
{
|
|
4119
4164
|
ref,
|
|
@@ -4126,11 +4171,11 @@ var init_Card = __esm({
|
|
|
4126
4171
|
}
|
|
4127
4172
|
));
|
|
4128
4173
|
CardTitle.displayName = "CardTitle";
|
|
4129
|
-
CardContent =
|
|
4174
|
+
CardContent = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
4130
4175
|
CardContent.displayName = "CardContent";
|
|
4131
4176
|
CardBody = CardContent;
|
|
4132
4177
|
CardBody.displayName = "CardBody";
|
|
4133
|
-
CardFooter =
|
|
4178
|
+
CardFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4134
4179
|
"div",
|
|
4135
4180
|
{
|
|
4136
4181
|
ref,
|
|
@@ -4729,11 +4774,13 @@ var init_Input = __esm({
|
|
|
4729
4774
|
init_Icon();
|
|
4730
4775
|
init_useTranslate();
|
|
4731
4776
|
init_useEventBus();
|
|
4732
|
-
Input =
|
|
4777
|
+
Input = React8.forwardRef(
|
|
4733
4778
|
({
|
|
4734
4779
|
className,
|
|
4735
4780
|
inputType,
|
|
4736
4781
|
type: htmlType,
|
|
4782
|
+
label,
|
|
4783
|
+
helperText,
|
|
4737
4784
|
error,
|
|
4738
4785
|
leftIcon,
|
|
4739
4786
|
rightIcon,
|
|
@@ -4789,82 +4836,95 @@ var init_Input = __esm({
|
|
|
4789
4836
|
onClear?.();
|
|
4790
4837
|
}
|
|
4791
4838
|
};
|
|
4839
|
+
const wrapField = (field) => /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
4840
|
+
label && /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-foreground mb-1", children: label }),
|
|
4841
|
+
field,
|
|
4842
|
+
(helperText || error) && /* @__PURE__ */ jsx("p", { className: cn("mt-1 text-xs", error ? "text-error" : "text-muted-foreground"), children: error ?? helperText })
|
|
4843
|
+
] });
|
|
4792
4844
|
if (type === "select") {
|
|
4793
|
-
return
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4845
|
+
return wrapField(
|
|
4846
|
+
/* @__PURE__ */ jsxs("div", { className: "relative w-full", children: [
|
|
4847
|
+
resolvedLeftIcon && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-muted-foreground", children: resolvedLeftIcon }),
|
|
4848
|
+
/* @__PURE__ */ jsxs(
|
|
4849
|
+
"select",
|
|
4850
|
+
{
|
|
4851
|
+
ref,
|
|
4852
|
+
value,
|
|
4853
|
+
onChange: handleChange,
|
|
4854
|
+
className: cn(baseClassName, "appearance-none pr-10", className),
|
|
4855
|
+
...props,
|
|
4856
|
+
children: [
|
|
4857
|
+
/* @__PURE__ */ jsx("option", { value: "", children: t("form.selectPlaceholder", { label: "" }) }),
|
|
4858
|
+
options?.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value))
|
|
4859
|
+
]
|
|
4860
|
+
}
|
|
4861
|
+
),
|
|
4862
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-muted-foreground", children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: "h-icon-default w-icon-default" }) })
|
|
4863
|
+
] })
|
|
4864
|
+
);
|
|
4865
|
+
}
|
|
4866
|
+
if (type === "textarea") {
|
|
4867
|
+
return wrapField(
|
|
4868
|
+
/* @__PURE__ */ jsx("div", { className: "relative w-full", children: /* @__PURE__ */ jsx(
|
|
4869
|
+
"textarea",
|
|
4797
4870
|
{
|
|
4798
4871
|
ref,
|
|
4799
4872
|
value,
|
|
4800
4873
|
onChange: handleChange,
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
/* @__PURE__ */ jsx("option", { value: "", children: t("form.selectPlaceholder", { label: "" }) }),
|
|
4805
|
-
options?.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value))
|
|
4806
|
-
]
|
|
4874
|
+
rows,
|
|
4875
|
+
className: baseClassName,
|
|
4876
|
+
...props
|
|
4807
4877
|
}
|
|
4808
|
-
)
|
|
4809
|
-
|
|
4810
|
-
] });
|
|
4811
|
-
}
|
|
4812
|
-
if (type === "textarea") {
|
|
4813
|
-
return /* @__PURE__ */ jsx("div", { className: "relative w-full", children: /* @__PURE__ */ jsx(
|
|
4814
|
-
"textarea",
|
|
4815
|
-
{
|
|
4816
|
-
ref,
|
|
4817
|
-
value,
|
|
4818
|
-
onChange: handleChange,
|
|
4819
|
-
rows,
|
|
4820
|
-
className: baseClassName,
|
|
4821
|
-
...props
|
|
4822
|
-
}
|
|
4823
|
-
) });
|
|
4878
|
+
) })
|
|
4879
|
+
);
|
|
4824
4880
|
}
|
|
4825
4881
|
if (type === "checkbox") {
|
|
4826
|
-
return
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4882
|
+
return wrapField(
|
|
4883
|
+
/* @__PURE__ */ jsx(
|
|
4884
|
+
"input",
|
|
4885
|
+
{
|
|
4886
|
+
ref,
|
|
4887
|
+
type: "checkbox",
|
|
4888
|
+
checked: props.checked,
|
|
4889
|
+
onChange: handleChange,
|
|
4890
|
+
className: cn(
|
|
4891
|
+
"h-icon-default w-icon-default rounded-sm",
|
|
4892
|
+
"border-border",
|
|
4893
|
+
"text-primary focus:ring-ring",
|
|
4894
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4895
|
+
className
|
|
4896
|
+
),
|
|
4897
|
+
...props
|
|
4898
|
+
}
|
|
4899
|
+
)
|
|
4842
4900
|
);
|
|
4843
4901
|
}
|
|
4844
|
-
return
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4902
|
+
return wrapField(
|
|
4903
|
+
/* @__PURE__ */ jsxs("div", { className: "relative w-full", children: [
|
|
4904
|
+
resolvedLeftIcon && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-muted-foreground", children: resolvedLeftIcon }),
|
|
4905
|
+
/* @__PURE__ */ jsx(
|
|
4906
|
+
"input",
|
|
4907
|
+
{
|
|
4908
|
+
ref,
|
|
4909
|
+
type,
|
|
4910
|
+
value,
|
|
4911
|
+
onChange: handleChange,
|
|
4912
|
+
className: baseClassName,
|
|
4913
|
+
...props
|
|
4914
|
+
}
|
|
4915
|
+
),
|
|
4916
|
+
showClearButton && /* @__PURE__ */ jsx(
|
|
4917
|
+
"button",
|
|
4918
|
+
{
|
|
4919
|
+
type: "button",
|
|
4920
|
+
onClick: handleClear,
|
|
4921
|
+
className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-foreground",
|
|
4922
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-icon-default w-icon-default" })
|
|
4923
|
+
}
|
|
4924
|
+
),
|
|
4925
|
+
rightIcon && !showClearButton && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground", children: resolveIconNode(rightIcon, iconCls) })
|
|
4926
|
+
] })
|
|
4927
|
+
);
|
|
4868
4928
|
}
|
|
4869
4929
|
);
|
|
4870
4930
|
Input.displayName = "Input";
|
|
@@ -5063,7 +5123,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
5063
5123
|
"aria-label": t("aria.breadcrumb"),
|
|
5064
5124
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
5065
5125
|
const isLast = idx === items.length - 1;
|
|
5066
|
-
return /* @__PURE__ */ jsxs(
|
|
5126
|
+
return /* @__PURE__ */ jsxs(React8.Fragment, { children: [
|
|
5067
5127
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
5068
5128
|
Icon,
|
|
5069
5129
|
{
|
|
@@ -5121,7 +5181,7 @@ var init_Textarea = __esm({
|
|
|
5121
5181
|
"components/core/atoms/Textarea.tsx"() {
|
|
5122
5182
|
init_cn();
|
|
5123
5183
|
init_useEventBus();
|
|
5124
|
-
Textarea =
|
|
5184
|
+
Textarea = React8.forwardRef(
|
|
5125
5185
|
({ className, error, onChange, ...props }, ref) => {
|
|
5126
5186
|
const eventBus = useEventBus();
|
|
5127
5187
|
const handleChange = (e) => {
|
|
@@ -5155,7 +5215,7 @@ var init_Textarea = __esm({
|
|
|
5155
5215
|
Textarea.displayName = "Textarea";
|
|
5156
5216
|
}
|
|
5157
5217
|
});
|
|
5158
|
-
var variantStyles5,
|
|
5218
|
+
var variantStyles5, sizeStyles3, Badge;
|
|
5159
5219
|
var init_Badge = __esm({
|
|
5160
5220
|
"components/core/atoms/Badge.tsx"() {
|
|
5161
5221
|
init_cn();
|
|
@@ -5192,12 +5252,12 @@ var init_Badge = __esm({
|
|
|
5192
5252
|
"border-[length:var(--border-width-thin)] border-border"
|
|
5193
5253
|
].join(" ")
|
|
5194
5254
|
};
|
|
5195
|
-
|
|
5255
|
+
sizeStyles3 = {
|
|
5196
5256
|
sm: "px-2 py-0.5 text-xs",
|
|
5197
5257
|
md: "px-2.5 py-1 text-sm",
|
|
5198
5258
|
lg: "px-3 py-1.5 text-base"
|
|
5199
5259
|
};
|
|
5200
|
-
Badge =
|
|
5260
|
+
Badge = React8.forwardRef(
|
|
5201
5261
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
5202
5262
|
const iconSizes = {
|
|
5203
5263
|
sm: "h-icon-default w-icon-default",
|
|
@@ -5212,7 +5272,7 @@ var init_Badge = __esm({
|
|
|
5212
5272
|
className: cn(
|
|
5213
5273
|
"inline-flex items-center gap-1 font-bold rounded-sm",
|
|
5214
5274
|
variantStyles5[variant],
|
|
5215
|
-
|
|
5275
|
+
sizeStyles3[size],
|
|
5216
5276
|
onRemove && "pr-1",
|
|
5217
5277
|
className
|
|
5218
5278
|
),
|
|
@@ -5246,33 +5306,6 @@ var init_Badge = __esm({
|
|
|
5246
5306
|
Badge.displayName = "Badge";
|
|
5247
5307
|
}
|
|
5248
5308
|
});
|
|
5249
|
-
var sizeStyles3, Spinner;
|
|
5250
|
-
var init_Spinner = __esm({
|
|
5251
|
-
"components/core/atoms/Spinner.tsx"() {
|
|
5252
|
-
init_cn();
|
|
5253
|
-
init_Icon();
|
|
5254
|
-
sizeStyles3 = {
|
|
5255
|
-
xs: "h-3 w-3",
|
|
5256
|
-
sm: "h-icon-default w-icon-default",
|
|
5257
|
-
md: "h-6 w-6",
|
|
5258
|
-
lg: "h-8 w-8"
|
|
5259
|
-
};
|
|
5260
|
-
Spinner = React7.forwardRef(
|
|
5261
|
-
({ className, size = "md", ...props }, ref) => {
|
|
5262
|
-
return /* @__PURE__ */ jsx(
|
|
5263
|
-
"div",
|
|
5264
|
-
{
|
|
5265
|
-
ref,
|
|
5266
|
-
className: cn("text-foreground", className),
|
|
5267
|
-
...props,
|
|
5268
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin", sizeStyles3[size]) })
|
|
5269
|
-
}
|
|
5270
|
-
);
|
|
5271
|
-
}
|
|
5272
|
-
);
|
|
5273
|
-
Spinner.displayName = "Spinner";
|
|
5274
|
-
}
|
|
5275
|
-
});
|
|
5276
5309
|
|
|
5277
5310
|
// components/game/atoms/index.ts
|
|
5278
5311
|
var init_atoms = __esm({
|
|
@@ -5817,7 +5850,7 @@ var init_CodeBlock = __esm({
|
|
|
5817
5850
|
};
|
|
5818
5851
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
5819
5852
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
5820
|
-
CodeBlock =
|
|
5853
|
+
CodeBlock = React8.memo(
|
|
5821
5854
|
({
|
|
5822
5855
|
code: rawCode,
|
|
5823
5856
|
language = "text",
|