@rehagro/ui 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +105 -82
- package/dist/index.d.ts +105 -82
- package/dist/index.js +48 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +48 -3
- package/dist/index.mjs.map +1 -1
- package/dist/native.d.mts +64 -49
- package/dist/native.d.ts +64 -49
- package/dist/native.js +50 -17
- package/dist/native.js.map +1 -1
- package/dist/native.mjs +50 -17
- package/dist/native.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/typography.css +1 -0
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -1892,7 +1892,7 @@ var Tag = forwardRef(function Tag2({
|
|
|
1892
1892
|
}, ref) {
|
|
1893
1893
|
const preset = isPresetColor3(color);
|
|
1894
1894
|
const clickable = !!rest.onClick && !disabled;
|
|
1895
|
-
const
|
|
1895
|
+
const colorClasses3 = preset ? active ? activePresetClasses[color] : inactivePresetClasses[color] : "";
|
|
1896
1896
|
const hoverClasses = clickable && preset ? active ? hoverActivePresetClasses[color] : hoverInactivePresetClasses[color] : clickable ? "hover:rh-brightness-95" : "";
|
|
1897
1897
|
const customStyles = preset ? {} : getCustomColorStyles(color, active);
|
|
1898
1898
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1910,7 +1910,7 @@ var Tag = forwardRef(function Tag2({
|
|
|
1910
1910
|
"rh-cursor-pointer",
|
|
1911
1911
|
clickable ? "rh-cursor-pointer" : "",
|
|
1912
1912
|
sizeClasses8[size],
|
|
1913
|
-
|
|
1913
|
+
colorClasses3,
|
|
1914
1914
|
hoverClasses,
|
|
1915
1915
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
|
|
1916
1916
|
className
|
|
@@ -2675,6 +2675,51 @@ function TableInner({
|
|
|
2675
2675
|
) });
|
|
2676
2676
|
}
|
|
2677
2677
|
var Table = forwardRef(TableInner);
|
|
2678
|
+
var defaultElements = {
|
|
2679
|
+
h1: "h1",
|
|
2680
|
+
h2: "h2",
|
|
2681
|
+
h3: "h3",
|
|
2682
|
+
h4: "h4",
|
|
2683
|
+
bodyLg: "p",
|
|
2684
|
+
body: "p",
|
|
2685
|
+
label: "span",
|
|
2686
|
+
caption: "span"
|
|
2687
|
+
};
|
|
2688
|
+
var variantClasses4 = {
|
|
2689
|
+
h1: "rh-text-4xl rh-font-bold rh-leading-tight rh-font-display",
|
|
2690
|
+
h2: "rh-text-2xl rh-font-bold rh-leading-snug rh-font-display",
|
|
2691
|
+
h3: "rh-text-xl rh-font-semibold rh-leading-snug rh-font-display",
|
|
2692
|
+
h4: "rh-text-lg rh-font-semibold rh-leading-snug rh-font-display",
|
|
2693
|
+
bodyLg: "rh-text-base rh-font-normal rh-leading-normal rh-font-body",
|
|
2694
|
+
body: "rh-text-sm rh-font-normal rh-leading-normal rh-font-body",
|
|
2695
|
+
label: "rh-text-sm rh-font-medium rh-leading-normal rh-font-body",
|
|
2696
|
+
caption: "rh-text-xs rh-font-normal rh-leading-normal rh-font-body"
|
|
2697
|
+
};
|
|
2698
|
+
var colorClasses2 = {
|
|
2699
|
+
default: "rh-text-text",
|
|
2700
|
+
muted: "rh-text-text-muted",
|
|
2701
|
+
primary: "rh-text-primary",
|
|
2702
|
+
danger: "rh-text-danger",
|
|
2703
|
+
success: "rh-text-success",
|
|
2704
|
+
warning: "rh-text-warning"
|
|
2705
|
+
};
|
|
2706
|
+
var Typography = forwardRef(function Typography2({ variant = "body", color = "default", bold = false, as, className = "", children, ...rest }, ref) {
|
|
2707
|
+
const element = as ?? defaultElements[variant];
|
|
2708
|
+
return React8.createElement(
|
|
2709
|
+
element,
|
|
2710
|
+
{
|
|
2711
|
+
ref,
|
|
2712
|
+
className: [
|
|
2713
|
+
variantClasses4[variant],
|
|
2714
|
+
colorClasses2[color],
|
|
2715
|
+
bold ? "rh-font-bold" : "",
|
|
2716
|
+
className
|
|
2717
|
+
].filter(Boolean).join(" "),
|
|
2718
|
+
...rest
|
|
2719
|
+
},
|
|
2720
|
+
children
|
|
2721
|
+
);
|
|
2722
|
+
});
|
|
2678
2723
|
var Container = forwardRef(
|
|
2679
2724
|
function Container2({ fluid = false, className = "", children, ...rest }, ref) {
|
|
2680
2725
|
return /* @__PURE__ */ jsx(
|
|
@@ -2844,6 +2889,6 @@ var GridItem = forwardRef(
|
|
|
2844
2889
|
}
|
|
2845
2890
|
);
|
|
2846
2891
|
|
|
2847
|
-
export { Avatar, Button, Card, CardContent, CardFooter, CardHeader, Checkbox, CloseIcon, Container, DeleteIcon, EditIcon, ErrorIcon, GridContainer, GridItem, IconButton, InfoIcon, NeutralIcon, PlusIcon, ProgressBar, RehagroProvider, SearchIcon, Select, Spinner, SuccessIcon, Table, Tag, TagInput, TextInput, Toast, ToastContainer, ToastProvider, ToggleGroup, Tooltip, WarningIcon, useToast };
|
|
2892
|
+
export { Avatar, Button, Card, CardContent, CardFooter, CardHeader, Checkbox, CloseIcon, Container, DeleteIcon, EditIcon, ErrorIcon, GridContainer, GridItem, IconButton, InfoIcon, NeutralIcon, PlusIcon, ProgressBar, RehagroProvider, SearchIcon, Select, Spinner, SuccessIcon, Table, Tag, TagInput, TextInput, Toast, ToastContainer, ToastProvider, ToggleGroup, Tooltip, Typography, WarningIcon, useToast };
|
|
2848
2893
|
//# sourceMappingURL=index.mjs.map
|
|
2849
2894
|
//# sourceMappingURL=index.mjs.map
|