@rebasepro/ui 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +13 -13
- package/dist/index.es.js +68 -65
- package/dist/index.es.js.map +1 -1
- package/dist/src/index.css +13 -13
- package/dist/styles.d.ts +9 -9
- package/package.json +1 -1
- package/src/components/Alert.tsx +1 -1
- package/src/components/BooleanSwitchWithLabel.tsx +1 -1
- package/src/components/Button.tsx +5 -5
- package/src/components/Chip.tsx +39 -37
- package/src/components/DateTimeField.tsx +2 -2
- package/src/components/Dialog.tsx +1 -1
- package/src/components/ExpandablePanel.tsx +1 -1
- package/src/components/FileUpload.tsx +1 -1
- package/src/components/FilterChip.tsx +2 -2
- package/src/components/IconButton.tsx +1 -1
- package/src/components/MultiSelect.tsx +1 -1
- package/src/components/Select.tsx +2 -2
- package/src/components/Table.tsx +2 -2
- package/src/components/TextField.tsx +3 -3
- package/src/components/VirtualTable/VirtualTableRow.tsx +1 -1
- package/src/index.css +13 -13
- package/src/styles.ts +9 -9
- package/dist/index.umd.js +0 -6958
- package/dist/index.umd.js.map +0 -1
package/dist/index.css
CHANGED
|
@@ -65,51 +65,51 @@
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.typography-h1 {
|
|
68
|
-
@apply text-
|
|
68
|
+
@apply text-4xl font-headers font-semibold tracking-tight;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.typography-h2 {
|
|
72
|
-
@apply text-
|
|
72
|
+
@apply text-3xl font-headers font-semibold tracking-tight;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.typography-h3 {
|
|
76
|
-
@apply text-
|
|
76
|
+
@apply text-2xl font-headers font-semibold tracking-tight;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.typography-h4 {
|
|
80
|
-
@apply text-
|
|
80
|
+
@apply text-xl font-headers font-semibold tracking-[-0.01em];
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.typography-h5 {
|
|
84
|
-
@apply text-
|
|
84
|
+
@apply text-lg font-headers font-semibold tracking-[-0.01em];
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.typography-h6 {
|
|
88
|
-
@apply text-
|
|
88
|
+
@apply text-base font-headers font-semibold tracking-[-0.01em];
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.typography-subtitle1 {
|
|
92
|
-
@apply text-
|
|
92
|
+
@apply text-sm font-headers font-semibold tracking-[-0.01em];
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.typography-subtitle2 {
|
|
96
|
-
@apply text-
|
|
96
|
+
@apply text-sm font-headers font-medium;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.typography-body1 {
|
|
100
|
-
@apply text-
|
|
100
|
+
@apply text-sm;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
.typography-body2 {
|
|
104
|
-
@apply text-
|
|
104
|
+
@apply text-xs;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
.typography-caption {
|
|
108
|
-
@apply text-
|
|
108
|
+
@apply text-[11px] leading-[1.4];
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
.typography-label {
|
|
112
|
-
@apply text-
|
|
112
|
+
@apply text-xs font-medium tracking-wide;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
.typography-inherit {
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
.typography-button {
|
|
120
|
-
@apply text-sm font-semibold;
|
|
120
|
+
@apply text-sm font-semibold tracking-wide;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
:focus-visible {
|
package/dist/index.es.js
CHANGED
|
@@ -187,15 +187,15 @@ function SelectInputLabel({ children, error }) {
|
|
|
187
187
|
//#region src/styles.ts
|
|
188
188
|
var focusedDisabled = "focus-visible:ring-0 focus-visible:ring-offset-0";
|
|
189
189
|
var focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-surface-accent-100 focus:dark:bg-surface-900 focus:dark:bg-opacity-60 focus:bg-surface-accent-100/70 dark:focus:bg-surface-900/60";
|
|
190
|
-
var focusedClasses = "z-30 outline-hidden outline-none ring-2 ring-primary ring-opacity-
|
|
191
|
-
var fieldBackgroundMixin = "bg-
|
|
192
|
-
var fieldBackgroundInvisibleMixin = "bg-
|
|
193
|
-
var fieldBackgroundDisabledMixin = "
|
|
194
|
-
var fieldBackgroundHoverMixin = "hover:bg-
|
|
195
|
-
var defaultBorderMixin = "border-surface-200
|
|
196
|
-
var paperMixin = "bg-white rounded-
|
|
197
|
-
var cardMixin = "bg-white dark:bg-surface-900 rounded-
|
|
198
|
-
var cardClickableMixin = "hover:bg-
|
|
190
|
+
var focusedClasses = "z-30 outline-hidden outline-none ring-2 ring-primary ring-opacity-50 ring-primary/50 ring-offset-0 ring-offset-transparent ";
|
|
191
|
+
var fieldBackgroundMixin = "bg-surface-accent-200/50 dark:bg-black/30";
|
|
192
|
+
var fieldBackgroundInvisibleMixin = "bg-surface-accent-200/0 dark:bg-black/0";
|
|
193
|
+
var fieldBackgroundDisabledMixin = "bg-surface-accent-200/50 dark:bg-black/20";
|
|
194
|
+
var fieldBackgroundHoverMixin = "hover:bg-surface-accent-200/70 hover:dark:bg-black/50";
|
|
195
|
+
var defaultBorderMixin = "border-surface-200 dark:border-surface-700 ";
|
|
196
|
+
var paperMixin = "bg-white rounded-lg dark:bg-surface-900 border border-surface-200 dark:border-surface-700";
|
|
197
|
+
var cardMixin = "bg-white dark:bg-surface-900 rounded-lg border border-surface-200 dark:border-surface-700";
|
|
198
|
+
var cardClickableMixin = "hover:bg-primary/5 dark:hover:bg-primary/5 cursor-pointer transition-colors duration-150";
|
|
199
199
|
var cardSelectedMixin = "bg-primary-bg/30 dark:bg-primary-bg/10 ring-1 ring-primary/75";
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region src/hooks/PortalContainerContext.tsx
|
|
@@ -452,7 +452,7 @@ var Alert = ({ children, onDismiss, color = "info", size = "medium", action, out
|
|
|
452
452
|
const classes = getColorClasses(color);
|
|
453
453
|
return /* @__PURE__ */ jsxs("div", {
|
|
454
454
|
style,
|
|
455
|
-
className: cls(getSizeClasses(size), "w-full", "font-medium", "rounded-
|
|
455
|
+
className: cls(getSizeClasses(size), "w-full", "font-medium", "rounded-lg flex items-center gap-2", classes, outerClassName),
|
|
456
456
|
children: [
|
|
457
457
|
/* @__PURE__ */ jsx("div", {
|
|
458
458
|
className: cls("grow", className),
|
|
@@ -553,7 +553,7 @@ var BooleanSwitchWithLabel = function BooleanSwitchWithLabel({ value, position =
|
|
|
553
553
|
"aria-disabled": disabled || void 0,
|
|
554
554
|
"aria-labelledby": label ? switchLabelId : void 0,
|
|
555
555
|
tabIndex: -1,
|
|
556
|
-
className: cls(!invisible && "bg-
|
|
556
|
+
className: cls(!invisible && "bg-surface-accent-200/50 dark:bg-black/30", !invisible && (disabled ? "bg-surface-accent-200/50 dark:bg-black/20" : "hover:bg-surface-accent-200/70 hover:dark:bg-black/50"), disabled ? "cursor-default" : "cursor-pointer", "rounded-lg max-w-full justify-between box-border relative inline-flex items-center", !invisible && focus && !disabled ? focusedClasses : "", error ? "text-red-500 dark:text-red-600" : focus && !disabled ? "text-primary" : !disabled ? "text-text-primary dark:text-text-primary-dark" : "text-text-secondary dark:text-text-secondary-dark", {
|
|
557
557
|
"min-h-[28px]": size === "smallest",
|
|
558
558
|
"min-h-[32px]": size === "small",
|
|
559
559
|
"min-h-[44px]": size === "medium",
|
|
@@ -584,14 +584,14 @@ var BooleanSwitchWithLabel = function BooleanSwitchWithLabel({ value, position =
|
|
|
584
584
|
//#endregion
|
|
585
585
|
//#region src/components/Button.tsx
|
|
586
586
|
var ButtonInner = React.memo(React.forwardRef(({ children, className, variant = "filled", disabled = false, size = "medium", startIcon = null, fullWidth = false, component: Component, color = "neutral", ...props }, ref) => {
|
|
587
|
-
const baseClasses = "typography-button h-fit rounded-
|
|
587
|
+
const baseClasses = "typography-button h-fit rounded-lg whitespace-nowrap inline-flex items-center justify-center p-2 px-4 focus:outline-none transition-colors ease-in-out duration-150 gap-2";
|
|
588
588
|
const buttonClasses = cls({
|
|
589
589
|
"w-full": fullWidth,
|
|
590
590
|
"w-fit": !fullWidth,
|
|
591
|
-
"border border-primary bg-primary focus:ring-primary
|
|
592
|
-
"border border-secondary bg-secondary focus:ring-secondary
|
|
593
|
-
"border border-red-500 bg-red-500 hover:bg-red-600 focus:ring-red-500
|
|
594
|
-
"border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400
|
|
591
|
+
"border border-primary bg-primary focus:ring-primary text-white hover:text-white hover:brightness-105": variant === "filled" && color === "primary" && !disabled,
|
|
592
|
+
"border border-secondary bg-secondary focus:ring-secondary text-white hover:text-white hover:brightness-105": variant === "filled" && color === "secondary" && !disabled,
|
|
593
|
+
"border border-red-500 bg-red-500 hover:bg-red-600 focus:ring-red-500 text-white hover:text-white": variant === "filled" && color === "error" && !disabled,
|
|
594
|
+
"border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400 text-text-primary hover:text-text-primary dark:border-surface-accent-700 dark:bg-surface-accent-700 dark:hover:bg-surface-accent-600 dark:text-text-primary-dark hover:dark:text-text-primary-dark": variant === "filled" && color === "text" && !disabled,
|
|
595
595
|
"border border-transparent bg-surface-100 hover:bg-surface-accent-200 text-text-primary dark:bg-surface-700 dark:hover:bg-surface-accent-700 dark:text-text-primary-dark hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": variant === "filled" && color === "neutral" && !disabled,
|
|
596
596
|
"border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": variant === "text" && color === "primary" && !disabled,
|
|
597
597
|
"border border-transparent text-secondary hover:text-secondary hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800": variant === "text" && color === "secondary" && !disabled,
|
|
@@ -648,7 +648,7 @@ var Card = React.forwardRef(({ children, className, onClick, style, ...props },
|
|
|
648
648
|
role: onClick ? "button" : void 0,
|
|
649
649
|
tabIndex: onClick ? 0 : void 0,
|
|
650
650
|
onClick,
|
|
651
|
-
className: cls(cardMixin, onClick && "hover:bg-
|
|
651
|
+
className: cls(cardMixin, onClick && "hover:bg-primary/5 dark:hover:bg-primary/5 cursor-pointer transition-colors duration-150", className),
|
|
652
652
|
style,
|
|
653
653
|
...props,
|
|
654
654
|
children
|
|
@@ -1007,10 +1007,10 @@ Checkbox.displayName = "Checkbox";
|
|
|
1007
1007
|
//#endregion
|
|
1008
1008
|
//#region src/components/Chip.tsx
|
|
1009
1009
|
var sizeClassNames = {
|
|
1010
|
-
smallest: "px-1.5 text-
|
|
1011
|
-
small: "px-2 py-0.5 text-
|
|
1012
|
-
medium: "px-
|
|
1013
|
-
large: "px-
|
|
1010
|
+
smallest: "px-1.5 py-px text-[10px]",
|
|
1011
|
+
small: "px-2 py-0.5 text-xs",
|
|
1012
|
+
medium: "px-2.5 py-0.5 text-xs",
|
|
1013
|
+
large: "px-3 py-1 text-xs"
|
|
1014
1014
|
};
|
|
1015
1015
|
/**
|
|
1016
1016
|
* Detect if the app is currently in dark mode by checking the
|
|
@@ -1020,45 +1020,48 @@ function isDarkMode() {
|
|
|
1020
1020
|
return typeof document !== "undefined" && document.documentElement.classList.contains("dark");
|
|
1021
1021
|
}
|
|
1022
1022
|
/**
|
|
1023
|
+
* Helper to generate rgba from hex or standard colors.
|
|
1024
|
+
*/
|
|
1025
|
+
function getRgba(hex, alpha) {
|
|
1026
|
+
if (!hex || !hex.startsWith("#")) return hex;
|
|
1027
|
+
let color = hex.slice(1);
|
|
1028
|
+
if (color.length === 3) color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2];
|
|
1029
|
+
return `rgba(${parseInt(color.slice(0, 2), 16)}, ${parseInt(color.slice(2, 4), 16)}, ${parseInt(color.slice(4, 6), 16)}, ${alpha})`;
|
|
1030
|
+
}
|
|
1031
|
+
/**
|
|
1023
1032
|
* @group Preview components
|
|
1024
1033
|
*/
|
|
1025
|
-
function Chip({ children, colorScheme, error, outlined, onClick, icon, size = "
|
|
1034
|
+
function Chip({ children, colorScheme, error, outlined, onClick, icon, size = "medium", className, style }) {
|
|
1026
1035
|
const usedColorScheme = typeof colorScheme === "string" ? getColorSchemeForKey(colorScheme) : colorScheme;
|
|
1027
1036
|
const dark = isDarkMode();
|
|
1028
|
-
const
|
|
1029
|
-
if (!hex || !hex.startsWith("#")) return hex;
|
|
1030
|
-
let color = hex.slice(1);
|
|
1031
|
-
if (color.length === 3) color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2];
|
|
1032
|
-
return `rgba(${parseInt(color.slice(0, 2), 16)}, ${parseInt(color.slice(2, 4), 16)}, ${parseInt(color.slice(4, 6), 16)}, ${alpha})`;
|
|
1033
|
-
};
|
|
1037
|
+
const hasScheme = error || usedColorScheme;
|
|
1034
1038
|
let textColor = "";
|
|
1035
1039
|
let bgColor = "";
|
|
1036
1040
|
let border = "";
|
|
1037
1041
|
if (error) textColor = dark ? "#f87171" : "#dc2626";
|
|
1038
1042
|
else if (usedColorScheme) textColor = dark && usedColorScheme.darkText ? usedColorScheme.darkText : usedColorScheme.text;
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
else {
|
|
1048
|
-
bgColor = dark ? "#1f1f1f" : "#f4f4f5";
|
|
1049
|
-
border = `1px solid ${dark ? "#2e2e30" : "#e4e4e7"}`;
|
|
1043
|
+
if (hasScheme) {
|
|
1044
|
+
if (outlined) {
|
|
1045
|
+
bgColor = getRgba(textColor, dark ? .1 : .06);
|
|
1046
|
+
border = `1px solid ${getRgba(textColor, dark ? .2 : .14)}`;
|
|
1047
|
+
} else if (error) {
|
|
1048
|
+
bgColor = dark ? "rgba(220, 38, 38, 0.15)" : "rgba(239, 68, 68, 0.1)";
|
|
1049
|
+
border = `1px solid ${dark ? "rgba(220, 38, 38, 0.3)" : "rgba(239, 68, 68, 0.2)"}`;
|
|
1050
|
+
} else if (usedColorScheme) bgColor = dark && usedColorScheme.darkColor ? usedColorScheme.darkColor : usedColorScheme.color;
|
|
1050
1051
|
}
|
|
1051
1052
|
return /* @__PURE__ */ jsxs("div", {
|
|
1052
|
-
className: cls("rounded-lg max-w-full w-max h-fit font-
|
|
1053
|
+
className: cls("rounded-lg max-w-full w-max h-fit font-medium inline-flex gap-1", "text-ellipsis", "items-center", "transition-colors duration-150", !hasScheme && "bg-surface-100 dark:bg-surface-800 text-text-secondary dark:text-text-secondary-dark border border-surface-200 dark:border-surface-700", !hasScheme && outlined && "bg-transparent dark:bg-transparent", onClick ? "cursor-pointer hover:bg-primary/5 dark:hover:bg-primary/5" : "", sizeClassNames[size], className),
|
|
1053
1054
|
onClick,
|
|
1054
1055
|
style: {
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1056
|
+
...hasScheme ? {
|
|
1057
|
+
backgroundColor: bgColor,
|
|
1058
|
+
color: textColor,
|
|
1059
|
+
border: border || void 0
|
|
1060
|
+
} : {},
|
|
1058
1061
|
overflow: "hidden",
|
|
1059
1062
|
...style
|
|
1060
1063
|
},
|
|
1061
|
-
children: [
|
|
1064
|
+
children: [icon, children]
|
|
1062
1065
|
});
|
|
1063
1066
|
}
|
|
1064
1067
|
//#endregion
|
|
@@ -1247,7 +1250,7 @@ var colorClasses$1 = "text-surface-accent-500 visited:text-surface-accent-500 da
|
|
|
1247
1250
|
var sizeClasses$1 = {
|
|
1248
1251
|
medium: "w-10 !h-10 min-w-10 min-h-10",
|
|
1249
1252
|
small: "w-8 !h-8 min-w-8 min-h-8",
|
|
1250
|
-
smallest: "w-
|
|
1253
|
+
smallest: "w-7 !h-7 min-w-7 min-h-7",
|
|
1251
1254
|
large: "w-12 !h-12 min-w-12 min-h-12"
|
|
1252
1255
|
};
|
|
1253
1256
|
var shapeClasses = {
|
|
@@ -1389,7 +1392,7 @@ var DateTimeField = ({ value, label, onChange, disabled, clearable, mode = "date
|
|
|
1389
1392
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1390
1393
|
/* @__PURE__ */ jsx("style", { children: inputStyles }),
|
|
1391
1394
|
/* @__PURE__ */ jsxs("div", {
|
|
1392
|
-
className: cls("rounded-
|
|
1395
|
+
className: cls("rounded-lg relative max-w-full", !invisible && "bg-surface-accent-200/50 dark:bg-black/30", disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, {
|
|
1393
1396
|
"min-h-[28px]": size === "smallest",
|
|
1394
1397
|
"min-h-[32px]": size === "small",
|
|
1395
1398
|
"min-h-[44px]": size === "medium",
|
|
@@ -1413,7 +1416,7 @@ var DateTimeField = ({ value, label, onChange, disabled, clearable, mode = "date
|
|
|
1413
1416
|
onFocus: handleFocus,
|
|
1414
1417
|
onBlur: handleBlur,
|
|
1415
1418
|
disabled,
|
|
1416
|
-
className: cls("w-full outline-hidden bg-transparent leading-normal text-base px-3", clearable ? "pr-14" : "pr-12", "rounded-
|
|
1419
|
+
className: cls("w-full outline-hidden bg-transparent leading-normal text-base px-3", clearable ? "pr-14" : "pr-12", "rounded-lg", {
|
|
1417
1420
|
"min-h-[28px]": size === "smallest",
|
|
1418
1421
|
"min-h-[32px]": size === "small",
|
|
1419
1422
|
"min-h-[44px]": size === "medium",
|
|
@@ -1519,7 +1522,7 @@ var Dialog = ({ open, onOpenChange, children, className, containerClassName, ful
|
|
|
1519
1522
|
"aria-describedby": ariaDescribedby,
|
|
1520
1523
|
className: cls("relative h-full outline-none flex justify-center items-center z-60 opacity-100 transition-all duration-200 ease-in-out"),
|
|
1521
1524
|
children: /* @__PURE__ */ jsx("div", {
|
|
1522
|
-
className: cls(paperMixin, "rounded-2xl", "z-60", "relative", "overflow-hidden", "outline-none focus:outline-none", fullWidth && !fullScreen ? "w-11/12" : void 0, fullHeight && !fullScreen ? "h-full" : void 0, "text-surface-accent-900 dark:text-white", "justify-center items-center", fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-
|
|
1525
|
+
className: cls(paperMixin, "rounded-2xl", "z-60", "relative", "overflow-hidden", "outline-none focus:outline-none", fullWidth && !fullScreen ? "w-11/12" : void 0, fullHeight && !fullScreen ? "h-full" : void 0, "text-surface-accent-900 dark:text-white", "justify-center items-center", fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-lg", "ease-in-out duration-200", scrollable && "overflow-y-auto", displayed && open ? "opacity-100 scale-100" : "opacity-0 scale-[0.97]", maxWidth && !fullScreen ? widthClasses[maxWidth] : void 0, className),
|
|
1523
1526
|
children
|
|
1524
1527
|
})
|
|
1525
1528
|
})]
|
|
@@ -1606,7 +1609,7 @@ function ExpandablePanel({ title, children, invisible = false, expanded, onExpan
|
|
|
1606
1609
|
if (expanded !== void 0) setOpen(expanded);
|
|
1607
1610
|
}, [expanded]);
|
|
1608
1611
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Collapsible.Root, {
|
|
1609
|
-
className: cls(!invisible && "border-surface-200
|
|
1612
|
+
className: cls(!invisible && "border-surface-200 dark:border-surface-700 border", "rounded-lg", "w-full", className),
|
|
1610
1613
|
open,
|
|
1611
1614
|
onOpenChange: (updatedOpen) => {
|
|
1612
1615
|
onExpandedChange?.(updatedOpen);
|
|
@@ -1615,7 +1618,7 @@ function ExpandablePanel({ title, children, invisible = false, expanded, onExpan
|
|
|
1615
1618
|
children: [/* @__PURE__ */ jsx(Collapsible.Trigger, {
|
|
1616
1619
|
asChild: true,
|
|
1617
1620
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1618
|
-
className: cls("rounded-t flex items-center justify-between w-full min-h-[52px]", "hover:bg-surface-accent-200 hover:bg-opacity-40 hover:bg-surface-accent-200/40 dark:hover:bg-surface-800 dark:hover:bg-opacity-40 dark:hover:bg-surface-800/40 active:bg-surface-accent-300/50 dark:active:bg-surface-700/50", invisible ? "border-b px-2" : "p-4", open ? "py-6" : "py-4", "transition-all duration-200", invisible && "border-surface-200
|
|
1621
|
+
className: cls("rounded-t flex items-center justify-between w-full min-h-[52px]", "hover:bg-surface-accent-200 hover:bg-opacity-40 hover:bg-surface-accent-200/40 dark:hover:bg-surface-800 dark:hover:bg-opacity-40 dark:hover:bg-surface-800/40 active:bg-surface-accent-300/50 dark:active:bg-surface-700/50", invisible ? "border-b px-2" : "p-4", open ? "py-6" : "py-4", "transition-all duration-200", invisible && "border-surface-200 dark:border-surface-700 ", asField && "bg-surface-accent-200/50 dark:bg-black/30", titleClassName, "cursor-pointer"),
|
|
1619
1622
|
role: "button",
|
|
1620
1623
|
tabIndex: 0,
|
|
1621
1624
|
"aria-expanded": open,
|
|
@@ -1649,7 +1652,7 @@ function FileUpload({ accept, onFilesAdded, onFilesRejected, maxSize, disabled,
|
|
|
1649
1652
|
role: "button",
|
|
1650
1653
|
"aria-label": typeof title === "string" ? title : typeof uploadDescription === "string" ? uploadDescription : "Upload file",
|
|
1651
1654
|
"aria-disabled": disabled || void 0,
|
|
1652
|
-
className: cls(fieldBackgroundMixin, "flex gap-2", "p-4 box-border relative items-center border-2 border-solid border-transparent outline-hidden rounded-
|
|
1655
|
+
className: cls(fieldBackgroundMixin, "flex gap-2", "p-4 box-border relative items-center border-2 border-solid border-transparent outline-hidden rounded-lg duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid", {
|
|
1653
1656
|
"h-44": size === "large",
|
|
1654
1657
|
"h-28": size === "medium",
|
|
1655
1658
|
"h-16": size === "small",
|
|
@@ -1700,7 +1703,7 @@ var FilterChip = React.forwardRef(function FilterChip({ children, active = false
|
|
|
1700
1703
|
type: "button",
|
|
1701
1704
|
onClick,
|
|
1702
1705
|
disabled,
|
|
1703
|
-
className: cls("inline-flex items-center gap-1 rounded-full", "font-medium whitespace-nowrap select-none shrink-0", "transition-
|
|
1706
|
+
className: cls("inline-flex items-center gap-1 rounded-full", "font-medium whitespace-nowrap select-none shrink-0", "transition-colors duration-150", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50", sizeClasses[size], active ? "bg-primary/12 text-primary dark:bg-primary/20 dark:text-primary shadow-[inset_0_0_0_1.5px_var(--color-primary)]" : cls("bg-surface-accent-100 text-text-secondary dark:bg-surface-accent-800 dark:text-text-secondary-dark", !disabled && "cursor-pointer hover:bg-primary/5 dark:hover:bg-primary/5"), disabled && "opacity-50 cursor-not-allowed", className),
|
|
1704
1707
|
...rest,
|
|
1705
1708
|
children: [icon, children]
|
|
1706
1709
|
});
|
|
@@ -2053,7 +2056,7 @@ var MultiSelect = React$1.forwardRef(({ value, size = "large", label, error, onV
|
|
|
2053
2056
|
}, {
|
|
2054
2057
|
"px-2": size === "small" || size === "smallest",
|
|
2055
2058
|
"px-4": size === "medium" || size === "large"
|
|
2056
|
-
}, "select-none rounded-
|
|
2059
|
+
}, "select-none rounded-lg text-sm", "focus:ring-0 focus-visible:ring-0 outline-none focus:outline-none focus-visible:outline-none", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, inputClassName),
|
|
2057
2060
|
children: selectedValues.length > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
2058
2061
|
className: "flex justify-between items-center w-full",
|
|
2059
2062
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -2289,7 +2292,7 @@ function ResizablePanels({ firstPanel, secondPanel, showFirstPanel = true, showS
|
|
|
2289
2292
|
children: firstPanel
|
|
2290
2293
|
}),
|
|
2291
2294
|
!stacked && showFirstPanel && showSecondPanel && /* @__PURE__ */ jsx("div", {
|
|
2292
|
-
className: cls("relative z-10 flex flex-shrink-0 items-center justify-center", "border-surface-200
|
|
2295
|
+
className: cls("relative z-10 flex flex-shrink-0 items-center justify-center", "border-surface-200 dark:border-surface-700 ", isHorizontal ? "border-l w-px h-full cursor-col-resize" : "border-t h-px w-full cursor-row-resize"),
|
|
2293
2296
|
onMouseDown: handleResizeStart,
|
|
2294
2297
|
children: /* @__PURE__ */ jsx("div", {
|
|
2295
2298
|
className: cls("absolute flex items-center justify-center group", isHorizontal ? "w-4 h-full cursor-col-resize top-0" : "h-4 w-full cursor-row-resize left-0"),
|
|
@@ -2423,7 +2426,7 @@ var Select = forwardRef(({ inputRef, open, name, fullWidth = false, id, onOpenCh
|
|
|
2423
2426
|
children: label
|
|
2424
2427
|
}) : label,
|
|
2425
2428
|
/* @__PURE__ */ jsxs("div", {
|
|
2426
|
-
className: cls("select-none rounded-
|
|
2429
|
+
className: cls("select-none rounded-lg text-sm", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, "relative flex items-center", className, {
|
|
2427
2430
|
"min-h-[28px]": size === "smallest",
|
|
2428
2431
|
"min-h-[32px]": size === "small",
|
|
2429
2432
|
"min-h-[44px]": size === "medium",
|
|
@@ -2442,7 +2445,7 @@ var Select = forwardRef(({ inputRef, open, name, fullWidth = false, id, onOpenCh
|
|
|
2442
2445
|
"px-4": size === "large",
|
|
2443
2446
|
"px-3": size === "medium",
|
|
2444
2447
|
"px-2": size === "small" || size === "smallest"
|
|
2445
|
-
} : "", "outline-hidden focus:outline-hidden", "outline-none focus:outline-none", "select-none rounded-
|
|
2448
|
+
} : "", "outline-hidden focus:outline-hidden", "outline-none focus:outline-none", "select-none rounded-lg text-sm", error ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark", error ? "border border-red-500 dark:border-red-600" : "", disabled ? "text-surface-accent-600 dark:text-surface-accent-400" : "text-surface-accent-800 dark:text-white", "relative flex flex-row items-center", {
|
|
2446
2449
|
"min-h-[28px]": size === "smallest",
|
|
2447
2450
|
"min-h-[32px]": size === "small",
|
|
2448
2451
|
"min-h-[44px]": size === "medium",
|
|
@@ -2825,7 +2828,7 @@ var TextField = forwardRef(({ value, onChange, label, type = "text", multiline =
|
|
|
2825
2828
|
onFocus: () => setFocused(true),
|
|
2826
2829
|
onBlur: () => setFocused(false),
|
|
2827
2830
|
style: inputStyle,
|
|
2828
|
-
className: cls(invisible ? focusedInvisibleMixin : "", "rounded-
|
|
2831
|
+
className: cls(invisible ? focusedInvisibleMixin : "", "rounded-lg resize-none w-full outline-none text-base bg-transparent min-h-[64px] px-3", label ? "pt-8 pb-2" : "py-2", disabled && "outline-none opacity-50 text-surface-accent-600 dark:text-surface-accent-500", inputClassName)
|
|
2829
2832
|
}) : /* @__PURE__ */ jsx("input", {
|
|
2830
2833
|
...inputProps,
|
|
2831
2834
|
ref: inputRef,
|
|
@@ -2835,7 +2838,7 @@ var TextField = forwardRef(({ value, onChange, label, type = "text", multiline =
|
|
|
2835
2838
|
"aria-disabled": disabled || void 0,
|
|
2836
2839
|
disabled,
|
|
2837
2840
|
style: inputStyle,
|
|
2838
|
-
className: cls("w-full outline-none bg-transparent leading-normal px-3", "rounded-
|
|
2841
|
+
className: cls("w-full outline-none bg-transparent leading-normal px-3", "rounded-lg", "focused:text-text-primary focused:dark:text-text-primary-dark", invisible ? focusedInvisibleMixin : "", disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, {
|
|
2839
2842
|
"min-h-[28px]": size === "smallest",
|
|
2840
2843
|
"min-h-[32px]": size === "small",
|
|
2841
2844
|
"min-h-[44px]": size === "medium",
|
|
@@ -2851,7 +2854,7 @@ var TextField = forwardRef(({ value, onChange, label, type = "text", multiline =
|
|
|
2851
2854
|
});
|
|
2852
2855
|
return /* @__PURE__ */ jsxs("div", {
|
|
2853
2856
|
ref,
|
|
2854
|
-
className: cls("rounded-
|
|
2857
|
+
className: cls("rounded-lg relative max-w-full", invisible ? fieldBackgroundInvisibleMixin : fieldBackgroundMixin, disabled ? fieldBackgroundDisabledMixin : fieldBackgroundHoverMixin, error ? "border border-red-500 dark:border-red-600" : "", {
|
|
2855
2858
|
"min-h-[28px]": size === "smallest",
|
|
2856
2859
|
"min-h-[32px]": size === "small",
|
|
2857
2860
|
"min-h-[44px]": size === "medium",
|
|
@@ -2933,7 +2936,7 @@ function Tabs({ value, onValueChange, className, innerClassName, variant = "stan
|
|
|
2933
2936
|
disabled: !showLeftScroll,
|
|
2934
2937
|
"aria-label": "Scroll tabs left",
|
|
2935
2938
|
onClick: () => scroll("left"),
|
|
2936
|
-
className: cls("absolute left-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center rounded-md transition-all h-8 w-6", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400", !showLeftScroll ? "pointer-events-none opacity-0" : "text-surface-600 dark:text-surface-400 hover:bg-surface-200 dark:hover:bg-surface-800", "bg-surface-50 dark:bg-surface-900 border shadow-sm", "border-surface-200
|
|
2939
|
+
className: cls("absolute left-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center rounded-md transition-all h-8 w-6", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400", !showLeftScroll ? "pointer-events-none opacity-0" : "text-surface-600 dark:text-surface-400 hover:bg-surface-200 dark:hover:bg-surface-800", "bg-surface-50 dark:bg-surface-900 border shadow-sm", "border-surface-200 dark:border-surface-700 "),
|
|
2937
2940
|
children: /* @__PURE__ */ jsx(ChevronLeftIcon$1, { size: iconSize.smallest })
|
|
2938
2941
|
}),
|
|
2939
2942
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -2945,7 +2948,7 @@ function Tabs({ value, onValueChange, className, innerClassName, variant = "stan
|
|
|
2945
2948
|
msOverflowStyle: "none"
|
|
2946
2949
|
},
|
|
2947
2950
|
children: /* @__PURE__ */ jsx(TabsPrimitive.List, {
|
|
2948
|
-
className: cls(variant === "standard" && "inline-flex h-9 items-center justify-start rounded-md bg-surface-50 p-1 text-surface-600 dark:bg-surface-900 dark:text-surface-400 gap-2 border", variant === "standard" && "border-surface-200
|
|
2951
|
+
className: cls(variant === "standard" && "inline-flex h-9 items-center justify-start rounded-md bg-surface-50 p-1 text-surface-600 dark:bg-surface-900 dark:text-surface-400 gap-2 border", variant === "standard" && "border-surface-200 dark:border-surface-700 ", variant === "boxy" && "flex items-center h-full", variant === "pill" && "flex items-center gap-0.5", innerClassName),
|
|
2949
2952
|
children
|
|
2950
2953
|
})
|
|
2951
2954
|
}),
|
|
@@ -2954,7 +2957,7 @@ function Tabs({ value, onValueChange, className, innerClassName, variant = "stan
|
|
|
2954
2957
|
disabled: !showRightScroll,
|
|
2955
2958
|
"aria-label": "Scroll tabs right",
|
|
2956
2959
|
onClick: () => scroll("right"),
|
|
2957
|
-
className: cls("absolute right-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center rounded-md transition-all h-8 w-6", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400", !showRightScroll ? "pointer-events-none opacity-0" : "text-surface-600 dark:text-surface-400 hover:bg-surface-200 dark:hover:bg-surface-800", "bg-surface-50 dark:bg-surface-900 border shadow-sm", "border-surface-200
|
|
2960
|
+
className: cls("absolute right-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center rounded-md transition-all h-8 w-6", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-surface-400", !showRightScroll ? "pointer-events-none opacity-0" : "text-surface-600 dark:text-surface-400 hover:bg-surface-200 dark:hover:bg-surface-800", "bg-surface-50 dark:bg-surface-900 border shadow-sm", "border-surface-200 dark:border-surface-700 "),
|
|
2958
2961
|
children: /* @__PURE__ */ jsx(ChevronRightIcon$1, { size: iconSize.smallest })
|
|
2959
2962
|
})
|
|
2960
2963
|
]
|
|
@@ -2973,7 +2976,7 @@ function Tab({ value, className, innerClassName, children, disabled }) {
|
|
|
2973
2976
|
//#endregion
|
|
2974
2977
|
//#region src/components/Table.tsx
|
|
2975
2978
|
var Table = React.memo(({ children, className, style, ...rest }) => /* @__PURE__ */ jsx("table", {
|
|
2976
|
-
className: cls("text-left text-surface-900 dark:text-white rounded-
|
|
2979
|
+
className: cls("text-left text-surface-900 dark:text-white rounded-lg overflow-x-auto", className),
|
|
2977
2980
|
style,
|
|
2978
2981
|
...rest,
|
|
2979
2982
|
children
|
|
@@ -2993,7 +2996,7 @@ var TableHeader = React.memo(({ children, className, ...rest }) => /* @__PURE__
|
|
|
2993
2996
|
var TableRow = React.memo(({ children, className, onClick, style, ...rest }) => /* @__PURE__ */ jsx("tr", {
|
|
2994
2997
|
onClick,
|
|
2995
2998
|
style,
|
|
2996
|
-
className: cls("bg-white dark:bg-surface-900", onClick ? "hover:bg-
|
|
2999
|
+
className: cls("bg-white dark:bg-surface-900", onClick ? "hover:bg-primary/5 dark:hover:bg-primary/5 cursor-pointer" : "", className),
|
|
2997
3000
|
...rest,
|
|
2998
3001
|
children
|
|
2999
3002
|
}));
|
|
@@ -3620,7 +3623,7 @@ var VirtualTableRow = React.memo(function VirtualTableRow({ rowData, rowIndex, c
|
|
|
3620
3623
|
]);
|
|
3621
3624
|
return /* @__PURE__ */ jsx("div", {
|
|
3622
3625
|
className: cls("flex min-w-full text-sm border-b border-surface-200/60 dark:border-surface-700/60 dark:bg-surface-800", rowClassName ? rowClassName(rowData) : "", {
|
|
3623
|
-
"hover:!bg-
|
|
3626
|
+
"hover:!bg-primary/[0.03] dark:hover:!bg-primary/5": hoverRow,
|
|
3624
3627
|
"cursor-pointer ": onRowClick
|
|
3625
3628
|
}),
|
|
3626
3629
|
onClick,
|