@rehagro/ui 1.0.36 → 1.0.37
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/{colors.types-7nLOoy6r.d.mts → colors.types-Dd3I7svd.d.mts} +1 -1
- package/dist/{colors.types-7nLOoy6r.d.ts → colors.types-Dd3I7svd.d.ts} +1 -1
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +37 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +37 -17
- package/dist/index.mjs.map +1 -1
- package/dist/native.d.mts +1 -1
- package/dist/native.d.ts +1 -1
- package/dist/native.js +8 -4
- package/dist/native.js.map +1 -1
- package/dist/native.mjs +8 -4
- package/dist/native.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type PresetColor = "primary" | "secondary" | "danger" | "warning" | "success" | "info";
|
|
1
|
+
type PresetColor = "primary" | "secondary" | "danger" | "warning" | "success" | "info" | "neutral";
|
|
2
2
|
type ButtonColor = PresetColor | (string & {});
|
|
3
3
|
|
|
4
4
|
export type { ButtonColor as B, PresetColor as P };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type PresetColor = "primary" | "secondary" | "danger" | "warning" | "success" | "info";
|
|
1
|
+
type PresetColor = "primary" | "secondary" | "danger" | "warning" | "success" | "info" | "neutral";
|
|
2
2
|
type ButtonColor = PresetColor | (string & {});
|
|
3
3
|
|
|
4
4
|
export type { ButtonColor as B, PresetColor as P };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { B as ButtonColor, P as PresetColor } from './colors.types-
|
|
3
|
+
import { B as ButtonColor, P as PresetColor } from './colors.types-Dd3I7svd.mjs';
|
|
4
4
|
|
|
5
5
|
type ToastVariant = "info" | "warning" | "success" | "error" | "neutral";
|
|
6
6
|
type ToastAppearance = "solid" | "light" | "outline";
|
|
@@ -91,6 +91,10 @@ type RehagroTheme = {
|
|
|
91
91
|
successHover?: string;
|
|
92
92
|
info?: string;
|
|
93
93
|
infoHover?: string;
|
|
94
|
+
/** Neutral color — for non-semantic actions (e.g. kebab menus, close buttons).
|
|
95
|
+
* Typically mapped to textMuted / text / border in the consumer's theme. */
|
|
96
|
+
neutral?: string;
|
|
97
|
+
neutralHover?: string;
|
|
94
98
|
/** Subtle background for outline/ghost hover.
|
|
95
99
|
* Accepts any CSS color value (hex, rgb, named).
|
|
96
100
|
* When omitted, derived automatically via color-mix from the base color. */
|
|
@@ -100,6 +104,7 @@ type RehagroTheme = {
|
|
|
100
104
|
warningSubtle?: string;
|
|
101
105
|
successSubtle?: string;
|
|
102
106
|
infoSubtle?: string;
|
|
107
|
+
neutralSubtle?: string;
|
|
103
108
|
/** Semantic colors */
|
|
104
109
|
text?: string;
|
|
105
110
|
textMuted?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { B as ButtonColor, P as PresetColor } from './colors.types-
|
|
3
|
+
import { B as ButtonColor, P as PresetColor } from './colors.types-Dd3I7svd.js';
|
|
4
4
|
|
|
5
5
|
type ToastVariant = "info" | "warning" | "success" | "error" | "neutral";
|
|
6
6
|
type ToastAppearance = "solid" | "light" | "outline";
|
|
@@ -91,6 +91,10 @@ type RehagroTheme = {
|
|
|
91
91
|
successHover?: string;
|
|
92
92
|
info?: string;
|
|
93
93
|
infoHover?: string;
|
|
94
|
+
/** Neutral color — for non-semantic actions (e.g. kebab menus, close buttons).
|
|
95
|
+
* Typically mapped to textMuted / text / border in the consumer's theme. */
|
|
96
|
+
neutral?: string;
|
|
97
|
+
neutralHover?: string;
|
|
94
98
|
/** Subtle background for outline/ghost hover.
|
|
95
99
|
* Accepts any CSS color value (hex, rgb, named).
|
|
96
100
|
* When omitted, derived automatically via color-mix from the base color. */
|
|
@@ -100,6 +104,7 @@ type RehagroTheme = {
|
|
|
100
104
|
warningSubtle?: string;
|
|
101
105
|
successSubtle?: string;
|
|
102
106
|
infoSubtle?: string;
|
|
107
|
+
neutralSubtle?: string;
|
|
103
108
|
/** Semantic colors */
|
|
104
109
|
text?: string;
|
|
105
110
|
textMuted?: string;
|
package/dist/index.js
CHANGED
|
@@ -24,12 +24,15 @@ var TOKEN_MAP = {
|
|
|
24
24
|
successHover: { var: "--rh-success-hover", isColor: true },
|
|
25
25
|
info: { var: "--rh-info", isColor: true },
|
|
26
26
|
infoHover: { var: "--rh-info-hover", isColor: true },
|
|
27
|
+
neutral: { var: "--rh-neutral", isColor: true },
|
|
28
|
+
neutralHover: { var: "--rh-neutral-hover", isColor: true },
|
|
27
29
|
primarySubtle: { var: "--rh-primary-subtle", isColor: true, raw: true },
|
|
28
30
|
secondarySubtle: { var: "--rh-secondary-subtle", isColor: true, raw: true },
|
|
29
31
|
dangerSubtle: { var: "--rh-danger-subtle", isColor: true, raw: true },
|
|
30
32
|
warningSubtle: { var: "--rh-warning-subtle", isColor: true, raw: true },
|
|
31
33
|
successSubtle: { var: "--rh-success-subtle", isColor: true, raw: true },
|
|
32
34
|
infoSubtle: { var: "--rh-info-subtle", isColor: true, raw: true },
|
|
35
|
+
neutralSubtle: { var: "--rh-neutral-subtle", isColor: true, raw: true },
|
|
33
36
|
text: { var: "--rh-text", isColor: true },
|
|
34
37
|
textMuted: { var: "--rh-text-muted", isColor: true },
|
|
35
38
|
surface: { var: "--rh-surface", isColor: true },
|
|
@@ -744,7 +747,8 @@ var PRESET_COLORS = /* @__PURE__ */ new Set([
|
|
|
744
747
|
"danger",
|
|
745
748
|
"warning",
|
|
746
749
|
"success",
|
|
747
|
-
"info"
|
|
750
|
+
"info",
|
|
751
|
+
"neutral"
|
|
748
752
|
]);
|
|
749
753
|
var isPresetColor = (c) => PRESET_COLORS.has(c);
|
|
750
754
|
var variantBaseClasses = {
|
|
@@ -754,7 +758,8 @@ var variantBaseClasses = {
|
|
|
754
758
|
danger: "rh-bg-danger rh-text-surface rh-border-danger",
|
|
755
759
|
warning: "rh-bg-warning rh-text-surface rh-border-warning",
|
|
756
760
|
success: "rh-bg-success rh-text-surface rh-border-success",
|
|
757
|
-
info: "rh-bg-info rh-text-surface rh-border-info"
|
|
761
|
+
info: "rh-bg-info rh-text-surface rh-border-info",
|
|
762
|
+
neutral: "rh-bg-neutral rh-text-surface rh-border-neutral"
|
|
758
763
|
},
|
|
759
764
|
outline: {
|
|
760
765
|
primary: "rh-bg-transparent rh-text-primary rh-border-primary",
|
|
@@ -762,7 +767,8 @@ var variantBaseClasses = {
|
|
|
762
767
|
danger: "rh-bg-transparent rh-text-danger rh-border-danger",
|
|
763
768
|
warning: "rh-bg-transparent rh-text-warning rh-border-warning",
|
|
764
769
|
success: "rh-bg-transparent rh-text-success rh-border-success",
|
|
765
|
-
info: "rh-bg-transparent rh-text-info rh-border-info"
|
|
770
|
+
info: "rh-bg-transparent rh-text-info rh-border-info",
|
|
771
|
+
neutral: "rh-bg-transparent rh-text-neutral rh-border-neutral"
|
|
766
772
|
},
|
|
767
773
|
ghost: {
|
|
768
774
|
primary: "rh-bg-transparent rh-text-primary rh-border-transparent",
|
|
@@ -770,7 +776,8 @@ var variantBaseClasses = {
|
|
|
770
776
|
danger: "rh-bg-transparent rh-text-danger rh-border-transparent",
|
|
771
777
|
warning: "rh-bg-transparent rh-text-warning rh-border-transparent",
|
|
772
778
|
success: "rh-bg-transparent rh-text-success rh-border-transparent",
|
|
773
|
-
info: "rh-bg-transparent rh-text-info rh-border-transparent"
|
|
779
|
+
info: "rh-bg-transparent rh-text-info rh-border-transparent",
|
|
780
|
+
neutral: "rh-bg-transparent rh-text-neutral rh-border-transparent"
|
|
774
781
|
}
|
|
775
782
|
};
|
|
776
783
|
var variantHoverClasses = {
|
|
@@ -780,7 +787,8 @@ var variantHoverClasses = {
|
|
|
780
787
|
danger: "hover:rh-bg-danger-hover hover:rh-border-danger-hover",
|
|
781
788
|
warning: "hover:rh-bg-warning-hover hover:rh-border-warning-hover",
|
|
782
789
|
success: "hover:rh-bg-success-hover hover:rh-border-success-hover",
|
|
783
|
-
info: "hover:rh-bg-info-hover hover:rh-border-info-hover"
|
|
790
|
+
info: "hover:rh-bg-info-hover hover:rh-border-info-hover",
|
|
791
|
+
neutral: "hover:rh-bg-neutral-hover hover:rh-border-neutral-hover"
|
|
784
792
|
},
|
|
785
793
|
outline: {
|
|
786
794
|
primary: "hover:rh-bg-primary-subtle",
|
|
@@ -788,7 +796,8 @@ var variantHoverClasses = {
|
|
|
788
796
|
danger: "hover:rh-bg-danger-subtle",
|
|
789
797
|
warning: "hover:rh-bg-warning-subtle",
|
|
790
798
|
success: "hover:rh-bg-success-subtle",
|
|
791
|
-
info: "hover:rh-bg-info-subtle"
|
|
799
|
+
info: "hover:rh-bg-info-subtle",
|
|
800
|
+
neutral: "hover:rh-bg-neutral-subtle"
|
|
792
801
|
},
|
|
793
802
|
ghost: {
|
|
794
803
|
primary: "hover:rh-bg-primary-subtle",
|
|
@@ -796,7 +805,8 @@ var variantHoverClasses = {
|
|
|
796
805
|
danger: "hover:rh-bg-danger-subtle",
|
|
797
806
|
warning: "hover:rh-bg-warning-subtle",
|
|
798
807
|
success: "hover:rh-bg-success-subtle",
|
|
799
|
-
info: "hover:rh-bg-info-subtle"
|
|
808
|
+
info: "hover:rh-bg-info-subtle",
|
|
809
|
+
neutral: "hover:rh-bg-neutral-subtle"
|
|
800
810
|
}
|
|
801
811
|
};
|
|
802
812
|
function getArbitraryColorStyle(variant, color) {
|
|
@@ -915,7 +925,8 @@ var PRESET_COLORS2 = /* @__PURE__ */ new Set([
|
|
|
915
925
|
"danger",
|
|
916
926
|
"warning",
|
|
917
927
|
"success",
|
|
918
|
-
"info"
|
|
928
|
+
"info",
|
|
929
|
+
"neutral"
|
|
919
930
|
]);
|
|
920
931
|
var isPresetColor2 = (c) => PRESET_COLORS2.has(c);
|
|
921
932
|
var variantColorClasses = {
|
|
@@ -925,7 +936,8 @@ var variantColorClasses = {
|
|
|
925
936
|
danger: "rh-bg-danger rh-text-surface rh-border-danger hover:rh-bg-danger-hover hover:rh-border-danger-hover",
|
|
926
937
|
warning: "rh-bg-warning rh-text-surface rh-border-warning hover:rh-bg-warning-hover hover:rh-border-warning-hover",
|
|
927
938
|
success: "rh-bg-success rh-text-surface rh-border-success hover:rh-bg-success-hover hover:rh-border-success-hover",
|
|
928
|
-
info: "rh-bg-info rh-text-surface rh-border-info hover:rh-bg-info-hover hover:rh-border-info-hover"
|
|
939
|
+
info: "rh-bg-info rh-text-surface rh-border-info hover:rh-bg-info-hover hover:rh-border-info-hover",
|
|
940
|
+
neutral: "rh-bg-neutral rh-text-surface rh-border-neutral hover:rh-bg-neutral-hover hover:rh-border-neutral-hover"
|
|
929
941
|
},
|
|
930
942
|
outline: {
|
|
931
943
|
primary: "rh-bg-transparent rh-text-primary rh-border-primary hover:rh-bg-primary hover:rh-text-surface",
|
|
@@ -933,7 +945,8 @@ var variantColorClasses = {
|
|
|
933
945
|
danger: "rh-bg-transparent rh-text-danger rh-border-danger hover:rh-bg-danger hover:rh-text-surface",
|
|
934
946
|
warning: "rh-bg-transparent rh-text-warning rh-border-warning hover:rh-bg-warning hover:rh-text-surface",
|
|
935
947
|
success: "rh-bg-transparent rh-text-success rh-border-success hover:rh-bg-success hover:rh-text-surface",
|
|
936
|
-
info: "rh-bg-transparent rh-text-info rh-border-info hover:rh-bg-info hover:rh-text-surface"
|
|
948
|
+
info: "rh-bg-transparent rh-text-info rh-border-info hover:rh-bg-info hover:rh-text-surface",
|
|
949
|
+
neutral: "rh-bg-transparent rh-text-neutral rh-border-neutral hover:rh-bg-neutral-subtle"
|
|
937
950
|
},
|
|
938
951
|
ghost: {
|
|
939
952
|
primary: "rh-bg-transparent rh-text-primary rh-border-transparent hover:rh-bg-primary-subtle",
|
|
@@ -941,7 +954,8 @@ var variantColorClasses = {
|
|
|
941
954
|
danger: "rh-bg-transparent rh-text-danger rh-border-transparent hover:rh-bg-danger-subtle",
|
|
942
955
|
warning: "rh-bg-transparent rh-text-warning rh-border-transparent hover:rh-bg-warning-subtle",
|
|
943
956
|
success: "rh-bg-transparent rh-text-success rh-border-transparent hover:rh-bg-success-subtle",
|
|
944
|
-
info: "rh-bg-transparent rh-text-info rh-border-transparent hover:rh-bg-info-subtle"
|
|
957
|
+
info: "rh-bg-transparent rh-text-info rh-border-transparent hover:rh-bg-info-subtle",
|
|
958
|
+
neutral: "rh-bg-transparent rh-text-neutral rh-border-transparent hover:rh-bg-neutral-subtle"
|
|
945
959
|
}
|
|
946
960
|
};
|
|
947
961
|
function getArbitraryColorStyle2(variant, color) {
|
|
@@ -2133,7 +2147,8 @@ var PRESET_COLORS4 = /* @__PURE__ */ new Set([
|
|
|
2133
2147
|
"danger",
|
|
2134
2148
|
"warning",
|
|
2135
2149
|
"success",
|
|
2136
|
-
"info"
|
|
2150
|
+
"info",
|
|
2151
|
+
"neutral"
|
|
2137
2152
|
]);
|
|
2138
2153
|
var isPresetColor4 = (color) => PRESET_COLORS4.has(color);
|
|
2139
2154
|
var activePresetClasses = {
|
|
@@ -2142,7 +2157,8 @@ var activePresetClasses = {
|
|
|
2142
2157
|
danger: "rh-bg-danger rh-text-surface rh-border-danger",
|
|
2143
2158
|
warning: "rh-bg-warning rh-text-surface rh-border-warning",
|
|
2144
2159
|
success: "rh-bg-success rh-text-surface rh-border-success",
|
|
2145
|
-
info: "rh-bg-info rh-text-surface rh-border-info"
|
|
2160
|
+
info: "rh-bg-info rh-text-surface rh-border-info",
|
|
2161
|
+
neutral: "rh-bg-neutral rh-text-surface rh-border-neutral"
|
|
2146
2162
|
};
|
|
2147
2163
|
var inactivePresetClasses = {
|
|
2148
2164
|
primary: "rh-bg-primary/10 rh-text-primary rh-border-primary/30",
|
|
@@ -2150,7 +2166,8 @@ var inactivePresetClasses = {
|
|
|
2150
2166
|
danger: "rh-bg-danger/10 rh-text-danger rh-border-danger/30",
|
|
2151
2167
|
warning: "rh-bg-warning/10 rh-text-warning rh-border-warning/30",
|
|
2152
2168
|
success: "rh-bg-success/10 rh-text-success rh-border-success/30",
|
|
2153
|
-
info: "rh-bg-info/10 rh-text-info rh-border-info/30"
|
|
2169
|
+
info: "rh-bg-info/10 rh-text-info rh-border-info/30",
|
|
2170
|
+
neutral: "rh-bg-neutral/10 rh-text-neutral rh-border-neutral/30"
|
|
2154
2171
|
};
|
|
2155
2172
|
var hoverActivePresetClasses = {
|
|
2156
2173
|
primary: "hover:rh-bg-primary-hover hover:rh-border-primary-hover",
|
|
@@ -2158,7 +2175,8 @@ var hoverActivePresetClasses = {
|
|
|
2158
2175
|
danger: "hover:rh-bg-danger-hover hover:rh-border-danger-hover",
|
|
2159
2176
|
warning: "hover:rh-bg-warning-hover hover:rh-border-warning-hover",
|
|
2160
2177
|
success: "hover:rh-bg-success-hover hover:rh-border-success-hover",
|
|
2161
|
-
info: "hover:rh-bg-info-hover hover:rh-border-info-hover"
|
|
2178
|
+
info: "hover:rh-bg-info-hover hover:rh-border-info-hover",
|
|
2179
|
+
neutral: "hover:rh-bg-neutral-hover hover:rh-border-neutral-hover"
|
|
2162
2180
|
};
|
|
2163
2181
|
var hoverInactivePresetClasses = {
|
|
2164
2182
|
primary: "hover:rh-bg-primary/20 hover:rh-border-primary/50",
|
|
@@ -2166,7 +2184,8 @@ var hoverInactivePresetClasses = {
|
|
|
2166
2184
|
danger: "hover:rh-bg-danger/20 hover:rh-border-danger/50",
|
|
2167
2185
|
warning: "hover:rh-bg-warning/20 hover:rh-border-warning/50",
|
|
2168
2186
|
success: "hover:rh-bg-success/20 hover:rh-border-success/50",
|
|
2169
|
-
info: "hover:rh-bg-info/20 hover:rh-border-info/50"
|
|
2187
|
+
info: "hover:rh-bg-info/20 hover:rh-border-info/50",
|
|
2188
|
+
neutral: "hover:rh-bg-neutral/20 hover:rh-border-neutral/50"
|
|
2170
2189
|
};
|
|
2171
2190
|
var sizeClasses8 = {
|
|
2172
2191
|
sm: "rh-text-xs rh-px-2 rh-py-0.5 rh-gap-1",
|
|
@@ -2773,7 +2792,8 @@ var colorClasses = {
|
|
|
2773
2792
|
danger: "rh-text-danger",
|
|
2774
2793
|
warning: "rh-text-warning",
|
|
2775
2794
|
success: "rh-text-success",
|
|
2776
|
-
info: "rh-text-info"
|
|
2795
|
+
info: "rh-text-info",
|
|
2796
|
+
neutral: "rh-text-neutral"
|
|
2777
2797
|
};
|
|
2778
2798
|
var Spinner = React9.forwardRef(function Spinner2({ size = "md", color = "primary", label = "Carregando...", className = "", style, ...rest }, ref) {
|
|
2779
2799
|
const preset = isPresetColor6(color);
|